[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"> |
---|
[659] | 73 | <td valign="top" class="groupHeader"> |
---|
| 74 | <label for="name">Extended Attributes</label> |
---|
[274] | 75 | </td> |
---|
[659] | 76 | <td valign="top" class="value"> |
---|
[274] | 77 | </td> |
---|
[659] | 78 | </tr> |
---|
[274] | 79 | |
---|
[659] | 80 | <g:each var="a" in="${assetSubItemInstance?.assetSubItemExtendedAttributes?}"> |
---|
| 81 | <tr class="prop"> |
---|
| 82 | <td valign="top" class="name"> |
---|
| 83 | </td> |
---|
| 84 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'assetSubItemExtendedAttributes','errors')}"> |
---|
| 85 | <g:link controller="assetSubItemExtendedAttributeDetailed" action="show" id="${a.id}"> |
---|
| 86 | ${a?.encodeAsHTML()} |
---|
| 87 | </g:link> |
---|
| 88 | </td> |
---|
| 89 | </tr> |
---|
| 90 | </g:each> |
---|
| 91 | |
---|
[274] | 92 | <tr class="prop"> |
---|
[659] | 93 | <td valign="top" class="groupHeader"> |
---|
| 94 | </td> |
---|
| 95 | <td valign="top" class="value"> |
---|
| 96 | <g:link controller="assetSubItemExtendedAttributeDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Extended Attribute</g:link> |
---|
| 97 | </td> |
---|
| 98 | </tr> |
---|
| 99 | |
---|
[274] | 100 | <tr class="prop"> |
---|
[659] | 101 | |
---|
| 102 | <tr class="prop"> |
---|
| 103 | <td valign="top" class="groupHeader"> |
---|
| 104 | <label for="name">Asset Tree</label> |
---|
[285] | 105 | </td> |
---|
[659] | 106 | <td valign="top" class="value"> |
---|
[285] | 107 | </td> |
---|
[659] | 108 | </tr> |
---|
[285] | 109 | |
---|
| 110 | <tr class="prop"> |
---|
[659] | 111 | <td valign="top" class="groupName">Assets:</td> |
---|
[285] | 112 | |
---|
| 113 | <td valign="top" style="text-align:left;" class="value"> |
---|
[354] | 114 | <g:if test="${assetSubItemInstance.parentItem}" > |
---|
[659] | 115 | N/A (Assigned to parent item) |
---|
[354] | 116 | </g:if> |
---|
| 117 | <g:else> |
---|
[659] | 118 | <g:if test="${assetSubItemInstance.assets}"> |
---|
| 119 | <ul> |
---|
| 120 | <g:each var="a" in="${ assetSubItemInstance.assets.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
| 121 | <li><g:link controller="assetDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
| 122 | </g:each> |
---|
| 123 | </ul> |
---|
| 124 | </g:if> |
---|
| 125 | <g:else> |
---|
| 126 | May be assigned via asset edit view. |
---|
| 127 | </g:else> |
---|
[354] | 128 | </g:else> |
---|
[285] | 129 | </td> |
---|
| 130 | |
---|
| 131 | </tr> |
---|
[659] | 132 | |
---|
| 133 | <tr class="prop"> |
---|
| 134 | <td valign="top" class="groupName"> |
---|
| 135 | <label for="parentItem">Parent Item:</label> |
---|
| 136 | </td> |
---|
| 137 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'parentItem','errors')}"> |
---|
| 138 | <g:if test="${assetSubItemInstance.assets}"> |
---|
| 139 | Level 1 sub item (Assigned directly to assets) |
---|
| 140 | </g:if> |
---|
| 141 | <g:else> |
---|
| 142 | <g:select optionKey="id" from="${possibleParentItems}" name="parentItem.id" value="${assetSubItemInstance?.parentItem?.id}" noSelection="['null':'--None--']"></g:select> |
---|
| 143 | </g:else> |
---|
| 144 | </td> |
---|
| 145 | </tr> |
---|
[285] | 146 | |
---|
| 147 | <tr class="prop"> |
---|
[659] | 148 | <td valign="top" class="groupName"> |
---|
[274] | 149 | <label for="subItems">Sub Items:</label> |
---|
| 150 | </td> |
---|
| 151 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'subItems','errors')}"> |
---|
| 152 | |
---|
| 153 | <ul> |
---|
| 154 | <g:each var="s" in="${assetSubItemInstance?.subItems?}"> |
---|
| 155 | <li><g:link controller="assetSubItemDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
| 156 | </g:each> |
---|
| 157 | </ul> |
---|
[410] | 158 | <g:link controller="assetSubItemDetailed" params="['parentItem.id':assetSubItemInstance?.id]" action="create">+Add Sub Item</g:link> |
---|
[274] | 159 | |
---|
| 160 | </td> |
---|
| 161 | </tr> |
---|
| 162 | |
---|
[388] | 163 | <tr class="prop"> |
---|
[659] | 164 | <td valign="top" class="groupHeader"> |
---|
| 165 | <label for="name">Maintenance Actions</label> |
---|
[388] | 166 | </td> |
---|
[659] | 167 | <td valign="top" class="value"> |
---|
[388] | 168 | </td> |
---|
[659] | 169 | </tr> |
---|
[388] | 170 | |
---|
[659] | 171 | <g:each var="m" in="${assetSubItemInstance?.maintenanceActions?}"> |
---|
| 172 | <tr class="prop"> |
---|
| 173 | <td valign="top" class="name"> |
---|
| 174 | </td> |
---|
| 175 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'maintenanceActions','errors')}"> |
---|
| 176 | <g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
| 177 | </td> |
---|
| 178 | </tr> |
---|
| 179 | </g:each> |
---|
| 180 | |
---|
| 181 | <tr class="prop"> |
---|
| 182 | <td valign="top" class="groupHeader"> |
---|
| 183 | </td> |
---|
| 184 | <td valign="top" class="value"> |
---|
| 185 | <g:link controller="maintenanceActionDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Maintenance Action</g:link> |
---|
| 186 | </td> |
---|
| 187 | </tr> |
---|
| 188 | |
---|
[274] | 189 | </tbody> |
---|
| 190 | </table> |
---|
| 191 | </div> |
---|
| 192 | <div class="buttons"> |
---|
| 193 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
[348] | 194 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
[274] | 195 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 196 | </div> |
---|
| 197 | </g:form> |
---|
| 198 | </div> |
---|
| 199 | </body> |
---|
| 200 | </html> |
---|