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="name"> |
---|
30 | <label for="name">Name:</label> |
---|
31 | </td> |
---|
32 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'name','errors')}"> |
---|
33 | <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:assetInstance,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:assetInstance,field:'description','errors')}"> |
---|
42 | <input type="text" class="description" maxlength="100" id="description" name="description" value="${fieldValue(bean:assetInstance,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:assetInstance,field:'comment','errors')}"> |
---|
51 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:assetInstance, 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:assetInstance,field:'isActive','errors')}"> |
---|
60 | <g:checkBox name="isActive" value="${assetInstance?.isActive}" ></g:checkBox> |
---|
61 | </td> |
---|
62 | </tr> |
---|
63 | |
---|
64 | <tr class="prop"> |
---|
65 | <td valign="top" class="name"> |
---|
66 | <label for="section">Section:</label> |
---|
67 | </td> |
---|
68 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'section','errors')}"> |
---|
69 | <g:select optionKey="id" from="${Section.list()}" name="section.id" value="${assetInstance?.section?.id}" ></g:select> |
---|
70 | </td> |
---|
71 | </tr> |
---|
72 | |
---|
73 | <tr class="prop"> |
---|
74 | <td valign="top" class="name"> |
---|
75 | <label for="assetExtendedAttributes">Asset Extended Attributes:</label> |
---|
76 | </td> |
---|
77 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetExtendedAttributes','errors')}"> |
---|
78 | |
---|
79 | <ul> |
---|
80 | <g:each var="a" in="${assetInstance?.assetExtendedAttributes?}"> |
---|
81 | <li><g:link controller="assetExtendedAttributeDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
82 | </g:each> |
---|
83 | </ul> |
---|
84 | <g:link controller="assetExtendedAttributeDetailed" params="['asset.id':assetInstance?.id]" action="create">+Add Extended Attribute</g:link> |
---|
85 | |
---|
86 | </td> |
---|
87 | </tr> |
---|
88 | |
---|
89 | <tr class="prop"> |
---|
90 | <td valign="top" class="name"> |
---|
91 | <label for="assetSubItems">Asset Sub Items:</label> |
---|
92 | </td> |
---|
93 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetSubItems','errors')}"> |
---|
94 | <custom:checkBoxList name="assetSubItems" |
---|
95 | from="${possibleAssetSubItems}" |
---|
96 | value="${assetInstance?.assetSubItems.collect{it.id}}" |
---|
97 | optionKey="id" |
---|
98 | sortBy="name" |
---|
99 | linkController="assetSubItemDetailed" |
---|
100 | linkAction="show"/> |
---|
101 | |
---|
102 | </td> |
---|
103 | </tr> |
---|
104 | |
---|
105 | <tr class="prop"> |
---|
106 | <td valign="top" class="name"> |
---|
107 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
108 | </td> |
---|
109 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'maintenanceActions','errors')}"> |
---|
110 | |
---|
111 | <ul> |
---|
112 | <g:each var="m" in="${assetInstance?.maintenanceActions?}"> |
---|
113 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
114 | </g:each> |
---|
115 | </ul> |
---|
116 | <g:link controller="maintenanceActionDetailed" params="['asset.id':assetInstance?.id]" action="create">+Add Maintenance Action</g:link> |
---|
117 | |
---|
118 | </td> |
---|
119 | </tr> |
---|
120 | |
---|
121 | </tbody> |
---|
122 | </table> |
---|
123 | </div> |
---|
124 | <div class="buttons"> |
---|
125 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
126 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
127 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
128 | </div> |
---|
129 | </g:form> |
---|
130 | </div> |
---|
131 | </body> |
---|
132 | </html> |
---|