[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"> |
---|
| 66 | <label for="assetSubItemExtendedAttributes">Asset Sub Item Extended Attributes:</label> |
---|
| 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> |
---|
| 75 | <g:link controller="assetSubItemExtendedAttributeDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">Add AssetSubItemExtendedAttribute</g:link> |
---|
| 76 | |
---|
| 77 | </td> |
---|
[276] | 78 | </tr> |
---|
[274] | 79 | |
---|
| 80 | <tr class="prop"> |
---|
[276] | 81 | |
---|
| 82 | <tr class="prop"> |
---|
[274] | 83 | <td valign="top" class="name"> |
---|
| 84 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
| 85 | </td> |
---|
| 86 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'maintenanceActions','errors')}"> |
---|
| 87 | |
---|
| 88 | <ul> |
---|
| 89 | <g:each var="m" in="${assetSubItemInstance?.maintenanceActions?}"> |
---|
| 90 | <li><g:link controller="maintenanceActionDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
| 91 | </g:each> |
---|
| 92 | </ul> |
---|
| 93 | <g:link controller="maintenanceActionDetailed" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">Add MaintenanceAction</g:link> |
---|
| 94 | |
---|
| 95 | </td> |
---|
[285] | 96 | </tr> |
---|
[352] | 97 | |
---|
| 98 | |
---|
[274] | 99 | <tr class="prop"> |
---|
| 100 | <td valign="top" class="name"> |
---|
[285] | 101 | <label for="parentItem">Parent Item:</label> |
---|
| 102 | </td> |
---|
| 103 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'parentItem','errors')}"> |
---|
[352] | 104 | <g:if test="${assetSubItemInstance.assets}"> |
---|
| 105 | Assigned to assets. |
---|
| 106 | </g:if> |
---|
| 107 | <g:else> |
---|
| 108 | <g:select optionKey="id" from="${possibleParentItems}" name="parentItem.id" value="${assetSubItemInstance?.parentItem?.id}" noSelection="['null':'--None--']"></g:select> |
---|
| 109 | </g:else> |
---|
[285] | 110 | </td> |
---|
[352] | 111 | </tr> |
---|
[285] | 112 | |
---|
| 113 | <tr class="prop"> |
---|
| 114 | <td valign="top" class="name">Assets:</td> |
---|
| 115 | |
---|
| 116 | <td valign="top" style="text-align:left;" class="value"> |
---|
[354] | 117 | <g:if test="${assetSubItemInstance.parentItem}" > |
---|
| 118 | Assigned to parent item. |
---|
| 119 | </g:if> |
---|
| 120 | <g:else> |
---|
| 121 | <ul> |
---|
| 122 | <g:each var="a" in="${assetSubItemInstance.assets}"> |
---|
| 123 | <li><g:link controller="assetDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
| 124 | </g:each> |
---|
| 125 | </ul> |
---|
| 126 | </g:else> |
---|
[285] | 127 | </td> |
---|
| 128 | |
---|
| 129 | </tr> |
---|
| 130 | |
---|
| 131 | <tr class="prop"> |
---|
| 132 | <td valign="top" class="name"> |
---|
[274] | 133 | <label for="subItems">Sub Items:</label> |
---|
| 134 | </td> |
---|
| 135 | <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'subItems','errors')}"> |
---|
| 136 | |
---|
| 137 | <ul> |
---|
| 138 | <g:each var="s" in="${assetSubItemInstance?.subItems?}"> |
---|
| 139 | <li><g:link controller="assetSubItemDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
| 140 | </g:each> |
---|
| 141 | </ul> |
---|
[285] | 142 | <g:link controller="assetSubItemDetailed" params="['parentItem.id':assetSubItemInstance?.id]" action="create">Add AssetSubItem</g:link> |
---|
[274] | 143 | |
---|
| 144 | </td> |
---|
| 145 | </tr> |
---|
| 146 | |
---|
| 147 | </tbody> |
---|
| 148 | </table> |
---|
| 149 | </div> |
---|
| 150 | <div class="buttons"> |
---|
| 151 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
[348] | 152 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
[274] | 153 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 154 | </div> |
---|
| 155 | </g:form> |
---|
| 156 | </div> |
---|
| 157 | </body> |
---|
| 158 | </html> |
---|