Changeset 25
- Timestamp:
- Jan 20, 2009, 8:08:17 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/grails-app/conf/BootStrap.groovy
r21 r25 37 37 //TypeOfPersonGroup 38 38 new PersonGroupType(name:"Department").save() 39 println "PersonGroup = ${PersonGroupType.get(1)}"40 39 new PersonGroupType(name:"Contractor").save() 41 40 new PersonGroupType(name:"ProjectTeam").save() 42 41 43 42 //PersonGroup 44 new PersonGroup(PersonGroupType:PersonGroupType.findByName("Department"), name:"Electrical").save() 45 new PersonGroup( 46 PersonGroupType:PersonGroupType.get(2), 47 name:"Kewl AirCon Guys").save() 48 new PersonGroup( 49 PersonGroupType:PersonGroupType.get(3), 50 name:"openMim").save() 43 new PersonGroup(personGroupType:PersonGroupType.findByName("Department"), 44 name:"Electrical").save() 45 new PersonGroup(personGroupType:PersonGroupType.get(2), 46 name:"Kewl AirCon Guys").save() 47 new PersonGroup(personGroupType:PersonGroupType.get(3), 48 name:"openMim").save() 51 49 52 50 //Person 53 51 new Person(personGroup:PersonGroup.get(1), 54 firstName:"FirstNameTech1",55 lastName:"LastNameTech1").save()52 firstName:"FirstNameTech1", 53 lastName:"LastNameTech1").save() 56 54 new Person(personGroup:PersonGroup.get(2), 57 firstName:"Joe", 58 lastName:"Samples").save() 55 firstName:"Joe", 56 lastName:"Samples").save() 57 58 //TaskGroup 59 new TaskGroup(name:"Engineering", 60 description:"Engineering task group").save() 61 new TaskGroup(name:"Production", 62 description:"Production task group").save() 63 new TaskGroup(name:"NewProject(s)", 64 description:" ").save() 65 66 67 //Task 68 new Task(taskGroup:TaskGroup.findByName("Engineering"), 69 person:Person.get(1), 70 name:"Check specific level sensor", 71 description:"Has been noted as problematic, try recallibrating", 72 scheduledDate: new Date(), 73 targetDate: new Date() ).save() 74 new Task(taskGroup:TaskGroup.findByName("Production"), 75 person:Person.get(2), 76 name:"Production Report", 77 description:"Production report for specific production run or shift", 78 scheduledDate: new Date(), 79 targetDate: new Date() ).save() 80 81 //EntryType 82 new EntryType(name:"Fault").save() 83 new EntryType(name:"WorkDone").save() 59 84 60 85 } -
trunk/src/grails-app/domain/Entry.groovy
r21 r25 2 2 Person person 3 3 Task task 4 Date dateTime 4 EntryType entryType 5 Date date 5 6 Integer duration 6 7 String comments … … 11 12 12 13 static constraints = { 13 person(blank:false) 14 task(blank:false) 15 dateTime(nullable:true) 16 duration(nullable:true) 17 comments(maxLength:500) 14 comments(maxSize:500) 18 15 } 19 16 } -
trunk/src/grails-app/domain/EntryType.groovy
r21 r25 1 1 class EntryType { 2 Entry entry3 2 String name 4 3 String description = "" 5 boolean isActive 4 boolean isActive = true 6 5 7 static belongsTo = Entry6 static hasMany = [entries: Entry] 8 7 9 8 static contstraints = { 10 entry()11 name(blank:false)12 description()13 isActive()14 9 } 15 10 -
trunk/src/grails-app/domain/ModificationType.groovy
r21 r25 7 7 8 8 static constraints = { 9 name()10 description()11 isActive()12 9 } 13 10 -
trunk/src/grails-app/domain/TaskGroup.groovy
r19 r25 2 2 String name 3 3 String description 4 boolean isActive 4 boolean isActive = true 5 5 6 6 static hasMany = [tasks : Task] -
trunk/src/grails-app/views/entry/create.gsp
r21 r25 29 29 <tr class="prop"> 30 30 <td valign="top" class="name"> 31 <label for="comments">Comments:</label> 32 </td> 33 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'comments','errors')}"> 34 <textarea rows="5" cols="40" name="comments">${fieldValue(bean:entryInstance, field:'comments')}</textarea> 35 </td> 36 </tr> 37 38 <tr class="prop"> 39 <td valign="top" class="name"> 40 <label for="date">Date:</label> 41 </td> 42 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'date','errors')}"> 43 <g:datePicker name="date" value="${entryInstance?.date}" ></g:datePicker> 44 </td> 45 </tr> 46 47 <tr class="prop"> 48 <td valign="top" class="name"> 49 <label for="duration">Duration:</label> 50 </td> 51 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'duration','errors')}"> 52 <input type="text" id="duration" name="duration" value="${fieldValue(bean:entryInstance,field:'duration')}" /> 53 </td> 54 </tr> 55 56 <tr class="prop"> 57 <td valign="top" class="name"> 58 <label for="entryType">Entry Type:</label> 59 </td> 60 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'entryType','errors')}"> 61 <g:select optionKey="id" from="${EntryType.list()}" name="entryType.id" value="${entryInstance?.entryType?.id}" ></g:select> 62 </td> 63 </tr> 64 65 <tr class="prop"> 66 <td valign="top" class="name"> 31 67 <label for="person">Person:</label> 32 68 </td> … … 45 81 </tr> 46 82 47 <tr class="prop">48 <td valign="top" class="name">49 <label for="dateTime">Date Time:</label>50 </td>51 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateTime','errors')}">52 <g:datePicker name="dateTime" value="${entryInstance?.dateTime}" noSelection="['':'']"></g:datePicker>53 </td>54 </tr>55 56 <tr class="prop">57 <td valign="top" class="name">58 <label for="duration">Duration:</label>59 </td>60 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'duration','errors')}">61 <input type="text" id="duration" name="duration" value="${fieldValue(bean:entryInstance,field:'duration')}" />62 </td>63 </tr>64 65 <tr class="prop">66 <td valign="top" class="name">67 <label for="comments">Comments:</label>68 </td>69 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'comments','errors')}">70 <input type="text" id="comments" name="comments" value="${fieldValue(bean:entryInstance,field:'comments')}"/>71 </td>72 </tr>73 74 83 </tbody> 75 84 </table> -
trunk/src/grails-app/views/entry/edit.gsp
r21 r25 31 31 <tr class="prop"> 32 32 <td valign="top" class="name"> 33 <label for=" person">Person:</label>33 <label for="comments">Comments:</label> 34 34 </td> 35 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:' person','errors')}">36 < g:select optionKey="id" from="${Person.list()}" name="person.id" value="${entryInstance?.person?.id}" ></g:select>35 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'comments','errors')}"> 36 <textarea rows="5" cols="40" name="comments">${fieldValue(bean:entryInstance, field:'comments')}</textarea> 37 37 </td> 38 38 </tr> … … 40 40 <tr class="prop"> 41 41 <td valign="top" class="name"> 42 <label for=" task">Task:</label>42 <label for="date">Date:</label> 43 43 </td> 44 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'task','errors')}"> 45 <g:select optionKey="id" from="${Task.list()}" name="task.id" value="${entryInstance?.task?.id}" ></g:select> 46 </td> 47 </tr> 48 49 <tr class="prop"> 50 <td valign="top" class="name"> 51 <label for="dateTime">Date Time:</label> 52 </td> 53 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateTime','errors')}"> 54 <g:datePicker name="dateTime" value="${entryInstance?.dateTime}" noSelection="['':'']"></g:datePicker> 44 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'date','errors')}"> 45 <g:datePicker name="date" value="${entryInstance?.date}" ></g:datePicker> 55 46 </td> 56 47 </tr> … … 67 58 <tr class="prop"> 68 59 <td valign="top" class="name"> 69 <label for=" comments">Comments:</label>60 <label for="entryType">Entry Type:</label> 70 61 </td> 71 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'comments','errors')}"> 72 <input type="text" id="comments" name="comments" value="${fieldValue(bean:entryInstance,field:'comments')}"/> 62 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'entryType','errors')}"> 63 <g:select optionKey="id" from="${EntryType.list()}" name="entryType.id" value="${entryInstance?.entryType?.id}" ></g:select> 64 </td> 65 </tr> 66 67 <tr class="prop"> 68 <td valign="top" class="name"> 69 <label for="person">Person:</label> 70 </td> 71 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'person','errors')}"> 72 <g:select optionKey="id" from="${Person.list()}" name="person.id" value="${entryInstance?.person?.id}" ></g:select> 73 73 </td> 74 74 </tr> … … 90 90 </tr> 91 91 92 <tr class="prop"> 93 <td valign="top" class="name"> 94 <label for="task">Task:</label> 95 </td> 96 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'task','errors')}"> 97 <g:select optionKey="id" from="${Task.list()}" name="task.id" value="${entryInstance?.task?.id}" ></g:select> 98 </td> 99 </tr> 100 92 101 </tbody> 93 102 </table> -
trunk/src/grails-app/views/entry/list.gsp
r21 r25 24 24 <g:sortableColumn property="id" title="Id" /> 25 25 26 <th>Person</th> 27 28 <th>Task</th> 29 30 <g:sortableColumn property="dateTime" title="Date Time" /> 26 <g:sortableColumn property="comments" title="Comments" /> 27 28 <g:sortableColumn property="date" title="Date" /> 31 29 32 30 <g:sortableColumn property="duration" title="Duration" /> 33 31 34 <g:sortableColumn property="comments" title="Comments" /> 35 32 <th>Entry Type</th> 33 34 <th>Person</th> 35 36 36 </tr> 37 37 </thead> … … 42 42 <td><g:link action="show" id="${entryInstance.id}">${fieldValue(bean:entryInstance, field:'id')}</g:link></td> 43 43 44 <td>${fieldValue(bean:entryInstance, field:' person')}</td>44 <td>${fieldValue(bean:entryInstance, field:'comments')}</td> 45 45 46 <td>${fieldValue(bean:entryInstance, field:'task')}</td> 47 48 <td>${fieldValue(bean:entryInstance, field:'dateTime')}</td> 46 <td>${fieldValue(bean:entryInstance, field:'date')}</td> 49 47 50 48 <td>${fieldValue(bean:entryInstance, field:'duration')}</td> 51 49 52 <td>${fieldValue(bean:entryInstance, field:'comments')}</td> 50 <td>${fieldValue(bean:entryInstance, field:'entryType')}</td> 51 52 <td>${fieldValue(bean:entryInstance, field:'person')}</td> 53 53 54 54 </tr> -
trunk/src/grails-app/views/entry/show.gsp
r21 r25 31 31 32 32 <tr class="prop"> 33 <td valign="top" class="name"> Person:</td>33 <td valign="top" class="name">Comments:</td> 34 34 35 <td valign="top" class="value"> <g:link controller="person" action="show" id="${entryInstance?.person?.id}">${entryInstance?.person?.encodeAsHTML()}</g:link></td>35 <td valign="top" class="value">${fieldValue(bean:entryInstance, field:'comments')}</td> 36 36 37 37 </tr> 38 38 39 39 <tr class="prop"> 40 <td valign="top" class="name"> Task:</td>40 <td valign="top" class="name">Date:</td> 41 41 42 <td valign="top" class="value"><g:link controller="task" action="show" id="${entryInstance?.task?.id}">${entryInstance?.task?.encodeAsHTML()}</g:link></td> 43 44 </tr> 45 46 <tr class="prop"> 47 <td valign="top" class="name">Date Time:</td> 48 49 <td valign="top" class="value">${fieldValue(bean:entryInstance, field:'dateTime')}</td> 42 <td valign="top" class="value">${fieldValue(bean:entryInstance, field:'date')}</td> 50 43 51 44 </tr> … … 59 52 60 53 <tr class="prop"> 61 <td valign="top" class="name"> Comments:</td>54 <td valign="top" class="name">Entry Type:</td> 62 55 63 <td valign="top" class="value">${fieldValue(bean:entryInstance, field:'comments')}</td> 56 <td valign="top" class="value"><g:link controller="entryType" action="show" id="${entryInstance?.entryType?.id}">${entryInstance?.entryType?.encodeAsHTML()}</g:link></td> 57 58 </tr> 59 60 <tr class="prop"> 61 <td valign="top" class="name">Person:</td> 62 63 <td valign="top" class="value"><g:link controller="person" action="show" id="${entryInstance?.person?.id}">${entryInstance?.person?.encodeAsHTML()}</g:link></td> 64 64 65 65 </tr> … … 69 69 70 70 <td valign="top" class="value">${fieldValue(bean:entryInstance, field:'persons')}</td> 71 72 </tr> 73 74 <tr class="prop"> 75 <td valign="top" class="name">Task:</td> 76 77 <td valign="top" class="value"><g:link controller="task" action="show" id="${entryInstance?.task?.id}">${entryInstance?.task?.encodeAsHTML()}</g:link></td> 71 78 72 79 </tr> -
trunk/src/grails-app/views/entryType/create.gsp
r22 r25 38 38 <tr class="prop"> 39 39 <td valign="top" class="name"> 40 <label for="entry">Entry:</label>41 </td>42 <td valign="top" class="value ${hasErrors(bean:entryTypeInstance,field:'entry','errors')}">43 <g:select optionKey="id" from="${Entry.list()}" name="entry.id" value="${entryTypeInstance?.entry?.id}" ></g:select>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> -
trunk/src/grails-app/views/entryType/edit.gsp
r22 r25 40 40 <tr class="prop"> 41 41 <td valign="top" class="name"> 42 <label for="entr y">Entry:</label>42 <label for="entries">Entries:</label> 43 43 </td> 44 <td valign="top" class="value ${hasErrors(bean:entryTypeInstance,field:'entry','errors')}"> 45 <g:select optionKey="id" from="${Entry.list()}" name="entry.id" value="${entryTypeInstance?.entry?.id}" ></g:select> 44 <td valign="top" class="value ${hasErrors(bean:entryTypeInstance,field:'entries','errors')}"> 45 46 <ul> 47 <g:each var="e" in="${entryTypeInstance?.entries?}"> 48 <li><g:link controller="entry" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li> 49 </g:each> 50 </ul> 51 <g:link controller="entry" params="['entryType.id':entryTypeInstance?.id]" action="create">Add Entry</g:link> 52 46 53 </td> 47 54 </tr> -
trunk/src/grails-app/views/entryType/list.gsp
r22 r25 26 26 <g:sortableColumn property="description" title="Description" /> 27 27 28 <th>Entry</th>29 30 28 <g:sortableColumn property="isActive" title="Is Active" /> 31 29 … … 41 39 42 40 <td>${fieldValue(bean:entryTypeInstance, field:'description')}</td> 43 44 <td>${fieldValue(bean:entryTypeInstance, field:'entry')}</td>45 41 46 42 <td>${fieldValue(bean:entryTypeInstance, field:'isActive')}</td> -
trunk/src/grails-app/views/entryType/show.gsp
r22 r25 38 38 39 39 <tr class="prop"> 40 <td valign="top" class="name">Entr y:</td>40 <td valign="top" class="name">Entries:</td> 41 41 42 <td valign="top" class="value"><g:link controller="entry" action="show" id="${entryTypeInstance?.entry?.id}">${entryTypeInstance?.entry?.encodeAsHTML()}</g:link></td> 42 <td valign="top" style="text-align:left;" class="value"> 43 <ul> 44 <g:each var="e" in="${entryTypeInstance.entries}"> 45 <li><g:link controller="entry" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li> 46 </g:each> 47 </ul> 48 </td> 43 49 44 50 </tr> -
trunk/src/grails-app/views/modificationType/create.gsp
r22 r25 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:modificationTypeInstance,field:'name','errors')}">34 <input type="text" id="name" name="name" value="${fieldValue(bean:modificationTypeInstance,field:'name')}"/>35 </td>36 </tr>37 38 <tr class="prop">39 <td valign="top" class="name">40 31 <label for="description">Description:</label> 41 32 </td> … … 54 45 </tr> 55 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:modificationTypeInstance,field:'name','errors')}"> 52 <input type="text" id="name" name="name" value="${fieldValue(bean:modificationTypeInstance,field:'name')}"/> 53 </td> 54 </tr> 55 56 56 </tbody> 57 57 </table> -
trunk/src/grails-app/views/modificationType/edit.gsp
r22 r25 28 28 <table> 29 29 <tbody> 30 31 <tr class="prop">32 <td valign="top" class="name">33 <label for="name">Name:</label>34 </td>35 <td valign="top" class="value ${hasErrors(bean:modificationTypeInstance,field:'name','errors')}">36 <input type="text" id="name" name="name" value="${fieldValue(bean:modificationTypeInstance,field:'name')}"/>37 </td>38 </tr>39 30 40 31 <tr class="prop"> … … 72 63 </tr> 73 64 65 <tr class="prop"> 66 <td valign="top" class="name"> 67 <label for="name">Name:</label> 68 </td> 69 <td valign="top" class="value ${hasErrors(bean:modificationTypeInstance,field:'name','errors')}"> 70 <input type="text" id="name" name="name" value="${fieldValue(bean:modificationTypeInstance,field:'name')}"/> 71 </td> 72 </tr> 73 74 74 </tbody> 75 75 </table> -
trunk/src/grails-app/views/modificationType/list.gsp
r22 r25 24 24 <g:sortableColumn property="id" title="Id" /> 25 25 26 <g:sortableColumn property="name" title="Name" />27 28 26 <g:sortableColumn property="description" title="Description" /> 29 27 30 28 <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="${modificationTypeInstance.id}">${fieldValue(bean:modificationTypeInstance, field:'id')}</g:link></td> 39 39 40 <td>${fieldValue(bean:modificationTypeInstance, field:'name')}</td>41 42 40 <td>${fieldValue(bean:modificationTypeInstance, field:'description')}</td> 43 41 44 42 <td>${fieldValue(bean:modificationTypeInstance, field:'isActive')}</td> 43 44 <td>${fieldValue(bean:modificationTypeInstance, field:'name')}</td> 45 45 46 46 </tr> -
trunk/src/grails-app/views/modificationType/show.gsp
r22 r25 31 31 32 32 <tr class="prop"> 33 <td valign="top" class="name">Name:</td>34 35 <td valign="top" class="value">${fieldValue(bean:modificationTypeInstance, field:'name')}</td>36 37 </tr>38 39 <tr class="prop">40 33 <td valign="top" class="name">Description:</td> 41 34 … … 64 57 </tr> 65 58 59 <tr class="prop"> 60 <td valign="top" class="name">Name:</td> 61 62 <td valign="top" class="value">${fieldValue(bean:modificationTypeInstance, field:'name')}</td> 63 64 </tr> 65 66 66 </tbody> 67 67 </table> -
trunk/src/grails-app/views/personGroup/create.gsp
r19 r25 56 56 <tr class="prop"> 57 57 <td valign="top" class="name"> 58 <label for=" typeOfPersonGroup">Type Of Person Group:</label>58 <label for="personGroupType">Person Group Type:</label> 59 59 </td> 60 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:' typeOfPersonGroup','errors')}">61 <g:select optionKey="id" from="${ TypeOfPersonGroup.list()}" name="typeOfPersonGroup.id" value="${personGroupInstance?.typeOfPersonGroup?.id}" ></g:select>60 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'personGroupType','errors')}"> 61 <g:select optionKey="id" from="${PersonGroupType.list()}" name="personGroupType.id" value="${personGroupInstance?.personGroupType?.id}" ></g:select> 62 62 </td> 63 63 </tr> -
trunk/src/grails-app/views/personGroup/edit.gsp
r19 r25 58 58 <tr class="prop"> 59 59 <td valign="top" class="name"> 60 <label for="personGroupType">Person Group Type:</label> 61 </td> 62 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'personGroupType','errors')}"> 63 <g:select optionKey="id" from="${PersonGroupType.list()}" name="personGroupType.id" value="${personGroupInstance?.personGroupType?.id}" ></g:select> 64 </td> 65 </tr> 66 67 <tr class="prop"> 68 <td valign="top" class="name"> 60 69 <label for="persons">Persons:</label> 61 70 </td> … … 72 81 </tr> 73 82 74 <tr class="prop">75 <td valign="top" class="name">76 <label for="typeOfPersonGroup">Type Of Person Group:</label>77 </td>78 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'typeOfPersonGroup','errors')}">79 <g:select optionKey="id" from="${TypeOfPersonGroup.list()}" name="typeOfPersonGroup.id" value="${personGroupInstance?.typeOfPersonGroup?.id}" ></g:select>80 </td>81 </tr>82 83 83 </tbody> 84 84 </table> -
trunk/src/grails-app/views/personGroup/list.gsp
r19 r25 30 30 <g:sortableColumn property="name" title="Name" /> 31 31 32 <th> Type Of Person Group</th>32 <th>Person Group Type</th> 33 33 34 34 </tr> … … 46 46 <td>${fieldValue(bean:personGroupInstance, field:'name')}</td> 47 47 48 <td>${fieldValue(bean:personGroupInstance, field:' typeOfPersonGroup')}</td>48 <td>${fieldValue(bean:personGroupInstance, field:'personGroupType')}</td> 49 49 50 50 </tr> -
trunk/src/grails-app/views/personGroup/show.gsp
r19 r25 52 52 53 53 <tr class="prop"> 54 <td valign="top" class="name">Person s:</td>54 <td valign="top" class="name">Person Group Type:</td> 55 55 56 <td valign="top" class="value"> ${fieldValue(bean:personGroupInstance, field:'persons')}</td>56 <td valign="top" class="value"><g:link controller="personGroupType" action="show" id="${personGroupInstance?.personGroupType?.id}">${personGroupInstance?.personGroupType?.encodeAsHTML()}</g:link></td> 57 57 58 58 </tr> 59 59 60 60 <tr class="prop"> 61 <td valign="top" class="name"> Type Of Person Group:</td>61 <td valign="top" class="name">Persons:</td> 62 62 63 <td valign="top" class="value"> <g:link controller="typeOfPersonGroup" action="show" id="${personGroupInstance?.typeOfPersonGroup?.id}">${personGroupInstance?.typeOfPersonGroup?.encodeAsHTML()}</g:link></td>63 <td valign="top" class="value">${fieldValue(bean:personGroupInstance, field:'persons')}</td> 64 64 65 65 </tr>
Note: See TracChangeset
for help on using the changeset viewer.