[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> |
---|
[749] | 132 | |
---|
[118] | 133 | <tr class="prop"> |
---|
[749] | 134 | <td valign="top" class="groupHeader">Life Plan</td> |
---|
| 135 | |
---|
| 136 | <td valign="top" style="text-align:left;" class="value"> |
---|
[118] | 137 | </td> |
---|
[749] | 138 | |
---|
| 139 | </tr> |
---|
| 140 | |
---|
| 141 | <g:each var="t" in="${parentPMs}"> |
---|
[655] | 142 | <tr class="prop"> |
---|
[749] | 143 | <td valign="top" class="name"></td> |
---|
| 144 | |
---|
| 145 | <td valign="top" style="text-align:left;" class="value"> |
---|
| 146 | <g:link controller="taskDetailed" action="show" id="${t.id}"> |
---|
| 147 | Task #${t.id} |
---|
| 148 | </g:link> |
---|
| 149 | <g:if test="${t.approved}" > |
---|
| 150 | <img src="${resource(dir:'images/skin',file:'cog.png')}" alt="Approved" title="Approved" /> |
---|
| 151 | </g:if> |
---|
| 152 | <g:if test="${t.taskRecurringSchedule?.enabled}" > |
---|
| 153 | <img src="${resource(dir:'images/skin',file:'arrow_refresh.png')}" alt="Recurrence Enabled" title="Recurrence Enabled" /> |
---|
| 154 | </g:if> |
---|
| 155 | <g:if test="${t.taskStatus.id == 2}" > |
---|
| 156 | <img src="${resource(dir:'images/skin',file:'arrow_right.png')}" alt="In Progress" title="In Progress" /> |
---|
| 157 | </g:if> |
---|
| 158 | <g:if test="${t.attentionFlag}" > |
---|
| 159 | <img src="${resource(dir:'images/skin',file:'flag_red.png')}" alt="Attention Flag" title="Attention Flag" /> |
---|
| 160 | </g:if> |
---|
| 161 | <g:if test="${t.taskStatus.id == 3}" > |
---|
| 162 | <img src="${resource(dir:'images/skin',file:'tick.png')}" alt="Complete" title="Complete" /> |
---|
| 163 | </g:if> |
---|
| 164 | <br /> |
---|
| 165 | ${fieldValue(bean:t, field:'description')} |
---|
| 166 | <br /> |
---|
| 167 | <g:if test="${t.safetyRequirement}" > |
---|
| 168 | <img src="${resource(dir:'images/skin',file:'lightning.png')}" alt="Safety Requirement" title="Safety Requirement" /> |
---|
| 169 | Safety |
---|
| 170 | </g:if> |
---|
| 171 | <g:if test="${t.regulatoryRequirement}" > |
---|
| 172 | <img src="${resource(dir:'images/skin',file:'script_lightning.png')}" alt="Regulatory Requirement" title="Regulatory Requirement" /> |
---|
| 173 | Regulatory |
---|
| 174 | </g:if> |
---|
| 175 | <g:if test="${t.mandatoryRequirement}" > |
---|
| 176 | <img src="${resource(dir:'images/skin',file:'script.png')}" alt="Mandatory Requirement" title="Mandatory Requirement" /> |
---|
| 177 | Mandatory |
---|
| 178 | </g:if> |
---|
[655] | 179 | </td> |
---|
[749] | 180 | |
---|
[655] | 181 | </tr> |
---|
| 182 | </g:each> |
---|
| 183 | |
---|
| 184 | <tr class="prop"> |
---|
| 185 | <td valign="top" class="name"></td> |
---|
| 186 | <td valign="top" style="text-align:left;" class="value"> |
---|
[749] | 187 | <g:link controller="taskDetailed" params="['primaryAsset.id':assetInstance?.id, 'taskType.id':6]" action="create">+Add ParentPM</g:link> |
---|
[655] | 188 | </td> |
---|
| 189 | </tr> |
---|
| 190 | |
---|
[118] | 191 | </tbody> |
---|
| 192 | </table> |
---|
| 193 | </div> |
---|
| 194 | <div class="buttons"> |
---|
| 195 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
[370] | 196 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
[118] | 197 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 198 | </div> |
---|
| 199 | </g:form> |
---|
| 200 | </div> |
---|
| 201 | </body> |
---|
| 202 | </html> |
---|