[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 Assembly</title> |
---|
| 8 | </head> |
---|
| 9 | <body> |
---|
| 10 | <div class="nav"> |
---|
| 11 | <span class="menuButton"><g:link class="list" action="list">Assembly List</g:link></span> |
---|
| 12 | <span class="menuButton"><g:link class="create" action="create">New Assembly</g:link></span> |
---|
| 13 | </div> |
---|
| 14 | <div class="body"> |
---|
| 15 | <h1>Edit Assembly</h1> |
---|
| 16 | <g:if test="${flash.message}"> |
---|
| 17 | <div class="message">${flash.message}</div> |
---|
| 18 | </g:if> |
---|
| 19 | <g:hasErrors bean="${assemblyInstance}"> |
---|
| 20 | <div class="errors"> |
---|
| 21 | <g:renderErrors bean="${assemblyInstance}" as="list" /> |
---|
| 22 | </div> |
---|
| 23 | </g:hasErrors> |
---|
| 24 | <g:form method="post" > |
---|
| 25 | <input type="hidden" name="id" value="${assemblyInstance?.id}" /> |
---|
| 26 | <input type="hidden" name="version" value="${assemblyInstance?.version}" /> |
---|
| 27 | <div class="dialog"> |
---|
| 28 | <table> |
---|
| 29 | <tbody> |
---|
| 30 | |
---|
| 31 | <tr class="prop"> |
---|
| 32 | <td valign="top" class="name"> |
---|
[131] | 33 | <label for="assetType">Asset Type:</label> |
---|
[118] | 34 | </td> |
---|
[131] | 35 | <td valign="top" class="value ${hasErrors(bean:assemblyInstance,field:'assetType','errors')}"> |
---|
| 36 | <g:select optionKey="id" from="${AssetType.list()}" name="assetType.id" value="${assemblyInstance?.assetType?.id}" ></g:select> |
---|
[118] | 37 | </td> |
---|
| 38 | </tr> |
---|
| 39 | |
---|
| 40 | <tr class="prop"> |
---|
| 41 | <td valign="top" class="name"> |
---|
| 42 | <label for="description">Description:</label> |
---|
| 43 | </td> |
---|
| 44 | <td valign="top" class="value ${hasErrors(bean:assemblyInstance,field:'description','errors')}"> |
---|
| 45 | <input type="text" id="description" name="description" value="${fieldValue(bean:assemblyInstance,field:'description')}"/> |
---|
| 46 | </td> |
---|
| 47 | </tr> |
---|
| 48 | |
---|
| 49 | <tr class="prop"> |
---|
| 50 | <td valign="top" class="name"> |
---|
| 51 | <label for="isActive">Is Active:</label> |
---|
| 52 | </td> |
---|
| 53 | <td valign="top" class="value ${hasErrors(bean:assemblyInstance,field:'isActive','errors')}"> |
---|
| 54 | <g:checkBox name="isActive" value="${assemblyInstance?.isActive}" ></g:checkBox> |
---|
| 55 | </td> |
---|
| 56 | </tr> |
---|
| 57 | |
---|
| 58 | <tr class="prop"> |
---|
| 59 | <td valign="top" class="name"> |
---|
[122] | 60 | <label for="maintenanceActions">Maintenance Actions:</label> |
---|
[118] | 61 | </td> |
---|
[122] | 62 | <td valign="top" class="value ${hasErrors(bean:assemblyInstance,field:'maintenanceActions','errors')}"> |
---|
| 63 | |
---|
| 64 | <ul> |
---|
| 65 | <g:each var="m" in="${assemblyInstance?.maintenanceActions?}"> |
---|
| 66 | <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
| 67 | </g:each> |
---|
| 68 | </ul> |
---|
| 69 | <g:link controller="maintenanceAction" params="['assembly.id':assemblyInstance?.id]" action="create">Add MaintenanceAction</g:link> |
---|
| 70 | |
---|
[118] | 71 | </td> |
---|
| 72 | </tr> |
---|
| 73 | |
---|
| 74 | <tr class="prop"> |
---|
| 75 | <td valign="top" class="name"> |
---|
| 76 | <label for="name">Name:</label> |
---|
| 77 | </td> |
---|
| 78 | <td valign="top" class="value ${hasErrors(bean:assemblyInstance,field:'name','errors')}"> |
---|
| 79 | <input type="text" id="name" name="name" value="${fieldValue(bean:assemblyInstance,field:'name')}"/> |
---|
| 80 | </td> |
---|
| 81 | </tr> |
---|
| 82 | |
---|
| 83 | <tr class="prop"> |
---|
| 84 | <td valign="top" class="name"> |
---|
| 85 | <label for="subAssemblies">Sub Assemblies:</label> |
---|
| 86 | </td> |
---|
| 87 | <td valign="top" class="value ${hasErrors(bean:assemblyInstance,field:'subAssemblies','errors')}"> |
---|
[131] | 88 | |
---|
| 89 | <ul> |
---|
| 90 | <g:each var="s" in="${assemblyInstance?.subAssemblies?}"> |
---|
| 91 | <li><g:link controller="subAssembly" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
| 92 | </g:each> |
---|
| 93 | </ul> |
---|
| 94 | <g:link controller="subAssembly" params="['assembly.id':assemblyInstance?.id]" action="create">Add SubAssembly</g:link> |
---|
[118] | 95 | |
---|
| 96 | </td> |
---|
| 97 | </tr> |
---|
| 98 | |
---|
| 99 | </tbody> |
---|
| 100 | </table> |
---|
| 101 | </div> |
---|
| 102 | <div class="buttons"> |
---|
| 103 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
| 104 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
| 105 | </div> |
---|
| 106 | </g:form> |
---|
| 107 | </div> |
---|
| 108 | </body> |
---|
| 109 | </html> |
---|