[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"> |
---|
| 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"> |
---|
[124] | 32 | <label for="name">Name:</label> |
---|
| 33 | </td> |
---|
| 34 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'name','errors')}"> |
---|
| 35 | <input type="text" 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"> |
---|
[118] | 41 | <label for="assetType">Asset Type:</label> |
---|
| 42 | </td> |
---|
| 43 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetType','errors')}"> |
---|
| 44 | <g:select optionKey="id" from="${AssetType.list()}" name="assetType.id" value="${assetInstance?.assetType?.id}" ></g:select> |
---|
| 45 | </td> |
---|
[124] | 46 | </tr> |
---|
| 47 | |
---|
| 48 | <tr class="prop"> |
---|
| 49 | <td valign="top" class="name"> |
---|
| 50 | <label for="systemSection">System Section:</label> |
---|
| 51 | </td> |
---|
| 52 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'systemSection','errors')}"> |
---|
| 53 | <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${assetInstance?.systemSection?.id}" ></g:select> |
---|
| 54 | </td> |
---|
[118] | 55 | </tr> |
---|
| 56 | |
---|
| 57 | <tr class="prop"> |
---|
| 58 | <td valign="top" class="name"> |
---|
| 59 | <label for="description">Description:</label> |
---|
| 60 | </td> |
---|
| 61 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}"> |
---|
| 62 | <input type="text" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/> |
---|
| 63 | </td> |
---|
[124] | 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> |
---|
[118] | 80 | </tr> |
---|
| 81 | |
---|
| 82 | <tr class="prop"> |
---|
| 83 | <td valign="top" class="name"> |
---|
| 84 | <label for="isActive">Is Active:</label> |
---|
| 85 | </td> |
---|
| 86 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'isActive','errors')}"> |
---|
| 87 | <g:checkBox name="isActive" value="${assetInstance?.isActive}" ></g:checkBox> |
---|
| 88 | </td> |
---|
| 89 | </tr> |
---|
| 90 | |
---|
| 91 | <tr class="prop"> |
---|
| 92 | <td valign="top" class="name"> |
---|
[122] | 93 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
[118] | 94 | </td> |
---|
[122] | 95 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'maintenanceActions','errors')}"> |
---|
| 96 | |
---|
| 97 | <ul> |
---|
| 98 | <g:each var="m" in="${assetInstance?.maintenanceActions?}"> |
---|
[124] | 99 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
[122] | 100 | </g:each> |
---|
| 101 | </ul> |
---|
[124] | 102 | <g:link controller="maintenanceActionDetailed" params="['asset.id':assetInstance?.id]" action="create">Add MaintenanceAction</g:link> |
---|
[122] | 103 | |
---|
[118] | 104 | </td> |
---|
| 105 | </tr> |
---|
| 106 | |
---|
| 107 | </tbody> |
---|
| 108 | </table> |
---|
| 109 | </div> |
---|
| 110 | <div class="buttons"> |
---|
| 111 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
| 112 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 113 | </div> |
---|
| 114 | </g:form> |
---|
| 115 | </div> |
---|
| 116 | </body> |
---|
| 117 | </html> |
---|