Changeset 268 for trunk/grails-app/views/assetSubItem/edit.gsp
- Timestamp:
- Jan 14, 2010, 10:51:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/views/assetSubItem/edit.gsp
r178 r268 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 6 6 <meta name="layout" content="main" /> 7 <title>Edit Asset Type</title>7 <title>Edit AssetSubItem</title> 8 8 </head> 9 9 <body> 10 10 <div class="nav"> 11 <span class="menuButton"><g:link class="list" action="list">Asset TypeList</g:link></span>12 <span class="menuButton"><g:link class="create" action="create">New Asset Type</g:link></span>11 <span class="menuButton"><g:link class="list" action="list">AssetSubItem List</g:link></span> 12 <span class="menuButton"><g:link class="create" action="create">New AssetSubItem</g:link></span> 13 13 </div> 14 14 <div class="body"> 15 <h1>Edit Asset Type</h1>15 <h1>Edit AssetSubItem</h1> 16 16 <g:if test="${flash.message}"> 17 17 <div class="message">${flash.message}</div> 18 18 </g:if> 19 <g:hasErrors bean="${asset TypeInstance}">19 <g:hasErrors bean="${assetSubItemInstance}"> 20 20 <div class="errors"> 21 <g:renderErrors bean="${asset TypeInstance}" as="list" />21 <g:renderErrors bean="${assetSubItemInstance}" as="list" /> 22 22 </div> 23 23 </g:hasErrors> 24 24 <g:form method="post" > 25 <input type="hidden" name="id" value="${asset TypeInstance?.id}" />26 <input type="hidden" name="version" value="${asset TypeInstance?.version}" />25 <input type="hidden" name="id" value="${assetSubItemInstance?.id}" /> 26 <input type="hidden" name="version" value="${assetSubItemInstance?.version}" /> 27 27 <div class="dialog"> 28 28 <table> … … 31 31 <tr class="prop"> 32 32 <td valign="top" class="name"> 33 <label for=" assemblies">Assemblies:</label>33 <label for="name">Name:</label> 34 34 </td> 35 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'assemblies','errors')}"> 36 37 <ul> 38 <g:each var="a" in="${assetTypeInstance?.assemblies?}"> 39 <li><g:link controller="assembly" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 40 </g:each> 41 </ul> 42 <g:link controller="assembly" params="['assetType.id':assetTypeInstance?.id]" action="create">Add Assembly</g:link> 43 44 </td> 45 </tr> 46 47 <tr class="prop"> 48 <td valign="top" class="name"> 49 <label for="assets">Assets:</label> 50 </td> 51 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'assets','errors')}"> 52 53 <ul> 54 <g:each var="a" in="${assetTypeInstance?.assets?}"> 55 <li><g:link controller="asset" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 56 </g:each> 57 </ul> 58 <g:link controller="asset" params="['assetType.id':assetTypeInstance?.id]" action="create">Add Asset</g:link> 59 60 </td> 61 </tr> 62 63 <tr class="prop"> 64 <td valign="top" class="name"> 65 <label for="costCode">Cost Code:</label> 66 </td> 67 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'costCode','errors')}"> 68 <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:assetTypeInstance,field:'costCode')}"/> 35 <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'name','errors')}"> 36 <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:assetSubItemInstance,field:'name')}"/> 69 37 </td> 70 38 </tr> … … 74 42 <label for="description">Description:</label> 75 43 </td> 76 <td valign="top" class="value ${hasErrors(bean:asset TypeInstance,field:'description','errors')}">77 <input type="text" id="description" name="description" value="${fieldValue(bean:assetTypeInstance,field:'description')}"/>44 <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'description','errors')}"> 45 <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:assetSubItemInstance,field:'description')}"/> 78 46 </td> 79 47 </tr> … … 83 51 <label for="isActive">Is Active:</label> 84 52 </td> 85 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'isActive','errors')}"> 86 <g:checkBox name="isActive" value="${assetTypeInstance?.isActive}" ></g:checkBox> 53 <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'isActive','errors')}"> 54 <g:checkBox name="isActive" value="${assetSubItemInstance?.isActive}" ></g:checkBox> 55 </td> 56 </tr> 57 58 <tr class="prop"> 59 <td valign="top" class="name"> 60 <label for="asset">Asset:</label> 61 </td> 62 <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'asset','errors')}"> 63 <g:select optionKey="id" from="${Asset.list()}" name="asset.id" value="${assetSubItemInstance?.asset?.id}" noSelection="['null':'']"></g:select> 64 </td> 65 </tr> 66 67 <tr class="prop"> 68 <td valign="top" class="name"> 69 <label for="parentItem">Parent Item:</label> 70 </td> 71 <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'parentItem','errors')}"> 72 <g:select optionKey="id" from="${AssetSubItem.list()}" name="parentItem.id" value="${assetSubItemInstance?.parentItem?.id}" noSelection="['null':'']"></g:select> 73 </td> 74 </tr> 75 76 <tr class="prop"> 77 <td valign="top" class="name"> 78 <label for="assetSubItemExtendedAttributes">Asset Sub Item Extended Attributes:</label> 79 </td> 80 <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'assetSubItemExtendedAttributes','errors')}"> 81 82 <ul> 83 <g:each var="a" in="${assetSubItemInstance?.assetSubItemExtendedAttributes?}"> 84 <li><g:link controller="assetSubItemExtendedAttribute" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> 85 </g:each> 86 </ul> 87 <g:link controller="assetSubItemExtendedAttribute" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">Add AssetSubItemExtendedAttribute</g:link> 88 87 89 </td> 88 90 </tr> … … 92 94 <label for="maintenanceActions">Maintenance Actions:</label> 93 95 </td> 94 <td valign="top" class="value ${hasErrors(bean:asset TypeInstance,field:'maintenanceActions','errors')}">96 <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'maintenanceActions','errors')}"> 95 97 96 98 <ul> 97 <g:each var="m" in="${asset TypeInstance?.maintenanceActions?}">99 <g:each var="m" in="${assetSubItemInstance?.maintenanceActions?}"> 98 100 <li><g:link controller="maintenanceAction" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> 99 101 </g:each> 100 102 </ul> 101 <g:link controller="maintenanceAction" params="['asset Type.id':assetTypeInstance?.id]" action="create">Add MaintenanceAction</g:link>103 <g:link controller="maintenanceAction" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">Add MaintenanceAction</g:link> 102 104 103 105 </td> … … 106 108 <tr class="prop"> 107 109 <td valign="top" class="name"> 108 <label for=" name">Name:</label>110 <label for="subItems">Sub Items:</label> 109 111 </td> 110 <td valign="top" class="value ${hasErrors(bean:assetTypeInstance,field:'name','errors')}"> 111 <input type="text" id="name" name="name" value="${fieldValue(bean:assetTypeInstance,field:'name')}"/> 112 <td valign="top" class="value ${hasErrors(bean:assetSubItemInstance,field:'subItems','errors')}"> 113 114 <ul> 115 <g:each var="s" in="${assetSubItemInstance?.subItems?}"> 116 <li><g:link controller="assetSubItem" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> 117 </g:each> 118 </ul> 119 <g:link controller="assetSubItem" params="['assetSubItem.id':assetSubItemInstance?.id]" action="create">Add AssetSubItem</g:link> 120 112 121 </td> 113 122 </tr>
Note: See TracChangeset
for help on using the changeset viewer.