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:if test="${flash.message}"> |
---|
16 | <div class="message">${flash.message}</div> |
---|
17 | </g:if> |
---|
18 | <g:hasErrors bean="${assetInstance}"> |
---|
19 | <div class="errors"> |
---|
20 | <g:renderErrors bean="${assetInstance}" as="list" /> |
---|
21 | </div> |
---|
22 | </g:hasErrors> |
---|
23 | <g:form method="post" > |
---|
24 | <input type="hidden" name="id" value="${assetInstance?.id}" /> |
---|
25 | <input type="hidden" name="version" value="${assetInstance?.version}" /> |
---|
26 | <div class="dialog"> |
---|
27 | <table> |
---|
28 | <tbody> |
---|
29 | |
---|
30 | <tr class="prop"> |
---|
31 | <td valign="top" class="name"> |
---|
32 | <label for="name">Name:</label> |
---|
33 | </td> |
---|
34 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'name','errors')}"> |
---|
35 | <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:assetInstance,field:'name')}"/> |
---|
36 | </td> |
---|
37 | </tr> |
---|
38 | |
---|
39 | <tr class="prop"> |
---|
40 | <td valign="top" class="name"> |
---|
41 | <label for="description">Description:</label> |
---|
42 | </td> |
---|
43 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}"> |
---|
44 | <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/> |
---|
45 | </td> |
---|
46 | </tr> |
---|
47 | |
---|
48 | <tr class="prop"> |
---|
49 | <td valign="top" class="name"> |
---|
50 | <label for="isActive">Is Active:</label> |
---|
51 | </td> |
---|
52 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'isActive','errors')}"> |
---|
53 | <g:checkBox name="isActive" value="${assetInstance?.isActive}" ></g:checkBox> |
---|
54 | </td> |
---|
55 | </tr> |
---|
56 | |
---|
57 | <tr class="prop"> |
---|
58 | <td valign="top" class="name"> |
---|
59 | <label for="section">Section:</label> |
---|
60 | </td> |
---|
61 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'section','errors')}"> |
---|
62 | <g:select optionKey="id" from="${Section.list()}" name="section.id" value="${assetInstance?.section?.id}" ></g:select> |
---|
63 | </td> |
---|
64 | </tr> |
---|
65 | |
---|
66 | <tr class="prop"> |
---|
67 | <td valign="top" class="name"> |
---|
68 | <label for="assetExtendedAttributes">Asset Extended Attributes:</label> |
---|
69 | </td> |
---|
70 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetExtendedAttributes','errors')}"> |
---|
71 | |
---|
72 | <ul> |
---|
73 | <g:each var="a" in="${assetInstance?.assetExtendedAttributes?}"> |
---|
74 | <li><g:link controller="assetExtendedAttributeDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
75 | </g:each> |
---|
76 | </ul> |
---|
77 | <g:link controller="assetExtendedAttributeDetailed" params="['asset.id':assetInstance?.id]" action="create">Add AssetExtendedAttribute</g:link> |
---|
78 | |
---|
79 | </td> |
---|
80 | </tr> |
---|
81 | |
---|
82 | <tr class="prop"> |
---|
83 | <td valign="top" class="name"> |
---|
84 | <label for="assetSubItems">Asset Sub Items:</label> |
---|
85 | </td> |
---|
86 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetSubItems','errors')}"> |
---|
87 | <custom:checkBoxList name="assetSubItems" |
---|
88 | from="${AssetSubItem.list()}" |
---|
89 | value="${assetInstance?.assetSubItems.collect{it.id}}" |
---|
90 | optionKey="id" |
---|
91 | displayFields="['id', 'name']" |
---|
92 | linkController="assetSubItemDetailed" |
---|
93 | linkAction="show"/> |
---|
94 | |
---|
95 | </td> |
---|
96 | </tr> |
---|
97 | |
---|
98 | <tr class="prop"> |
---|
99 | <td valign="top" class="name"> |
---|
100 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
101 | </td> |
---|
102 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'maintenanceActions','errors')}"> |
---|
103 | |
---|
104 | <ul> |
---|
105 | <g:each var="m" in="${assetInstance?.maintenanceActions?}"> |
---|
106 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
107 | </g:each> |
---|
108 | </ul> |
---|
109 | <g:link controller="maintenanceActionDetailed" params="['asset.id':assetInstance?.id]" action="create">Add MaintenanceAction</g:link> |
---|
110 | |
---|
111 | </td> |
---|
112 | </tr> |
---|
113 | |
---|
114 | </tbody> |
---|
115 | </table> |
---|
116 | </div> |
---|
117 | <div class="buttons"> |
---|
118 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
119 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
120 | </div> |
---|
121 | </g:form> |
---|
122 | </div> |
---|
123 | </body> |
---|
124 | </html> |
---|