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>Edit Asset</title> |
---|
8 | <nav:resources override="true"/> |
---|
9 | </head> |
---|
10 | <body> |
---|
11 | <div class="nav"> |
---|
12 | <nav:renderSubItems group="nav"/> |
---|
13 | </div> |
---|
14 | <div class="body"> |
---|
15 | <g:render template="/shared/messages" /> |
---|
16 | <g:hasErrors bean="${assetInstance}"> |
---|
17 | <div class="errors"> |
---|
18 | <g:renderErrors bean="${assetInstance}" as="list" /> |
---|
19 | </div> |
---|
20 | </g:hasErrors> |
---|
21 | <g:form method="post" > |
---|
22 | <input type="hidden" name="id" value="${assetInstance?.id}" /> |
---|
23 | <input type="hidden" name="version" value="${assetInstance?.version}" /> |
---|
24 | <div class="dialog"> |
---|
25 | <table> |
---|
26 | <tbody> |
---|
27 | |
---|
28 | <tr class="prop"> |
---|
29 | <td valign="top" class="groupHeader"> |
---|
30 | <label for="name">Asset</label> |
---|
31 | </td> |
---|
32 | <td valign="top" class="value"> |
---|
33 | </td> |
---|
34 | </tr> |
---|
35 | |
---|
36 | <tr class="prop"> |
---|
37 | <td valign="top" class="groupName"> |
---|
38 | <label for="name">Name:</label> |
---|
39 | </td> |
---|
40 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'name','errors')}"> |
---|
41 | <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:assetInstance,field:'name')}"/> |
---|
42 | </td> |
---|
43 | </tr> |
---|
44 | |
---|
45 | <tr class="prop"> |
---|
46 | <td valign="top" class="groupName"> |
---|
47 | <label for="description">Description:</label> |
---|
48 | </td> |
---|
49 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}"> |
---|
50 | <input type="text" class="description" maxlength="100" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/> |
---|
51 | </td> |
---|
52 | </tr> |
---|
53 | |
---|
54 | <tr class="prop"> |
---|
55 | <td valign="top" class="groupName"> |
---|
56 | <label for="comment">Comment:</label> |
---|
57 | </td> |
---|
58 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'comment','errors')}"> |
---|
59 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:assetInstance, field:'comment')}</textarea> |
---|
60 | </td> |
---|
61 | </tr> |
---|
62 | |
---|
63 | <tr class="prop"> |
---|
64 | <td valign="top" class="groupName"> |
---|
65 | <label for="isActive">Is Active:</label> |
---|
66 | </td> |
---|
67 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'isActive','errors')}"> |
---|
68 | <g:checkBox name="isActive" value="${assetInstance?.isActive}" ></g:checkBox> |
---|
69 | </td> |
---|
70 | </tr> |
---|
71 | |
---|
72 | <tr class="prop"> |
---|
73 | <td valign="top" class="groupName"> |
---|
74 | <label for="section">Section:</label> |
---|
75 | </td> |
---|
76 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'section','errors')}"> |
---|
77 | <g:select optionKey="id" from="${Section.list()}" name="section.id" value="${assetInstance?.section?.id}" ></g:select> |
---|
78 | </td> |
---|
79 | </tr> |
---|
80 | |
---|
81 | <tr class="prop"> |
---|
82 | <td valign="top" class="groupHeader">Extended Attributes</td> |
---|
83 | <td valign="top" style="text-align:left;" class="value"> |
---|
84 | </td> |
---|
85 | </tr> |
---|
86 | |
---|
87 | <g:each var="a" in="${assetInstance.assetExtendedAttributes.sort { p1, p2 -> p1.extendedAttributeType.name.compareToIgnoreCase(p2.extendedAttributeType.name) }}"> |
---|
88 | <tr class="prop"> |
---|
89 | <td valign="top" class="groupName"> |
---|
90 | ${a.extendedAttributeType.name.encodeAsHTML()}: |
---|
91 | </td> |
---|
92 | |
---|
93 | <td valign="top" style="text-align:left;" class="value"> |
---|
94 | <g:link controller="assetExtendedAttributeDetailed" action="edit" id="${a.id}"> |
---|
95 | ${a.value.encodeAsHTML()} |
---|
96 | </g:link> |
---|
97 | </td> |
---|
98 | |
---|
99 | </tr> |
---|
100 | </g:each> |
---|
101 | |
---|
102 | <tr class="prop"> |
---|
103 | <td valign="top" class="name"></td> |
---|
104 | <td valign="top" style="text-align:left;" class="value"> |
---|
105 | <g:link controller="assetExtendedAttributeDetailed" params="['asset.id':assetInstance?.id]" action="create">+Add Extended Attribute</g:link> |
---|
106 | </td> |
---|
107 | </tr> |
---|
108 | |
---|
109 | <tr class="prop"> |
---|
110 | <td valign="top" class="groupHeader"> |
---|
111 | <label for="assetSubItems">Asset Tree</label> |
---|
112 | </td> |
---|
113 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetSubItems','errors')}"> |
---|
114 | </td> |
---|
115 | </tr> |
---|
116 | |
---|
117 | <tr class="prop"> |
---|
118 | <td valign="top" class="groupName"> |
---|
119 | Level 1 sub items: |
---|
120 | </td> |
---|
121 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetSubItems','errors')}"> |
---|
122 | <custom:checkBoxList name="assetSubItems" |
---|
123 | from="${possibleAssetSubItems}" |
---|
124 | value="${assetInstance?.assetSubItems.collect{it.id}}" |
---|
125 | optionKey="id" |
---|
126 | sortBy="name" |
---|
127 | linkController="assetSubItemDetailed" |
---|
128 | linkAction="show"/> |
---|
129 | |
---|
130 | </td> |
---|
131 | </tr> |
---|
132 | |
---|
133 | <tr class="prop"> |
---|
134 | <td valign="top" class="groupHeader">Life Plan</td> |
---|
135 | |
---|
136 | <td valign="top" style="text-align:left;" class="value"> |
---|
137 | </td> |
---|
138 | |
---|
139 | </tr> |
---|
140 | |
---|
141 | <g:each var="t" in="${parentPMs}"> |
---|
142 | <tr class="prop"> |
---|
143 | <td valign="top" class="name"></td> |
---|
144 | |
---|
145 | <td valign="top" style="text-align:left;" class="value"> |
---|
146 | <g:link controller="taskDetailed" action="show" id="${t.id}"> |
---|
147 | Task #${t.id} |
---|
148 | </g:link> |
---|
149 | <g:if test="${t.approved}" > |
---|
150 | <img src="${resource(dir:'images/skin',file:'cog.png')}" alt="Approved" title="Approved" /> |
---|
151 | </g:if> |
---|
152 | <g:if test="${t.taskRecurringSchedule?.enabled}" > |
---|
153 | <img src="${resource(dir:'images/skin',file:'arrow_refresh.png')}" alt="Recurrence Enabled" title="Recurrence Enabled" /> |
---|
154 | </g:if> |
---|
155 | <g:if test="${t.taskStatus.id == 2}" > |
---|
156 | <img src="${resource(dir:'images/skin',file:'arrow_right.png')}" alt="In Progress" title="In Progress" /> |
---|
157 | </g:if> |
---|
158 | <g:if test="${t.attentionFlag}" > |
---|
159 | <img src="${resource(dir:'images/skin',file:'flag_red.png')}" alt="Attention Flag" title="Attention Flag" /> |
---|
160 | </g:if> |
---|
161 | <g:if test="${t.taskStatus.id == 3}" > |
---|
162 | <img src="${resource(dir:'images/skin',file:'tick.png')}" alt="Complete" title="Complete" /> |
---|
163 | </g:if> |
---|
164 | <br /> |
---|
165 | ${fieldValue(bean:t, field:'description')} |
---|
166 | <br /> |
---|
167 | <g:if test="${t.safetyRequirement}" > |
---|
168 | <img src="${resource(dir:'images/skin',file:'lightning.png')}" alt="Safety Requirement" title="Safety Requirement" /> |
---|
169 | Safety |
---|
170 | </g:if> |
---|
171 | <g:if test="${t.regulatoryRequirement}" > |
---|
172 | <img src="${resource(dir:'images/skin',file:'script_lightning.png')}" alt="Regulatory Requirement" title="Regulatory Requirement" /> |
---|
173 | Regulatory |
---|
174 | </g:if> |
---|
175 | <g:if test="${t.mandatoryRequirement}" > |
---|
176 | <img src="${resource(dir:'images/skin',file:'script.png')}" alt="Mandatory Requirement" title="Mandatory Requirement" /> |
---|
177 | Mandatory |
---|
178 | </g:if> |
---|
179 | </td> |
---|
180 | |
---|
181 | </tr> |
---|
182 | </g:each> |
---|
183 | |
---|
184 | <tr class="prop"> |
---|
185 | <td valign="top" class="name"></td> |
---|
186 | <td valign="top" style="text-align:left;" class="value"> |
---|
187 | <g:link controller="taskDetailed" params="['primaryAsset.id':assetInstance?.id, 'taskType.id':6]" action="create">+Add ParentPM</g:link> |
---|
188 | </td> |
---|
189 | </tr> |
---|
190 | |
---|
191 | </tbody> |
---|
192 | </table> |
---|
193 | </div> |
---|
194 | <div class="buttons"> |
---|
195 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
196 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
197 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
198 | </div> |
---|
199 | </g:form> |
---|
200 | </div> |
---|
201 | </body> |
---|
202 | </html> |
---|