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