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