[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"> |
---|
[161] | 41 | <label for="description">Description:</label> |
---|
| 42 | </td> |
---|
| 43 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}"> |
---|
| 44 | <input type="text" 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="costCode">Cost Code:</label> |
---|
| 51 | </td> |
---|
| 52 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'costCode','errors')}"> |
---|
| 53 | <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:assetInstance,field:'costCode')}"/> |
---|
| 54 | </td> |
---|
| 55 | </tr> |
---|
| 56 | |
---|
| 57 | <tr class="prop"> |
---|
| 58 | <td valign="top" class="name"> |
---|
[118] | 59 | <label for="assetType">Asset Type:</label> |
---|
| 60 | </td> |
---|
| 61 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetType','errors')}"> |
---|
| 62 | <g:select optionKey="id" from="${AssetType.list()}" name="assetType.id" value="${assetInstance?.assetType?.id}" ></g:select> |
---|
| 63 | </td> |
---|
[124] | 64 | </tr> |
---|
| 65 | |
---|
| 66 | <tr class="prop"> |
---|
| 67 | <td valign="top" class="name"> |
---|
| 68 | <label for="systemSection">System Section:</label> |
---|
| 69 | </td> |
---|
| 70 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'systemSection','errors')}"> |
---|
| 71 | <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${assetInstance?.systemSection?.id}" ></g:select> |
---|
| 72 | </td> |
---|
| 73 | </tr> |
---|
| 74 | |
---|
| 75 | <tr class="prop"> |
---|
| 76 | <td valign="top" class="name"> |
---|
| 77 | <label for="assetExtendedAttributes">Asset Extended Attributes:</label> |
---|
| 78 | </td> |
---|
| 79 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetExtendedAttributes','errors')}"> |
---|
| 80 | |
---|
| 81 | <ul> |
---|
| 82 | <g:each var="a" in="${assetInstance?.assetExtendedAttributes?}"> |
---|
| 83 | <li><g:link controller="assetExtendedAttributeDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
| 84 | </g:each> |
---|
| 85 | </ul> |
---|
| 86 | <g:link controller="assetExtendedAttributeDetailed" params="['asset.id':assetInstance?.id]" action="create">Add AssetExtendedAttribute</g:link> |
---|
| 87 | |
---|
| 88 | </td> |
---|
[118] | 89 | </tr> |
---|
| 90 | |
---|
| 91 | <tr class="prop"> |
---|
| 92 | <td valign="top" class="name"> |
---|
| 93 | <label for="isActive">Is Active:</label> |
---|
| 94 | </td> |
---|
| 95 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'isActive','errors')}"> |
---|
| 96 | <g:checkBox name="isActive" value="${assetInstance?.isActive}" ></g:checkBox> |
---|
| 97 | </td> |
---|
| 98 | </tr> |
---|
| 99 | |
---|
| 100 | <tr class="prop"> |
---|
| 101 | <td valign="top" class="name"> |
---|
[122] | 102 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
[118] | 103 | </td> |
---|
[122] | 104 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'maintenanceActions','errors')}"> |
---|
| 105 | |
---|
| 106 | <ul> |
---|
| 107 | <g:each var="m" in="${assetInstance?.maintenanceActions?}"> |
---|
[124] | 108 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
[122] | 109 | </g:each> |
---|
| 110 | </ul> |
---|
[124] | 111 | <g:link controller="maintenanceActionDetailed" params="['asset.id':assetInstance?.id]" action="create">Add MaintenanceAction</g:link> |
---|
[122] | 112 | |
---|
[118] | 113 | </td> |
---|
| 114 | </tr> |
---|
| 115 | |
---|
| 116 | </tbody> |
---|
| 117 | </table> |
---|
| 118 | </div> |
---|
| 119 | <div class="buttons"> |
---|
| 120 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
| 121 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 122 | </div> |
---|
| 123 | </g:form> |
---|
| 124 | </div> |
---|
| 125 | </body> |
---|
| 126 | </html> |
---|