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="name"> |
---|
30 | <label for="name">Name:</label> |
---|
31 | </td> |
---|
32 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'name','errors')}"> |
---|
33 | <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:assetSubItemInstance,field:'name')}"/> |
---|
34 | </td> |
---|
35 | </tr> |
---|
36 | |
---|
37 | <tr class="prop"> |
---|
38 | <td valign="top" class="name"> |
---|
39 | <label for="description">Description:</label> |
---|
40 | </td> |
---|
41 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'description','errors')}"> |
---|
42 | <input type="text" class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:assetSubItemInstance,field:'description')}"/> |
---|
43 | </td> |
---|
44 | </tr> |
---|
45 | |
---|
46 | <tr class="prop"> |
---|
47 | <td valign="top" class="name"> |
---|
48 | <label for="comment">Comment:</label> |
---|
49 | </td> |
---|
50 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'comment','errors')}"> |
---|
51 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:assetSubItemInstance, field:'comment')}</textarea> |
---|
52 | </td> |
---|
53 | </tr> |
---|
54 | |
---|
55 | <tr class="prop"> |
---|
56 | <td valign="top" class="name"> |
---|
57 | <label for="isActive">Is Active:</label> |
---|
58 | </td> |
---|
59 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'isActive','errors')}"> |
---|
60 | <g:checkBox name="isActive" value="${assetSubItemInstance?.isActive}" ></g:checkBox> |
---|
61 | </td> |
---|
62 | </tr> |
---|
63 | |
---|
64 | <tr class="prop"> |
---|
65 | <td valign="top" class="name"> |
---|
66 | <label for="assetSubItemExtendedAttributes">Extended Attributes:</label> |
---|
67 | </td> |
---|
68 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'assetSubItemExtendedAttributes','errors')}"> |
---|
69 | |
---|
70 | <ul> |
---|
71 | <g:each var="a" in="${assetSubItemInstance?.assetSubItemExtendedAttributes?}"> |
---|
72 | <li><g:link controller="assetSubItemExtendedAttributeDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
73 | </g:each> |
---|
74 | </ul> |
---|
75 | <g:link controller="assetSubItemExtendedAttributeDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Extended Attribute</g:link> |
---|
76 | |
---|
77 | </td> |
---|
78 | </tr> |
---|
79 | |
---|
80 | <tr class="prop"> |
---|
81 | |
---|
82 | <tr class="prop"> |
---|
83 | <td valign="top" class="name"> |
---|
84 | <label for="parentItem">Parent Item:</label> |
---|
85 | </td> |
---|
86 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'parentItem','errors')}"> |
---|
87 | <g:if test="${assetSubItemInstance.assets}"> |
---|
88 | Assigned to assets. |
---|
89 | </g:if> |
---|
90 | <g:else> |
---|
91 | <g:select optionKey="id" from="${possibleParentItems}" name="parentItem.id" value="${assetSubItemInstance?.parentItem?.id}" noSelection="['null':'--None--']"></g:select> |
---|
92 | </g:else> |
---|
93 | </td> |
---|
94 | </tr> |
---|
95 | |
---|
96 | <tr class="prop"> |
---|
97 | <td valign="top" class="name">Assets:</td> |
---|
98 | |
---|
99 | <td valign="top" style="text-align:left;" class="value"> |
---|
100 | <g:if test="${assetSubItemInstance.parentItem}" > |
---|
101 | Assigned to parent item. |
---|
102 | </g:if> |
---|
103 | <g:else> |
---|
104 | <ul> |
---|
105 | <g:each var="a" in="${ assetSubItemInstance.assets.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
106 | <li><g:link controller="assetDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
107 | </g:each> |
---|
108 | </ul> |
---|
109 | </g:else> |
---|
110 | </td> |
---|
111 | |
---|
112 | </tr> |
---|
113 | |
---|
114 | <tr class="prop"> |
---|
115 | <td valign="top" class="name"> |
---|
116 | <label for="subItems">Sub Items:</label> |
---|
117 | </td> |
---|
118 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'subItems','errors')}"> |
---|
119 | |
---|
120 | <ul> |
---|
121 | <g:each var="s" in="${assetSubItemInstance?.subItems?}"> |
---|
122 | <li><g:link controller="assetSubItemDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
123 | </g:each> |
---|
124 | </ul> |
---|
125 | <g:link controller="assetSubItemDetailed" params="['parentItem.id':assetSubItemInstance?.id]" action="create">+Add Sub Item</g:link> |
---|
126 | |
---|
127 | </td> |
---|
128 | </tr> |
---|
129 | |
---|
130 | <tr class="prop"> |
---|
131 | <td valign="top" class="name"> |
---|
132 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
133 | </td> |
---|
134 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'maintenanceActions','errors')}"> |
---|
135 | |
---|
136 | <ul> |
---|
137 | <g:each var="m" in="${assetSubItemInstance?.maintenanceActions?}"> |
---|
138 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
139 | </g:each> |
---|
140 | </ul> |
---|
141 | <g:link controller="maintenanceActionDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Maintenance Action</g:link> |
---|
142 | |
---|
143 | </td> |
---|
144 | </tr> |
---|
145 | |
---|
146 | </tbody> |
---|
147 | </table> |
---|
148 | </div> |
---|
149 | <div class="buttons"> |
---|
150 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
151 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
152 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
153 | </div> |
---|
154 | </g:form> |
---|
155 | </div> |
---|
156 | </body> |
---|
157 | </html> |
---|