source: trunk/grails-app/views/entryDetailed/_create.gsp @ 830

Last change on this file since 830 was 830, checked in by gav, 13 years ago

Use custom version of helpBalloon taglib in entry create template.

File size: 5.1 KB
Line 
1
2    <g:form action="save" method="post" >
3        <g:hiddenField name="task.id" value="${entryInstance.task.id}" />
4        <g:hiddenField name="entryType.id" value="${entryInstance.entryType.id}" />
5        <div class="dialog">
6            <table>
7                <tbody>
8
9                    <tr class="prop">
10                        <td valign="top" class="name">
11                            <label for="comment">${entryInstance?.entryType.encodeAsHTML()}:</label>
12                        </td>
13                        <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'comment','errors')}">
14                            <textarea rows="5" cols="40" name="comment">${fieldValue(bean:entryInstance, field:'comment')}</textarea>
15                            <g:if test="${entryInstance?.entryType?.id == 1}">
16                                <custom:helpBalloon code="entry.comment.fault" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
17                            </g:if>
18                            <g:elseif test="${entryInstance?.entryType?.id == 2}">
19                                <custom:helpBalloon code="entry.comment.cause" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
20                            </g:elseif>
21                            <g:elseif test="${entryInstance?.entryType?.id == 3}">
22                                <custom:helpBalloon code="entry.comment.work.done" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
23                            </g:elseif>
24                            <g:elseif test="${entryInstance?.entryType?.id == 6}">
25                                <custom:helpBalloon code="entry.comment.pm.entry" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
26                            </g:elseif>
27                        </td>
28                    </tr>
29
30                    <tr class="prop">
31                        <td valign="top" class="name">
32                            <label for="dateDone">Date Done:</label>
33                        </td>
34                        <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateDone','errors')}">
35                            <richui:dateChooser name="dateDone" format="dd-MM-yyyy" value="${entryInstance.dateDone}" />
36                            <custom:helpBalloon code="entry.date.done" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
37                        </td>
38                    </tr>
39
40                    <g:if test="${entryInstance?.entryType?.id == 1}">
41                        <tr class="prop">
42                            <td valign="top" class="name">
43                                <label for="productionReference">Production:</label>
44                            </td>
45                            <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'productionReference','errors')}">
46                                <g:select optionKey="id"
47                                                    from="${ProductionReference.findAllByIsActive(true)}"
48                                                    name="productionReference.id"
49                                                    value="${entryInstance.productionReference?.id}"
50                                                    noSelection="['null':'--None--']">
51                                </g:select>
52                                <custom:helpBalloon code="entry.productionReference.fault" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
53                            </td>
54                        </tr>
55                    </g:if>
56
57                    <g:if test="${entryInstance?.entryType?.id != 2}">
58                        <tr class="prop">
59                            <td valign="top" class="name">
60                                <label for="durationHour">Duration:</label>
61                            </td>
62
63                            <td valign="top" class="value">
64                                <input class="time ${hasErrors(bean:entryInstance,field:'durationHour','errors')}"
65                                    type="text" id="durationHour" name="durationHour"
66                                    value="${fieldValue(bean:entryInstance,field:'durationHour')}" />
67                                :
68                                <input class="time ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}"
69                                    type="text" id="durationMinute" name="durationMinute"
70                                    value="${fieldValue(bean:entryInstance,field:'durationMinute')}" />
71                                <custom:helpBalloon code="entry.duration" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
72                            </td>
73                        </tr>
74                    </g:if>
75
76                </tbody>
77            </table>
78        </div>
79        <div class="buttons">
80            <span class="button"><input class="save" type="submit" value="Create" /></span>
81        </div>
82    </g:form>
Note: See TracBrowser for help on using the repository browser.