[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')}"> |
---|
[329] | 35 | <input type="text" class="description" 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')}"> |
---|
[329] | 44 | <input type="text" class="description" 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"> |
---|
[329] | 50 | <label for="comment">Comment:</label> |
---|
| 51 | </td> |
---|
| 52 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'comment','errors')}"> |
---|
| 53 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:assetInstance, field:'comment')}</textarea> |
---|
| 54 | </td> |
---|
| 55 | </tr> |
---|
| 56 | |
---|
| 57 | <tr class="prop"> |
---|
| 58 | <td valign="top" class="name"> |
---|
[271] | 59 | <label for="isActive">Is Active:</label> |
---|
[161] | 60 | </td> |
---|
[271] | 61 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'isActive','errors')}"> |
---|
| 62 | <g:checkBox name="isActive" value="${assetInstance?.isActive}" ></g:checkBox> |
---|
[161] | 63 | </td> |
---|
[271] | 64 | </tr> |
---|
[161] | 65 | |
---|
| 66 | <tr class="prop"> |
---|
| 67 | <td valign="top" class="name"> |
---|
[271] | 68 | <label for="section">Section:</label> |
---|
[118] | 69 | </td> |
---|
[271] | 70 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'section','errors')}"> |
---|
| 71 | <g:select optionKey="id" from="${Section.list()}" name="section.id" value="${assetInstance?.section?.id}" ></g:select> |
---|
[118] | 72 | </td> |
---|
[271] | 73 | </tr> |
---|
[124] | 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"> |
---|
[271] | 93 | <label for="assetSubItems">Asset Sub Items:</label> |
---|
[118] | 94 | </td> |
---|
[271] | 95 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetSubItems','errors')}"> |
---|
[286] | 96 | <custom:checkBoxList name="assetSubItems" |
---|
| 97 | from="${AssetSubItem.list()}" |
---|
| 98 | value="${assetInstance?.assetSubItems.collect{it.id}}" |
---|
[290] | 99 | optionKey="id" |
---|
[303] | 100 | displayFields="['id', 'name']" |
---|
| 101 | linkController="assetSubItemDetailed" |
---|
| 102 | linkAction="show"/> |
---|
[271] | 103 | |
---|
[118] | 104 | </td> |
---|
| 105 | </tr> |
---|
| 106 | |
---|
| 107 | <tr class="prop"> |
---|
| 108 | <td valign="top" class="name"> |
---|
[122] | 109 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
[118] | 110 | </td> |
---|
[122] | 111 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'maintenanceActions','errors')}"> |
---|
| 112 | |
---|
| 113 | <ul> |
---|
| 114 | <g:each var="m" in="${assetInstance?.maintenanceActions?}"> |
---|
[124] | 115 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
[122] | 116 | </g:each> |
---|
| 117 | </ul> |
---|
[124] | 118 | <g:link controller="maintenanceActionDetailed" params="['asset.id':assetInstance?.id]" action="create">Add MaintenanceAction</g:link> |
---|
[122] | 119 | |
---|
[118] | 120 | </td> |
---|
| 121 | </tr> |
---|
| 122 | |
---|
| 123 | </tbody> |
---|
| 124 | </table> |
---|
| 125 | </div> |
---|
| 126 | <div class="buttons"> |
---|
| 127 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
| 128 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 129 | </div> |
---|
| 130 | </g:form> |
---|
| 131 | </div> |
---|
| 132 | </body> |
---|
| 133 | </html> |
---|