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