[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"> |
---|
| 29 | <td valign="top" class="name"> |
---|
| 30 | <label for="name">Name:</label> |
---|
| 31 | </td> |
---|
| 32 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'name','errors')}"> |
---|
[330] | 33 | <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:assetSubItemInstance,field:'name')}"/> |
---|
[274] | 34 | </td> |
---|
| 35 | </tr> |
---|
| 36 | |
---|
| 37 | <tr class="prop"> |
---|
| 38 | <td valign="top" class="name"> |
---|
| 39 | <label for="description">Description:</label> |
---|
| 40 | </td> |
---|
| 41 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'description','errors')}"> |
---|
[330] | 42 | <input type="text" class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:assetSubItemInstance,field:'description')}"/> |
---|
[274] | 43 | </td> |
---|
[330] | 44 | </tr> |
---|
| 45 | |
---|
| 46 | <tr class="prop"> |
---|
| 47 | <td valign="top" class="name"> |
---|
| 48 | <label for="comment">Comment:</label> |
---|
| 49 | </td> |
---|
| 50 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'comment','errors')}"> |
---|
| 51 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:assetSubItemInstance, field:'comment')}</textarea> |
---|
| 52 | </td> |
---|
[274] | 53 | </tr> |
---|
| 54 | |
---|
| 55 | <tr class="prop"> |
---|
| 56 | <td valign="top" class="name"> |
---|
| 57 | <label for="isActive">Is Active:</label> |
---|
| 58 | </td> |
---|
| 59 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'isActive','errors')}"> |
---|
| 60 | <g:checkBox name="isActive" value="${assetSubItemInstance?.isActive}" ></g:checkBox> |
---|
| 61 | </td> |
---|
| 62 | </tr> |
---|
| 63 | |
---|
| 64 | <tr class="prop"> |
---|
| 65 | <td valign="top" class="name"> |
---|
[388] | 66 | <label for="assetSubItemExtendedAttributes">Extended Attributes:</label> |
---|
[274] | 67 | </td> |
---|
| 68 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'assetSubItemExtendedAttributes','errors')}"> |
---|
| 69 | |
---|
| 70 | <ul> |
---|
| 71 | <g:each var="a" in="${assetSubItemInstance?.assetSubItemExtendedAttributes?}"> |
---|
| 72 | <li><g:link controller="assetSubItemExtendedAttributeDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
| 73 | </g:each> |
---|
| 74 | </ul> |
---|
[410] | 75 | <g:link controller="assetSubItemExtendedAttributeDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Extended Attribute</g:link> |
---|
[274] | 76 | |
---|
| 77 | </td> |
---|
[276] | 78 | </tr> |
---|
[274] | 79 | |
---|
| 80 | <tr class="prop"> |
---|
[352] | 81 | |
---|
[274] | 82 | <tr class="prop"> |
---|
| 83 | <td valign="top" class="name"> |
---|
[285] | 84 | <label for="parentItem">Parent Item:</label> |
---|
| 85 | </td> |
---|
| 86 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'parentItem','errors')}"> |
---|
[352] | 87 | <g:if test="${assetSubItemInstance.assets}"> |
---|
| 88 | Assigned to assets. |
---|
| 89 | </g:if> |
---|
| 90 | <g:else> |
---|
| 91 | <g:select optionKey="id" from="${possibleParentItems}" name="parentItem.id" value="${assetSubItemInstance?.parentItem?.id}" noSelection="['null':'--None--']"></g:select> |
---|
| 92 | </g:else> |
---|
[285] | 93 | </td> |
---|
[352] | 94 | </tr> |
---|
[285] | 95 | |
---|
| 96 | <tr class="prop"> |
---|
| 97 | <td valign="top" class="name">Assets:</td> |
---|
| 98 | |
---|
| 99 | <td valign="top" style="text-align:left;" class="value"> |
---|
[354] | 100 | <g:if test="${assetSubItemInstance.parentItem}" > |
---|
| 101 | Assigned to parent item. |
---|
| 102 | </g:if> |
---|
| 103 | <g:else> |
---|
| 104 | <ul> |
---|
[388] | 105 | <g:each var="a" in="${ assetSubItemInstance.assets.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
[354] | 106 | <li><g:link controller="assetDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
| 107 | </g:each> |
---|
| 108 | </ul> |
---|
| 109 | </g:else> |
---|
[285] | 110 | </td> |
---|
| 111 | |
---|
| 112 | </tr> |
---|
| 113 | |
---|
| 114 | <tr class="prop"> |
---|
| 115 | <td valign="top" class="name"> |
---|
[274] | 116 | <label for="subItems">Sub Items:</label> |
---|
| 117 | </td> |
---|
| 118 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'subItems','errors')}"> |
---|
| 119 | |
---|
| 120 | <ul> |
---|
| 121 | <g:each var="s" in="${assetSubItemInstance?.subItems?}"> |
---|
| 122 | <li><g:link controller="assetSubItemDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
| 123 | </g:each> |
---|
| 124 | </ul> |
---|
[410] | 125 | <g:link controller="assetSubItemDetailed" params="['parentItem.id':assetSubItemInstance?.id]" action="create">+Add Sub Item</g:link> |
---|
[274] | 126 | |
---|
| 127 | </td> |
---|
| 128 | </tr> |
---|
| 129 | |
---|
[388] | 130 | <tr class="prop"> |
---|
| 131 | <td valign="top" class="name"> |
---|
| 132 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
| 133 | </td> |
---|
| 134 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'maintenanceActions','errors')}"> |
---|
| 135 | |
---|
| 136 | <ul> |
---|
| 137 | <g:each var="m" in="${assetSubItemInstance?.maintenanceActions?}"> |
---|
| 138 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
| 139 | </g:each> |
---|
| 140 | </ul> |
---|
[410] | 141 | <g:link controller="maintenanceActionDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">+Add Maintenance Action</g:link> |
---|
[388] | 142 | |
---|
| 143 | </td> |
---|
| 144 | </tr> |
---|
| 145 | |
---|
[274] | 146 | </tbody> |
---|
| 147 | </table> |
---|
| 148 | </div> |
---|
| 149 | <div class="buttons"> |
---|
| 150 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
[348] | 151 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
[274] | 152 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 153 | </div> |
---|
| 154 | </g:form> |
---|
| 155 | </div> |
---|
| 156 | </body> |
---|
| 157 | </html> |
---|