[118] | 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> |
---|
[139] | 8 | <nav:resources override="true"/> |
---|
[118] | 9 | </head> |
---|
| 10 | <body> |
---|
| 11 | <div class="nav"> |
---|
[139] | 12 | <nav:renderSubItems group="nav"/> |
---|
[118] | 13 | </div> |
---|
| 14 | <div class="body"> |
---|
[349] | 15 | <g:render template="/shared/messages" /> |
---|
[118] | 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"> |
---|
[124] | 30 | <label for="name">Name:</label> |
---|
| 31 | </td> |
---|
| 32 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'name','errors')}"> |
---|
[329] | 33 | <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:assetInstance,field:'name')}"/> |
---|
[124] | 34 | </td> |
---|
| 35 | </tr> |
---|
| 36 | |
---|
| 37 | <tr class="prop"> |
---|
| 38 | <td valign="top" class="name"> |
---|
[161] | 39 | <label for="description">Description:</label> |
---|
| 40 | </td> |
---|
| 41 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}"> |
---|
[329] | 42 | <input type="text" class="description" maxlength="100" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/> |
---|
[161] | 43 | </td> |
---|
[271] | 44 | </tr> |
---|
[161] | 45 | |
---|
| 46 | <tr class="prop"> |
---|
| 47 | <td valign="top" class="name"> |
---|
[329] | 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"> |
---|
[271] | 57 | <label for="isActive">Is Active:</label> |
---|
[161] | 58 | </td> |
---|
[271] | 59 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'isActive','errors')}"> |
---|
| 60 | <g:checkBox name="isActive" value="${assetInstance?.isActive}" ></g:checkBox> |
---|
[161] | 61 | </td> |
---|
[271] | 62 | </tr> |
---|
[161] | 63 | |
---|
| 64 | <tr class="prop"> |
---|
| 65 | <td valign="top" class="name"> |
---|
[271] | 66 | <label for="section">Section:</label> |
---|
[118] | 67 | </td> |
---|
[271] | 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> |
---|
[118] | 70 | </td> |
---|
[271] | 71 | </tr> |
---|
[124] | 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> |
---|
[410] | 84 | <g:link controller="assetExtendedAttributeDetailed" params="['asset.id':assetInstance?.id]" action="create">+Add Extended Attribute</g:link> |
---|
[124] | 85 | |
---|
| 86 | </td> |
---|
[118] | 87 | </tr> |
---|
| 88 | |
---|
| 89 | <tr class="prop"> |
---|
| 90 | <td valign="top" class="name"> |
---|
[271] | 91 | <label for="assetSubItems">Asset Sub Items:</label> |
---|
[118] | 92 | </td> |
---|
[271] | 93 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetSubItems','errors')}"> |
---|
[286] | 94 | <custom:checkBoxList name="assetSubItems" |
---|
[344] | 95 | from="${possibleAssetSubItems}" |
---|
[286] | 96 | value="${assetInstance?.assetSubItems.collect{it.id}}" |
---|
[290] | 97 | optionKey="id" |
---|
[344] | 98 | sortBy="name" |
---|
[303] | 99 | linkController="assetSubItemDetailed" |
---|
| 100 | linkAction="show"/> |
---|
[271] | 101 | |
---|
[118] | 102 | </td> |
---|
| 103 | </tr> |
---|
| 104 | |
---|
| 105 | <tr class="prop"> |
---|
| 106 | <td valign="top" class="name"> |
---|
[122] | 107 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
[118] | 108 | </td> |
---|
[122] | 109 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'maintenanceActions','errors')}"> |
---|
| 110 | |
---|
| 111 | <ul> |
---|
| 112 | <g:each var="m" in="${assetInstance?.maintenanceActions?}"> |
---|
[124] | 113 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
[122] | 114 | </g:each> |
---|
| 115 | </ul> |
---|
[410] | 116 | <g:link controller="maintenanceActionDetailed" params="['asset.id':assetInstance?.id]" action="create">+Add Maintenance Action</g:link> |
---|
[122] | 117 | |
---|
[118] | 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> |
---|
[370] | 126 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
[118] | 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> |
---|