[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"> |
---|
[349] | 15 | <g:render template="/shared/messages" /> |
---|
[118] | 16 | <g:hasErrors bean="${assetInstance}"> |
---|
| 17 | <div class="errors"> |
---|
| 18 | <g:renderErrors bean="${assetInstance}" as="list" /> |
---|
| 19 | </div> |
---|
| 20 | </g:hasErrors> |
---|
| 21 | <g:form method="post" > |
---|
| 22 | <input type="hidden" name="id" value="${assetInstance?.id}" /> |
---|
| 23 | <input type="hidden" name="version" value="${assetInstance?.version}" /> |
---|
| 24 | <div class="dialog"> |
---|
| 25 | <table> |
---|
| 26 | <tbody> |
---|
| 27 | |
---|
| 28 | <tr class="prop"> |
---|
[655] | 29 | <td valign="top" class="groupHeader"> |
---|
| 30 | <label for="name">Asset</label> |
---|
| 31 | </td> |
---|
| 32 | <td valign="top" class="value"> |
---|
| 33 | </td> |
---|
| 34 | </tr> |
---|
| 35 | |
---|
| 36 | <tr class="prop"> |
---|
| 37 | <td valign="top" class="groupName"> |
---|
[124] | 38 | <label for="name">Name:</label> |
---|
| 39 | </td> |
---|
| 40 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'name','errors')}"> |
---|
[329] | 41 | <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:assetInstance,field:'name')}"/> |
---|
[124] | 42 | </td> |
---|
| 43 | </tr> |
---|
| 44 | |
---|
| 45 | <tr class="prop"> |
---|
[655] | 46 | <td valign="top" class="groupName"> |
---|
[161] | 47 | <label for="description">Description:</label> |
---|
| 48 | </td> |
---|
| 49 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}"> |
---|
[329] | 50 | <input type="text" class="description" maxlength="100" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/> |
---|
[161] | 51 | </td> |
---|
[271] | 52 | </tr> |
---|
[161] | 53 | |
---|
| 54 | <tr class="prop"> |
---|
[655] | 55 | <td valign="top" class="groupName"> |
---|
[329] | 56 | <label for="comment">Comment:</label> |
---|
| 57 | </td> |
---|
| 58 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'comment','errors')}"> |
---|
| 59 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:assetInstance, field:'comment')}</textarea> |
---|
| 60 | </td> |
---|
| 61 | </tr> |
---|
| 62 | |
---|
| 63 | <tr class="prop"> |
---|
[655] | 64 | <td valign="top" class="groupName"> |
---|
[271] | 65 | <label for="isActive">Is Active:</label> |
---|
[161] | 66 | </td> |
---|
[271] | 67 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'isActive','errors')}"> |
---|
| 68 | <g:checkBox name="isActive" value="${assetInstance?.isActive}" ></g:checkBox> |
---|
[161] | 69 | </td> |
---|
[271] | 70 | </tr> |
---|
[161] | 71 | |
---|
| 72 | <tr class="prop"> |
---|
[655] | 73 | <td valign="top" class="groupName"> |
---|
[271] | 74 | <label for="section">Section:</label> |
---|
[118] | 75 | </td> |
---|
[271] | 76 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'section','errors')}"> |
---|
| 77 | <g:select optionKey="id" from="${Section.list()}" name="section.id" value="${assetInstance?.section?.id}" ></g:select> |
---|
[118] | 78 | </td> |
---|
[271] | 79 | </tr> |
---|
[124] | 80 | |
---|
| 81 | <tr class="prop"> |
---|
[655] | 82 | <td valign="top" class="groupHeader">Extended Attributes</td> |
---|
| 83 | <td valign="top" style="text-align:left;" class="value"> |
---|
[124] | 84 | </td> |
---|
[655] | 85 | </tr> |
---|
| 86 | |
---|
| 87 | <g:each var="a" in="${assetInstance.assetExtendedAttributes.sort { p1, p2 -> p1.extendedAttributeType.name.compareToIgnoreCase(p2.extendedAttributeType.name) }}"> |
---|
| 88 | <tr class="prop"> |
---|
| 89 | <td valign="top" class="groupName"> |
---|
| 90 | ${a.extendedAttributeType.name.encodeAsHTML()}: |
---|
| 91 | </td> |
---|
[124] | 92 | |
---|
[655] | 93 | <td valign="top" style="text-align:left;" class="value"> |
---|
| 94 | <g:link controller="assetExtendedAttributeDetailed" action="edit" id="${a.id}"> |
---|
| 95 | ${a.value.encodeAsHTML()} |
---|
| 96 | </g:link> |
---|
| 97 | </td> |
---|
| 98 | |
---|
| 99 | </tr> |
---|
| 100 | </g:each> |
---|
| 101 | |
---|
| 102 | <tr class="prop"> |
---|
| 103 | <td valign="top" class="name"></td> |
---|
| 104 | <td valign="top" style="text-align:left;" class="value"> |
---|
| 105 | <g:link controller="assetExtendedAttributeDetailed" params="['asset.id':assetInstance?.id]" action="create">+Add Extended Attribute</g:link> |
---|
[124] | 106 | </td> |
---|
[655] | 107 | </tr> |
---|
| 108 | |
---|
| 109 | <tr class="prop"> |
---|
| 110 | <td valign="top" class="groupHeader"> |
---|
[657] | 111 | <label for="assetSubItems">Asset Tree</label> |
---|
[655] | 112 | </td> |
---|
| 113 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetSubItems','errors')}"> |
---|
| 114 | </td> |
---|
[118] | 115 | </tr> |
---|
| 116 | |
---|
| 117 | <tr class="prop"> |
---|
[657] | 118 | <td valign="top" class="groupName"> |
---|
| 119 | Level 1 sub items: |
---|
[118] | 120 | </td> |
---|
[271] | 121 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetSubItems','errors')}"> |
---|
[286] | 122 | <custom:checkBoxList name="assetSubItems" |
---|
[344] | 123 | from="${possibleAssetSubItems}" |
---|
[286] | 124 | value="${assetInstance?.assetSubItems.collect{it.id}}" |
---|
[290] | 125 | optionKey="id" |
---|
[344] | 126 | sortBy="name" |
---|
[303] | 127 | linkController="assetSubItemDetailed" |
---|
| 128 | linkAction="show"/> |
---|
[271] | 129 | |
---|
[118] | 130 | </td> |
---|
| 131 | </tr> |
---|
| 132 | |
---|
| 133 | <tr class="prop"> |
---|
[655] | 134 | <td valign="top" class="groupHeader"> |
---|
| 135 | <label for="maintenanceActions">Maintenance Actions</label> |
---|
[118] | 136 | </td> |
---|
[655] | 137 | <td valign="top" class="value"> |
---|
[118] | 138 | </td> |
---|
| 139 | </tr> |
---|
| 140 | |
---|
[655] | 141 | <g:each var="m" in="${assetInstance?.maintenanceActions?}"> |
---|
| 142 | <tr class="prop"> |
---|
| 143 | <td valign="top" class="name"> |
---|
| 144 | </td> |
---|
| 145 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'maintenanceActions','errors')}"> |
---|
| 146 | <g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link> |
---|
| 147 | </td> |
---|
| 148 | </tr> |
---|
| 149 | </g:each> |
---|
| 150 | |
---|
| 151 | <tr class="prop"> |
---|
| 152 | <td valign="top" class="name"></td> |
---|
| 153 | <td valign="top" style="text-align:left;" class="value"> |
---|
| 154 | <g:link controller="maintenanceActionDetailed" params="['asset.id':assetInstance?.id]" action="create">+Add Maintenance Action</g:link> |
---|
| 155 | </td> |
---|
| 156 | </tr> |
---|
| 157 | |
---|
[118] | 158 | </tbody> |
---|
| 159 | </table> |
---|
| 160 | </div> |
---|
| 161 | <div class="buttons"> |
---|
| 162 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
[370] | 163 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
[118] | 164 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 165 | </div> |
---|
| 166 | </g:form> |
---|
| 167 | </div> |
---|
| 168 | </body> |
---|
| 169 | </html> |
---|