[92] | 1 | |
---|
| 2 | |
---|
| 3 | <html> |
---|
| 4 | <head> |
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
| 6 | <meta name="layout" content="main" /> |
---|
[147] | 7 | <title>Create Entry</title> |
---|
| 8 | <nav:resources override="true"/> |
---|
| 9 | <resource:dateChooser /> |
---|
[92] | 10 | </head> |
---|
| 11 | <body> |
---|
| 12 | <div class="nav"> |
---|
[147] | 13 | <h1>Create Entry</h1> |
---|
[92] | 14 | </div> |
---|
| 15 | <div class="body"> |
---|
[482] | 16 | <g:render template="/shared/messages" /> |
---|
[92] | 17 | <g:hasErrors bean="${entryInstance}"> |
---|
| 18 | <div class="errors"> |
---|
| 19 | <g:renderErrors bean="${entryInstance}" as="list" /> |
---|
| 20 | </div> |
---|
| 21 | </g:hasErrors> |
---|
| 22 | <g:form action="save" method="post" > |
---|
| 23 | <g:hiddenField name="task.id" value="${entryInstance.task.id}" /> |
---|
[191] | 24 | <g:hiddenField name="entryType.id" value="${entryInstance.entryType.id}" /> |
---|
[92] | 25 | <div class="dialog"> |
---|
| 26 | <table> |
---|
| 27 | <tbody> |
---|
| 28 | |
---|
| 29 | <tr class="prop"> |
---|
| 30 | <td valign="top" class="name"> |
---|
| 31 | <label for="task">Task:</label> |
---|
| 32 | </td> |
---|
| 33 | <td valign="top" class="name"> |
---|
[191] | 34 | <g:link controller="taskDetailed" action="show" id="${entryInstance.task.id}" > |
---|
[218] | 35 | ${entryInstance?.task.encodeAsHTML()} |
---|
[191] | 36 | </g:link> |
---|
[92] | 37 | </td> |
---|
[191] | 38 | </tr> |
---|
[92] | 39 | |
---|
| 40 | <tr class="prop"> |
---|
| 41 | <td valign="top" class="name"> |
---|
[230] | 42 | <label for="comment">${entryInstance?.entryType.encodeAsHTML()}:</label> |
---|
[92] | 43 | </td> |
---|
| 44 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'comment','errors')}"> |
---|
[98] | 45 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:entryInstance, field:'comment')}</textarea> |
---|
[230] | 46 | <g:if test="${entryInstance?.entryType?.id == 1}"> |
---|
| 47 | <g:helpBalloon code="entry.comment.fault" /> |
---|
| 48 | </g:if> |
---|
| 49 | <g:elseif test="${entryInstance?.entryType?.id == 2}"> |
---|
[432] | 50 | <g:helpBalloon code="entry.comment.cause" /> |
---|
| 51 | </g:elseif> |
---|
| 52 | <g:elseif test="${entryInstance?.entryType?.id == 3}"> |
---|
[230] | 53 | <g:helpBalloon code="entry.comment.work.done" /> |
---|
| 54 | </g:elseif> |
---|
[92] | 55 | </td> |
---|
[230] | 56 | </tr> |
---|
[92] | 57 | |
---|
| 58 | <tr class="prop"> |
---|
| 59 | <td valign="top" class="name"> |
---|
| 60 | <label for="dateDone">Date Done:</label> |
---|
| 61 | </td> |
---|
| 62 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateDone','errors')}"> |
---|
[431] | 63 | <richui:dateChooser name="dateDone" format="dd-MM-yyyy" value="${entryInstance.dateDone}" /> |
---|
[230] | 64 | <g:helpBalloon code="entry.date.done" /> |
---|
[92] | 65 | </td> |
---|
[230] | 66 | </tr> |
---|
[431] | 67 | |
---|
| 68 | <g:if test="${entryInstance?.entryType?.id == 1}"> |
---|
| 69 | <tr class="prop"> |
---|
| 70 | <td valign="top" class="name"> |
---|
| 71 | <label for="productionReference">Production:</label> |
---|
| 72 | </td> |
---|
| 73 | <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'productionReference','errors')}"> |
---|
| 74 | <g:select optionKey="id" |
---|
| 75 | from="${ProductionReference.findAllByIsActive(true)}" |
---|
| 76 | name="productionReference.id" |
---|
| 77 | value="${entryInstance.productionReference?.id}" |
---|
| 78 | noSelection="['null':'--None--']"> |
---|
| 79 | </g:select> |
---|
| 80 | <g:helpBalloon code="entry.productionReference.fault" /> |
---|
| 81 | </td> |
---|
| 82 | </tr> |
---|
| 83 | </g:if> |
---|
[92] | 84 | |
---|
[432] | 85 | <g:if test="${entryInstance?.entryType?.id != 2}"> |
---|
| 86 | <tr class="prop"> |
---|
| 87 | <td valign="top" class="name"> |
---|
| 88 | <label for="durationHour">Duration:</label> |
---|
| 89 | </td> |
---|
| 90 | |
---|
| 91 | <td valign="top" class="value"> |
---|
| 92 | <input class="time ${hasErrors(bean:entryInstance,field:'durationHour','errors')}" |
---|
| 93 | type="text" id="durationHour" name="durationHour" |
---|
| 94 | value="${fieldValue(bean:entryInstance,field:'durationHour')}" /> |
---|
| 95 | : |
---|
| 96 | <input class="time ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}" |
---|
| 97 | type="text" id="durationMinute" name="durationMinute" |
---|
| 98 | value="${fieldValue(bean:entryInstance,field:'durationMinute')}" /> |
---|
| 99 | <g:helpBalloon code="entry.duration" /> |
---|
| 100 | </td> |
---|
| 101 | </tr> |
---|
| 102 | </g:if> |
---|
[92] | 103 | |
---|
| 104 | </tbody> |
---|
| 105 | </table> |
---|
| 106 | </div> |
---|
| 107 | <div class="buttons"> |
---|
| 108 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 109 | </div> |
---|
| 110 | </g:form> |
---|
| 111 | </div> |
---|
| 112 | </body> |
---|
| 113 | </html> |
---|