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

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

Update service, controller and view logic to hand Task and Entry highestSeverity.
Also remove associatedAssets from task search panes.

File size: 6.6 KB
Line 
1
2
3    <g:render template="/shared/messages" />
4    <g:hasErrors bean="${entryInstance}">
5        <div class="errors">
6            <g:renderErrors bean="${entryInstance}" as="list" />
7        </div>
8    </g:hasErrors>
9    <div class="pane_close">
10        <img  src="${resource(dir:'images/skin',file:'cross.png')}" alt="Close" title="Close"/>
11    </div>
12    <g:form action="ajaxSave" method="post" name="createEntryForm">
13        <g:hiddenField name="task.id" value="${entryInstance.task.id}" />
14        <g:hiddenField name="entryType.id" value="${entryInstance.entryType.id}" />
15        <div class="dialog">
16            <table>
17                <tbody>
18
19                    <g:if test="${entryInstance?.entryType?.id == 1}">
20                        <tr class="prop">
21                            <td valign="top" class="name">
22                                <label for="productionReference">Production:</label>
23                            </td>
24                            <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'productionReference','errors')}">
25                                <g:select optionKey="id"
26                                                    from="${ProductionReference.findAllByIsActive(true)}"
27                                                    name="productionReference.id"
28                                                    value="${entryInstance.productionReference?.id}"
29                                                    noSelection="['null':'--None--']">
30                                </g:select>
31                                <custom:helpBalloon code="entry.productionReference.fault" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
32                            </td>
33                        </tr>
34                    </g:if>
35
36                    <g:if test="${entryInstance?.entryType?.id == 6}">
37                        <tr class="prop">
38                            <td valign="top" class="name">
39                                <label for="highestSeverity">Condition Severity:</label>
40                            </td>
41                            <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'highestSeverity','errors')}">
42                                <g:select optionKey="id"
43                                                    from="${ConditionSeverity.findAllByIsActive(true)}"
44                                                    name="highestSeverity.id"
45                                                    value="${entryInstance.highestSeverity?.id}"
46                                                    noSelection="['null':/${g.message(code:'default.please.select.text')}/]" >
47                                </g:select>
48                                <custom:helpBalloon code="entry.comment.pm.entry" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
49                            </td>
50                        </tr>
51                    </g:if>
52
53                    <tr class="prop">
54                        <td valign="top" class="name">
55                            <label for="comment">${entryInstance?.entryType.encodeAsHTML()}:</label>
56                        </td>
57                        <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'comment','errors')}">
58                            <textarea rows="5" cols="40" name="comment">${fieldValue(bean:entryInstance, field:'comment')}</textarea>
59                            <g:if test="${entryInstance?.entryType?.id == 1}">
60                                <custom:helpBalloon code="entry.comment.fault" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
61                            </g:if>
62                            <g:elseif test="${entryInstance?.entryType?.id == 2}">
63                                <custom:helpBalloon code="entry.comment.cause" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
64                            </g:elseif>
65                            <g:elseif test="${entryInstance?.entryType?.id == 3}">
66                                <custom:helpBalloon code="entry.comment.work.done" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
67                            </g:elseif>
68                            <g:elseif test="${entryInstance?.entryType?.id == 6}">
69                                <custom:helpBalloon code="entry.comment.pm.entry" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
70                            </g:elseif>
71                        </td>
72                    </tr>
73
74                    <tr class="prop">
75                        <td valign="top" class="name">
76                            <label for="dateDone">Date Done:</label>
77                        </td>
78                        <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateDone','errors')}">
79                            <richui:dateChooser name="dateDone" format="dd-MM-yyyy" value="${entryInstance.dateDone}" />
80                            <custom:helpBalloon code="entry.date.done" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
81                        </td>
82                    </tr>
83
84                    <g:if test="${entryInstance?.entryType?.id != 2}">
85                        <tr class="prop">
86                            <td valign="top" class="name">
87                                <label for="durationHour">Duration:</label>
88                            </td>
89
90                            <td valign="top" class="value">
91                                <input class="time ${hasErrors(bean:entryInstance,field:'durationHour','errors')}"
92                                    type="text" id="durationHour" name="durationHour"
93                                    value="${fieldValue(bean:entryInstance,field:'durationHour')}" />
94                                :
95                                <input class="time ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}"
96                                    type="text" id="durationMinute" name="durationMinute"
97                                    value="${fieldValue(bean:entryInstance,field:'durationMinute')}" />
98                                <custom:helpBalloon code="entry.duration" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" />
99                            </td>
100                        </tr>
101                    </g:if>
102
103                </tbody>
104            </table>
105        </div>
106        <div class="buttons">
107            <span class="button"><input class="save" type="submit" value="Create" /></span>
108        </div>
109    </g:form>
Note: See TracBrowser for help on using the repository browser.