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 AssetSubItem</title> |
---|
8 | <nav:resources override="true"/> |
---|
9 | </head> |
---|
10 | <body> |
---|
11 | <div class="nav"> |
---|
12 | <nav:renderSubItems group="navAlt"/> |
---|
13 | </div> |
---|
14 | <div class="body"> |
---|
15 | <g:render template="/shared/messages" /> |
---|
16 | <g:hasErrors bean="${assetSubItemInstance}"> |
---|
17 | <div class="errors"> |
---|
18 | <g:renderErrors bean="${assetSubItemInstance}" as="list" /> |
---|
19 | </div> |
---|
20 | </g:hasErrors> |
---|
21 | <g:form method="post" > |
---|
22 | <input type="hidden" name="id" value="${assetSubItemInstance?.id}" /> |
---|
23 | <input type="hidden" name="version" value="${assetSubItemInstance?.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 Sub Item</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:assetSubItemInstance,field:'name','errors')}"> |
---|
41 | <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:assetSubItemInstance,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:assetSubItemInstance,field:'description','errors')}"> |
---|
50 | <input type="text" class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:assetSubItemInstance,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:assetSubItemInstance,field:'comment','errors')}"> |
---|
59 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:assetSubItemInstance, 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:assetSubItemInstance,field:'isActive','errors')}"> |
---|
68 | <g:checkBox name="isActive" value="${assetSubItemInstance?.isActive}" ></g:checkBox> |
---|
69 | </td> |
---|
70 | </tr> |
---|
71 | |
---|
72 | <tr class="prop"> |
---|
73 | <td valign="top" class="groupHeader">Extended Attributes</td> |
---|
74 | <td valign="top" style="text-align:left;" class="value"> |
---|
75 | </td> |
---|
76 | </tr> |
---|
77 | |
---|
78 | <g:each var="a" in="${assetSubItemInstance.assetSubItemExtendedAttributes.sort { p1, p2 -> p1.extendedAttributeType.name.compareToIgnoreCase(p2.extendedAttributeType.name) }}"> |
---|
79 | <tr class="prop"> |
---|
80 | <td valign="top" class="groupName"> |
---|
81 | ${a.extendedAttributeType.name.encodeAsHTML()}: |
---|
82 | </td> |
---|
83 | |
---|
84 | <td valign="top" style="text-align:left;" class="value"> |
---|
85 | <g:link controller="assetSubItemExtendedAttributeDetailed" action="edit" id="${a.id}"> |
---|
86 | ${a.value.encodeAsHTML()} |
---|
87 | </g:link> |
---|
88 | </td> |
---|
89 | |
---|
90 | </tr> |
---|
91 | </g:each> |
---|
92 | |
---|
93 | <tr class="prop"> |
---|
94 | <td valign="top" class="name"> |
---|
95 | </td> |
---|
96 | <td valign="top" style="text-align:left;" class="value"> |
---|
97 | <g:link controller="assetSubItemExtendedAttributeDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Extended Attribute</g:link> |
---|
98 | </td> |
---|
99 | </tr> |
---|
100 | |
---|
101 | <tr class="prop"> |
---|
102 | |
---|
103 | <tr class="prop"> |
---|
104 | <td valign="top" class="groupHeader"> |
---|
105 | <label for="name">Asset Tree</label> |
---|
106 | </td> |
---|
107 | <td valign="top" class="value"> |
---|
108 | </td> |
---|
109 | </tr> |
---|
110 | |
---|
111 | <tr class="prop"> |
---|
112 | <td valign="top" class="groupName">Assets:</td> |
---|
113 | |
---|
114 | <td valign="top" style="text-align:left;" class="value"> |
---|
115 | <g:if test="${assetSubItemInstance.parentItem}" > |
---|
116 | N/A (Assigned to parent item) |
---|
117 | </g:if> |
---|
118 | <g:else> |
---|
119 | <g:if test="${assetSubItemInstance.assets}"> |
---|
120 | <ul> |
---|
121 | <g:each var="a" in="${ assetSubItemInstance.assets.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
122 | <li><g:link controller="assetDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
123 | </g:each> |
---|
124 | </ul> |
---|
125 | </g:if> |
---|
126 | <g:else> |
---|
127 | May be assigned via asset edit view. |
---|
128 | </g:else> |
---|
129 | </g:else> |
---|
130 | </td> |
---|
131 | |
---|
132 | </tr> |
---|
133 | |
---|
134 | <tr class="prop"> |
---|
135 | <td valign="top" class="groupName"> |
---|
136 | <label for="parentItem">Parent Item:</label> |
---|
137 | </td> |
---|
138 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'parentItem','errors')}"> |
---|
139 | <g:if test="${assetSubItemInstance.assets}"> |
---|
140 | Level 1 sub item (Assigned directly to assets) |
---|
141 | </g:if> |
---|
142 | <g:else> |
---|
143 | <g:select optionKey="id" from="${possibleParentItems}" name="parentItem.id" value="${assetSubItemInstance?.parentItem?.id}" noSelection="['null':'--None--']"></g:select> |
---|
144 | </g:else> |
---|
145 | </td> |
---|
146 | </tr> |
---|
147 | |
---|
148 | <tr class="prop"> |
---|
149 | <td valign="top" class="groupName"> |
---|
150 | <label for="subItems">Sub Items:</label> |
---|
151 | </td> |
---|
152 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'subItems','errors')}"> |
---|
153 | |
---|
154 | <ul> |
---|
155 | <g:each var="s" in="${assetSubItemInstance?.subItems?}"> |
---|
156 | <li><g:link controller="assetSubItemDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
157 | </g:each> |
---|
158 | </ul> |
---|
159 | <g:link controller="assetSubItemDetailed" params="['parentItem.id':assetSubItemInstance?.id]" action="create">+Add Sub Item</g:link> |
---|
160 | |
---|
161 | </td> |
---|
162 | </tr> |
---|
163 | |
---|
164 | <tr class="prop"> |
---|
165 | <td valign="top" class="groupHeader"> |
---|
166 | <label for="name">Maintenance Actions</label> |
---|
167 | </td> |
---|
168 | <td valign="top" class="value"> |
---|
169 | </td> |
---|
170 | </tr> |
---|
171 | |
---|
172 | <g:each var="m" in="${assetSubItemInstance?.maintenanceActions?}"> |
---|
173 | <tr class="prop"> |
---|
174 | <td valign="top" class="name"> |
---|
175 | </td> |
---|
176 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'maintenanceActions','errors')}"> |
---|
177 | <g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
178 | </td> |
---|
179 | </tr> |
---|
180 | </g:each> |
---|
181 | |
---|
182 | <tr class="prop"> |
---|
183 | <td valign="top" class="groupHeader"> |
---|
184 | </td> |
---|
185 | <td valign="top" class="value"> |
---|
186 | <g:link controller="maintenanceActionDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Maintenance Action</g:link> |
---|
187 | </td> |
---|
188 | </tr> |
---|
189 | |
---|
190 | </tbody> |
---|
191 | </table> |
---|
192 | </div> |
---|
193 | <div class="buttons"> |
---|
194 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
195 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
196 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
197 | </div> |
---|
198 | </g:form> |
---|
199 | </div> |
---|
200 | </body> |
---|
201 | </html> |
---|