| [274] | 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 AssetSubItem</title> | 
|---|
| [369] | 8 | <nav:resources override="true"/> | 
|---|
| [274] | 9 | </head> | 
|---|
|  | 10 | <body> | 
|---|
|  | 11 | <div class="nav"> | 
|---|
| [369] | 12 | <nav:renderSubItems group="navAlt"/> | 
|---|
| [274] | 13 | </div> | 
|---|
|  | 14 | <div class="body"> | 
|---|
| [285] | 15 | <g:render template="/shared/messages" /> | 
|---|
| [274] | 16 | <g:hasErrors bean="${assetSubItemInstance}"> | 
|---|
|  | 17 | <div class="errors"> | 
|---|
|  | 18 | <g:renderErrors bean="${assetSubItemInstance}" as="list" /> | 
|---|
|  | 19 | </div> | 
|---|
|  | 20 | </g:hasErrors> | 
|---|
|  | 21 | <g:form method="post" > | 
|---|
|  | 22 | <input type="hidden" name="id" value="${assetSubItemInstance?.id}" /> | 
|---|
|  | 23 | <input type="hidden" name="version" value="${assetSubItemInstance?.version}" /> | 
|---|
|  | 24 | <div class="dialog"> | 
|---|
|  | 25 | <table> | 
|---|
|  | 26 | <tbody> | 
|---|
|  | 27 |  | 
|---|
|  | 28 | <tr class="prop"> | 
|---|
| [659] | 29 | <td valign="top" class="groupHeader"> | 
|---|
|  | 30 | <label for="name">Asset Sub Item</label> | 
|---|
|  | 31 | </td> | 
|---|
|  | 32 | <td valign="top" class="value"> | 
|---|
|  | 33 | </td> | 
|---|
|  | 34 | </tr> | 
|---|
|  | 35 |  | 
|---|
|  | 36 | <tr class="prop"> | 
|---|
|  | 37 | <td valign="top" class="groupName"> | 
|---|
| [274] | 38 | <label for="name">Name:</label> | 
|---|
|  | 39 | </td> | 
|---|
|  | 40 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'name','errors')}"> | 
|---|
| [330] | 41 | <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:assetSubItemInstance,field:'name')}"/> | 
|---|
| [274] | 42 | </td> | 
|---|
|  | 43 | </tr> | 
|---|
|  | 44 |  | 
|---|
|  | 45 | <tr class="prop"> | 
|---|
| [659] | 46 | <td valign="top" class="groupName"> | 
|---|
| [274] | 47 | <label for="description">Description:</label> | 
|---|
|  | 48 | </td> | 
|---|
|  | 49 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'description','errors')}"> | 
|---|
| [330] | 50 | <input type="text" class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:assetSubItemInstance,field:'description')}"/> | 
|---|
| [274] | 51 | </td> | 
|---|
| [330] | 52 | </tr> | 
|---|
|  | 53 |  | 
|---|
|  | 54 | <tr class="prop"> | 
|---|
| [659] | 55 | <td valign="top" class="groupName"> | 
|---|
| [330] | 56 | <label for="comment">Comment:</label> | 
|---|
|  | 57 | </td> | 
|---|
|  | 58 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'comment','errors')}"> | 
|---|
|  | 59 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:assetSubItemInstance, field:'comment')}</textarea> | 
|---|
|  | 60 | </td> | 
|---|
| [274] | 61 | </tr> | 
|---|
|  | 62 |  | 
|---|
|  | 63 | <tr class="prop"> | 
|---|
| [659] | 64 | <td valign="top" class="groupName"> | 
|---|
| [274] | 65 | <label for="isActive">Is Active:</label> | 
|---|
|  | 66 | </td> | 
|---|
|  | 67 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'isActive','errors')}"> | 
|---|
|  | 68 | <g:checkBox name="isActive" value="${assetSubItemInstance?.isActive}" ></g:checkBox> | 
|---|
|  | 69 | </td> | 
|---|
|  | 70 | </tr> | 
|---|
|  | 71 |  | 
|---|
|  | 72 | <tr class="prop"> | 
|---|
| [683] | 73 | <td valign="top" class="groupHeader">Extended Attributes</td> | 
|---|
|  | 74 | <td  valign="top" style="text-align:left;" class="value"> | 
|---|
| [274] | 75 | </td> | 
|---|
| [683] | 76 | </tr> | 
|---|
|  | 77 |  | 
|---|
|  | 78 | <g:each var="a" in="${assetSubItemInstance.assetSubItemExtendedAttributes.sort { p1, p2 -> p1.extendedAttributeType.name.compareToIgnoreCase(p2.extendedAttributeType.name) }}"> | 
|---|
| [659] | 79 | <tr class="prop"> | 
|---|
| [683] | 80 | <td valign="top" class="groupName"> | 
|---|
|  | 81 | ${a.extendedAttributeType.name.encodeAsHTML()}: | 
|---|
| [659] | 82 | </td> | 
|---|
| [683] | 83 |  | 
|---|
|  | 84 | <td  valign="top" style="text-align:left;" class="value"> | 
|---|
|  | 85 | <g:link controller="assetSubItemExtendedAttributeDetailed" action="edit" id="${a.id}"> | 
|---|
|  | 86 | ${a.value.encodeAsHTML()} | 
|---|
| [659] | 87 | </g:link> | 
|---|
|  | 88 | </td> | 
|---|
| [683] | 89 |  | 
|---|
| [659] | 90 | </tr> | 
|---|
|  | 91 | </g:each> | 
|---|
|  | 92 |  | 
|---|
| [274] | 93 | <tr class="prop"> | 
|---|
| [683] | 94 | <td valign="top" class="name"> | 
|---|
| [659] | 95 | </td> | 
|---|
| [683] | 96 | <td valign="top" style="text-align:left;" class="value"> | 
|---|
| [659] | 97 | <g:link controller="assetSubItemExtendedAttributeDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Extended Attribute</g:link> | 
|---|
|  | 98 | </td> | 
|---|
|  | 99 | </tr> | 
|---|
|  | 100 |  | 
|---|
| [274] | 101 | <tr class="prop"> | 
|---|
| [659] | 102 |  | 
|---|
|  | 103 | <tr class="prop"> | 
|---|
|  | 104 | <td valign="top" class="groupHeader"> | 
|---|
|  | 105 | <label for="name">Asset Tree</label> | 
|---|
| [285] | 106 | </td> | 
|---|
| [659] | 107 | <td valign="top" class="value"> | 
|---|
| [285] | 108 | </td> | 
|---|
| [659] | 109 | </tr> | 
|---|
| [285] | 110 |  | 
|---|
|  | 111 | <tr class="prop"> | 
|---|
| [659] | 112 | <td valign="top" class="groupName">Assets:</td> | 
|---|
| [285] | 113 |  | 
|---|
|  | 114 | <td  valign="top" style="text-align:left;" class="value"> | 
|---|
| [354] | 115 | <g:if test="${assetSubItemInstance.parentItem}" > | 
|---|
| [659] | 116 | N/A (Assigned to parent item) | 
|---|
| [354] | 117 | </g:if> | 
|---|
|  | 118 | <g:else> | 
|---|
| [659] | 119 | <g:if test="${assetSubItemInstance.assets}"> | 
|---|
|  | 120 | <ul> | 
|---|
|  | 121 | <g:each var="a" in="${ assetSubItemInstance.assets.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> | 
|---|
|  | 122 | <li><g:link controller="assetDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> | 
|---|
|  | 123 | </g:each> | 
|---|
|  | 124 | </ul> | 
|---|
|  | 125 | </g:if> | 
|---|
|  | 126 | <g:else> | 
|---|
|  | 127 | May be assigned via asset edit view. | 
|---|
|  | 128 | </g:else> | 
|---|
| [354] | 129 | </g:else> | 
|---|
| [285] | 130 | </td> | 
|---|
|  | 131 |  | 
|---|
|  | 132 | </tr> | 
|---|
| [659] | 133 |  | 
|---|
|  | 134 | <tr class="prop"> | 
|---|
|  | 135 | <td valign="top" class="groupName"> | 
|---|
|  | 136 | <label for="parentItem">Parent Item:</label> | 
|---|
|  | 137 | </td> | 
|---|
|  | 138 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'parentItem','errors')}"> | 
|---|
|  | 139 | <g:if test="${assetSubItemInstance.assets}"> | 
|---|
|  | 140 | Level 1 sub item (Assigned directly to assets) | 
|---|
|  | 141 | </g:if> | 
|---|
|  | 142 | <g:else> | 
|---|
|  | 143 | <g:select optionKey="id" from="${possibleParentItems}" name="parentItem.id" value="${assetSubItemInstance?.parentItem?.id}" noSelection="['null':'--None--']"></g:select> | 
|---|
|  | 144 | </g:else> | 
|---|
|  | 145 | </td> | 
|---|
|  | 146 | </tr> | 
|---|
| [285] | 147 |  | 
|---|
|  | 148 | <tr class="prop"> | 
|---|
| [659] | 149 | <td valign="top" class="groupName"> | 
|---|
| [274] | 150 | <label for="subItems">Sub Items:</label> | 
|---|
|  | 151 | </td> | 
|---|
|  | 152 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'subItems','errors')}"> | 
|---|
|  | 153 |  | 
|---|
|  | 154 | <ul> | 
|---|
|  | 155 | <g:each var="s" in="${assetSubItemInstance?.subItems?}"> | 
|---|
|  | 156 | <li><g:link controller="assetSubItemDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> | 
|---|
|  | 157 | </g:each> | 
|---|
|  | 158 | </ul> | 
|---|
| [410] | 159 | <g:link controller="assetSubItemDetailed" params="['parentItem.id':assetSubItemInstance?.id]" action="create">+Add Sub Item</g:link> | 
|---|
| [274] | 160 |  | 
|---|
|  | 161 | </td> | 
|---|
|  | 162 | </tr> | 
|---|
|  | 163 |  | 
|---|
| [388] | 164 | <tr class="prop"> | 
|---|
| [659] | 165 | <td valign="top" class="groupHeader"> | 
|---|
|  | 166 | <label for="name">Maintenance Actions</label> | 
|---|
| [388] | 167 | </td> | 
|---|
| [659] | 168 | <td valign="top" class="value"> | 
|---|
| [388] | 169 | </td> | 
|---|
| [659] | 170 | </tr> | 
|---|
| [388] | 171 |  | 
|---|
| [659] | 172 | <g:each var="m" in="${assetSubItemInstance?.maintenanceActions?}"> | 
|---|
|  | 173 | <tr class="prop"> | 
|---|
|  | 174 | <td valign="top" class="name"> | 
|---|
|  | 175 | </td> | 
|---|
|  | 176 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'maintenanceActions','errors')}"> | 
|---|
|  | 177 | <g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> | 
|---|
|  | 178 | </td> | 
|---|
|  | 179 | </tr> | 
|---|
|  | 180 | </g:each> | 
|---|
|  | 181 |  | 
|---|
|  | 182 | <tr class="prop"> | 
|---|
|  | 183 | <td valign="top" class="groupHeader"> | 
|---|
|  | 184 | </td> | 
|---|
|  | 185 | <td valign="top" class="value"> | 
|---|
|  | 186 | <g:link controller="maintenanceActionDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Maintenance Action</g:link> | 
|---|
|  | 187 | </td> | 
|---|
|  | 188 | </tr> | 
|---|
|  | 189 |  | 
|---|
| [274] | 190 | </tbody> | 
|---|
|  | 191 | </table> | 
|---|
|  | 192 | </div> | 
|---|
|  | 193 | <div class="buttons"> | 
|---|
|  | 194 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> | 
|---|
| [348] | 195 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> | 
|---|
| [274] | 196 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> | 
|---|
|  | 197 | </div> | 
|---|
|  | 198 | </g:form> | 
|---|
|  | 199 | </div> | 
|---|
|  | 200 | </body> | 
|---|
|  | 201 | </html> | 
|---|