source: trunk/grails-app/views/entryDetailed/create.gsp @ 431

Last change on this file since 431 was 431, checked in by gav, 14 years ago

Add ProductionReference.
Add ProductionManager and ProductionUser roles.
Update immediate callout help definitions, roll errors into one ul.
Add help definitions for resolved and unresolved.

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