[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')}"> |
---|
[271] | 35 | <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:assetInstance,field:'name')}"/> |
---|
[124] | 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')}"> |
---|
[271] | 44 | <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/> |
---|
[161] | 45 | </td> |
---|
[271] | 46 | </tr> |
---|
[161] | 47 | |
---|
| 48 | <tr class="prop"> |
---|
| 49 | <td valign="top" class="name"> |
---|
[271] | 50 | <label for="isActive">Is Active:</label> |
---|
[161] | 51 | </td> |
---|
[271] | 52 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'isActive','errors')}"> |
---|
| 53 | <g:checkBox name="isActive" value="${assetInstance?.isActive}" ></g:checkBox> |
---|
[161] | 54 | </td> |
---|
[271] | 55 | </tr> |
---|
[161] | 56 | |
---|
| 57 | <tr class="prop"> |
---|
| 58 | <td valign="top" class="name"> |
---|
[271] | 59 | <label for="section">Section:</label> |
---|
[118] | 60 | </td> |
---|
[271] | 61 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'section','errors')}"> |
---|
| 62 | <g:select optionKey="id" from="${Section.list()}" name="section.id" value="${assetInstance?.section?.id}" ></g:select> |
---|
[118] | 63 | </td> |
---|
[271] | 64 | </tr> |
---|
[124] | 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"> |
---|
[271] | 84 | <label for="assetSubItems">Asset Sub Items:</label> |
---|
[118] | 85 | </td> |
---|
[271] | 86 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetSubItems','errors')}"> |
---|
[286] | 87 | <custom:checkBoxList name="assetSubItems" |
---|
| 88 | from="${AssetSubItem.list()}" |
---|
| 89 | value="${assetInstance?.assetSubItems.collect{it.id}}" |
---|
[290] | 90 | optionKey="id" |
---|
[303] | 91 | displayFields="['id', 'name']" |
---|
| 92 | linkController="assetSubItemDetailed" |
---|
| 93 | linkAction="show"/> |
---|
[271] | 94 | |
---|
[118] | 95 | </td> |
---|
| 96 | </tr> |
---|
| 97 | |
---|
| 98 | <tr class="prop"> |
---|
| 99 | <td valign="top" class="name"> |
---|
[122] | 100 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
[118] | 101 | </td> |
---|
[122] | 102 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'maintenanceActions','errors')}"> |
---|
| 103 | |
---|
| 104 | <ul> |
---|
| 105 | <g:each var="m" in="${assetInstance?.maintenanceActions?}"> |
---|
[124] | 106 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
[122] | 107 | </g:each> |
---|
| 108 | </ul> |
---|
[124] | 109 | <g:link controller="maintenanceActionDetailed" params="['asset.id':assetInstance?.id]" action="create">Add MaintenanceAction</g:link> |
---|
[122] | 110 | |
---|
[118] | 111 | </td> |
---|
| 112 | </tr> |
---|
| 113 | |
---|
| 114 | </tbody> |
---|
| 115 | </table> |
---|
| 116 | </div> |
---|
| 117 | <div class="buttons"> |
---|
| 118 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
| 119 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 120 | </div> |
---|
| 121 | </g:form> |
---|
| 122 | </div> |
---|
| 123 | </body> |
---|
| 124 | </html> |
---|