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="hasRegulatoryRequirements">Has Regulatory Requirements:</label> |
---|
75 | </td> |
---|
76 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'hasRegulatoryRequirements','errors')}"> |
---|
77 | <g:checkBox name="hasRegulatoryRequirements" value="${assetInstance?.hasRegulatoryRequirements}" ></g:checkBox> |
---|
78 | </td> |
---|
79 | </tr> |
---|
80 | |
---|
81 | <tr class="prop"> |
---|
82 | <td valign="top" class="groupName"> |
---|
83 | <label for="section">Section:</label> |
---|
84 | </td> |
---|
85 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'section','errors')}"> |
---|
86 | <g:select optionKey="id" from="${Section.list()}" name="section.id" value="${assetInstance?.section?.id}" ></g:select> |
---|
87 | </td> |
---|
88 | </tr> |
---|
89 | |
---|
90 | <tr class="prop"> |
---|
91 | <td valign="top" class="groupHeader">Extended Attributes</td> |
---|
92 | <td valign="top" style="text-align:left;" class="value"> |
---|
93 | </td> |
---|
94 | </tr> |
---|
95 | |
---|
96 | <g:each var="a" in="${assetInstance.assetExtendedAttributes.sort { p1, p2 -> p1.extendedAttributeType.name.compareToIgnoreCase(p2.extendedAttributeType.name) }}"> |
---|
97 | <tr class="prop"> |
---|
98 | <td valign="top" class="groupName"> |
---|
99 | ${a.extendedAttributeType.name.encodeAsHTML()}: |
---|
100 | </td> |
---|
101 | |
---|
102 | <td valign="top" style="text-align:left;" class="value"> |
---|
103 | <g:link controller="assetExtendedAttributeDetailed" action="edit" id="${a.id}"> |
---|
104 | ${a.value.encodeAsHTML()} |
---|
105 | </g:link> |
---|
106 | </td> |
---|
107 | |
---|
108 | </tr> |
---|
109 | </g:each> |
---|
110 | |
---|
111 | <tr class="prop"> |
---|
112 | <td valign="top" class="name"></td> |
---|
113 | <td valign="top" style="text-align:left;" class="value"> |
---|
114 | <g:link controller="assetExtendedAttributeDetailed" params="['asset.id':assetInstance?.id]" action="create">+Add Extended Attribute</g:link> |
---|
115 | </td> |
---|
116 | </tr> |
---|
117 | |
---|
118 | <tr class="prop"> |
---|
119 | <td valign="top" class="groupHeader"> |
---|
120 | <label for="assetSubItems">Asset Tree</label> |
---|
121 | </td> |
---|
122 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetSubItems','errors')}"> |
---|
123 | </td> |
---|
124 | </tr> |
---|
125 | |
---|
126 | <tr class="prop"> |
---|
127 | <td valign="top" class="groupName"> |
---|
128 | Level 1 sub items: |
---|
129 | </td> |
---|
130 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetSubItems','errors')}"> |
---|
131 | <custom:checkBoxList name="assetSubItems" |
---|
132 | from="${possibleAssetSubItems}" |
---|
133 | value="${assetInstance?.assetSubItems.collect{it.id}}" |
---|
134 | optionKey="id" |
---|
135 | sortBy="name" |
---|
136 | linkController="assetSubItemDetailed" |
---|
137 | linkAction="show"/> |
---|
138 | |
---|
139 | </td> |
---|
140 | </tr> |
---|
141 | |
---|
142 | <tr class="prop"> |
---|
143 | <td valign="top" class="groupHeader"> |
---|
144 | <label for="maintenanceActions">Maintenance Actions</label> |
---|
145 | </td> |
---|
146 | <td valign="top" class="value"> |
---|
147 | </td> |
---|
148 | </tr> |
---|
149 | |
---|
150 | <g:each var="m" in="${assetInstance?.maintenanceActions?}"> |
---|
151 | <tr class="prop"> |
---|
152 | <td valign="top" class="name"> |
---|
153 | </td> |
---|
154 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'maintenanceActions','errors')}"> |
---|
155 | <g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link> |
---|
156 | </td> |
---|
157 | </tr> |
---|
158 | </g:each> |
---|
159 | |
---|
160 | <tr class="prop"> |
---|
161 | <td valign="top" class="name"></td> |
---|
162 | <td valign="top" style="text-align:left;" class="value"> |
---|
163 | <g:link controller="maintenanceActionDetailed" params="['asset.id':assetInstance?.id]" action="create">+Add Maintenance Action</g:link> |
---|
164 | </td> |
---|
165 | </tr> |
---|
166 | |
---|
167 | </tbody> |
---|
168 | </table> |
---|
169 | </div> |
---|
170 | <div class="buttons"> |
---|
171 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
172 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
173 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
174 | </div> |
---|
175 | </g:form> |
---|
176 | </div> |
---|
177 | </body> |
---|
178 | </html> |
---|