[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"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span> |
---|
| 12 | <span class="menuButton"><g:link class="list" action="list">Asset List</g:link></span> |
---|
| 13 | <span class="menuButton"><g:link class="create" action="create">New Asset</g:link></span> |
---|
| 14 | </div> |
---|
| 15 | <div class="body"> |
---|
| 16 | <h1>Edit Asset</h1> |
---|
| 17 | <g:if test="${flash.message}"> |
---|
| 18 | <div class="message">${flash.message}</div> |
---|
| 19 | </g:if> |
---|
| 20 | <g:hasErrors bean="${assetInstance}"> |
---|
| 21 | <div class="errors"> |
---|
| 22 | <g:renderErrors bean="${assetInstance}" as="list" /> |
---|
| 23 | </div> |
---|
| 24 | </g:hasErrors> |
---|
| 25 | <g:form method="post" > |
---|
| 26 | <input type="hidden" name="id" value="${assetInstance?.id}" /> |
---|
| 27 | <input type="hidden" name="version" value="${assetInstance?.version}" /> |
---|
| 28 | <div class="dialog"> |
---|
| 29 | <table> |
---|
| 30 | <tbody> |
---|
| 31 | |
---|
| 32 | <tr class="prop"> |
---|
| 33 | <td valign="top" class="name"> |
---|
[124] | 34 | <label for="name">Name:</label> |
---|
| 35 | </td> |
---|
| 36 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'name','errors')}"> |
---|
| 37 | <input type="text" id="name" name="name" value="${fieldValue(bean:assetInstance,field:'name')}"/> |
---|
| 38 | </td> |
---|
| 39 | </tr> |
---|
| 40 | |
---|
| 41 | <tr class="prop"> |
---|
| 42 | <td valign="top" class="name"> |
---|
[118] | 43 | <label for="assetType">Asset Type:</label> |
---|
| 44 | </td> |
---|
| 45 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetType','errors')}"> |
---|
| 46 | <g:select optionKey="id" from="${AssetType.list()}" name="assetType.id" value="${assetInstance?.assetType?.id}" ></g:select> |
---|
| 47 | </td> |
---|
[124] | 48 | </tr> |
---|
| 49 | |
---|
| 50 | <tr class="prop"> |
---|
| 51 | <td valign="top" class="name"> |
---|
| 52 | <label for="systemSection">System Section:</label> |
---|
| 53 | </td> |
---|
| 54 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'systemSection','errors')}"> |
---|
| 55 | <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${assetInstance?.systemSection?.id}" ></g:select> |
---|
| 56 | </td> |
---|
[118] | 57 | </tr> |
---|
| 58 | |
---|
| 59 | <tr class="prop"> |
---|
| 60 | <td valign="top" class="name"> |
---|
| 61 | <label for="description">Description:</label> |
---|
| 62 | </td> |
---|
| 63 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}"> |
---|
| 64 | <input type="text" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/> |
---|
| 65 | </td> |
---|
[124] | 66 | </tr> |
---|
| 67 | |
---|
| 68 | <tr class="prop"> |
---|
| 69 | <td valign="top" class="name"> |
---|
| 70 | <label for="assetExtendedAttributes">Asset Extended Attributes:</label> |
---|
| 71 | </td> |
---|
| 72 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetExtendedAttributes','errors')}"> |
---|
| 73 | |
---|
| 74 | <ul> |
---|
| 75 | <g:each var="a" in="${assetInstance?.assetExtendedAttributes?}"> |
---|
| 76 | <li><g:link controller="assetExtendedAttributeDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
| 77 | </g:each> |
---|
| 78 | </ul> |
---|
| 79 | <g:link controller="assetExtendedAttributeDetailed" params="['asset.id':assetInstance?.id]" action="create">Add AssetExtendedAttribute</g:link> |
---|
| 80 | |
---|
| 81 | </td> |
---|
[118] | 82 | </tr> |
---|
| 83 | |
---|
| 84 | <tr class="prop"> |
---|
| 85 | <td valign="top" class="name"> |
---|
| 86 | <label for="isActive">Is Active:</label> |
---|
| 87 | </td> |
---|
| 88 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'isActive','errors')}"> |
---|
| 89 | <g:checkBox name="isActive" value="${assetInstance?.isActive}" ></g:checkBox> |
---|
| 90 | </td> |
---|
| 91 | </tr> |
---|
| 92 | |
---|
| 93 | <tr class="prop"> |
---|
| 94 | <td valign="top" class="name"> |
---|
[122] | 95 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
[118] | 96 | </td> |
---|
[122] | 97 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'maintenanceActions','errors')}"> |
---|
| 98 | |
---|
| 99 | <ul> |
---|
| 100 | <g:each var="m" in="${assetInstance?.maintenanceActions?}"> |
---|
[124] | 101 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
[122] | 102 | </g:each> |
---|
| 103 | </ul> |
---|
[124] | 104 | <g:link controller="maintenanceActionDetailed" params="['asset.id':assetInstance?.id]" action="create">Add MaintenanceAction</g:link> |
---|
[122] | 105 | |
---|
[118] | 106 | </td> |
---|
| 107 | </tr> |
---|
| 108 | |
---|
| 109 | </tbody> |
---|
| 110 | </table> |
---|
| 111 | </div> |
---|
| 112 | <div class="buttons"> |
---|
| 113 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
| 114 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 115 | </div> |
---|
| 116 | </g:form> |
---|
| 117 | </div> |
---|
| 118 | </body> |
---|
| 119 | </html> |
---|