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 | </head> |
---|
9 | <body> |
---|
10 | <div class="nav"> |
---|
11 | <span class="menuButton"><g:link class="list" action="search">Sub Item Search</g:link></span> |
---|
12 | </div> |
---|
13 | <div class="body"> |
---|
14 | <h1>Edit Sub Item</h1> |
---|
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">Asset Sub Item 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 AssetSubItemExtendedAttribute</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="maintenanceActions">Maintenance Actions:</label> |
---|
85 | </td> |
---|
86 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'maintenanceActions','errors')}"> |
---|
87 | |
---|
88 | <ul> |
---|
89 | <g:each var="m" in="${assetSubItemInstance?.maintenanceActions?}"> |
---|
90 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
91 | </g:each> |
---|
92 | </ul> |
---|
93 | <g:link controller="maintenanceActionDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">Add MaintenanceAction</g:link> |
---|
94 | |
---|
95 | </td> |
---|
96 | </tr> |
---|
97 | |
---|
98 | |
---|
99 | <tr class="prop"> |
---|
100 | <td valign="top" class="name"> |
---|
101 | <label for="parentItem">Parent Item:</label> |
---|
102 | </td> |
---|
103 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'parentItem','errors')}"> |
---|
104 | <g:if test="${assetSubItemInstance.assets}"> |
---|
105 | Assigned to assets. |
---|
106 | </g:if> |
---|
107 | <g:else> |
---|
108 | <g:select optionKey="id" from="${possibleParentItems}" name="parentItem.id" value="${assetSubItemInstance?.parentItem?.id}" noSelection="['null':'--None--']"></g:select> |
---|
109 | </g:else> |
---|
110 | </td> |
---|
111 | </tr> |
---|
112 | |
---|
113 | <tr class="prop"> |
---|
114 | <td valign="top" class="name">Assets:</td> |
---|
115 | |
---|
116 | <td valign="top" style="text-align:left;" class="value"> |
---|
117 | <ul> |
---|
118 | <g:each var="a" in="${assetSubItemInstance.assets}"> |
---|
119 | <li><g:link controller="assetDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
120 | </g:each> |
---|
121 | </ul> |
---|
122 | </td> |
---|
123 | |
---|
124 | </tr> |
---|
125 | |
---|
126 | <tr class="prop"> |
---|
127 | <td valign="top" class="name"> |
---|
128 | <label for="subItems">Sub Items:</label> |
---|
129 | </td> |
---|
130 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'subItems','errors')}"> |
---|
131 | |
---|
132 | <ul> |
---|
133 | <g:each var="s" in="${assetSubItemInstance?.subItems?}"> |
---|
134 | <li><g:link controller="assetSubItemDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
135 | </g:each> |
---|
136 | </ul> |
---|
137 | <g:link controller="assetSubItemDetailed" params="['parentItem.id':assetSubItemInstance?.id]" action="create">Add AssetSubItem</g:link> |
---|
138 | |
---|
139 | </td> |
---|
140 | </tr> |
---|
141 | |
---|
142 | </tbody> |
---|
143 | </table> |
---|
144 | </div> |
---|
145 | <div class="buttons"> |
---|
146 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
147 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
148 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
149 | </div> |
---|
150 | </g:form> |
---|
151 | </div> |
---|
152 | </body> |
---|
153 | </html> |
---|