Changeset 633 for trunk/grails-app/views/inventoryItemPurchaseDetailed
- Timestamp:
- Jul 19, 2010, 8:47:38 AM (15 years ago)
- Location:
- trunk/grails-app/views/inventoryItemPurchaseDetailed
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/views/inventoryItemPurchaseDetailed/create.gsp
r609 r633 15 15 <div class="body"> 16 16 <g:render template="/shared/messages" /> 17 <g:if test="${!costCodes}" > 18 <div class="errors"> 19 <ul> 20 <li><g:message code="inventoryItemPurchase.costCodes.not.found" /><li> 21 </div> 22 </g:if> 17 23 <g:hasErrors bean="${inventoryItemPurchaseInstance}"> 18 24 <div class="errors"> … … 66 72 <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'costCode','errors')}"> 67 73 <g:select optionKey="id" 68 from="${ CostCode.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"74 from="${ costCodes }" 69 75 name="costCode.id" 70 76 value="${inventoryItemPurchaseInstance?.costCode?.id}" -
trunk/grails-app/views/inventoryItemPurchaseDetailed/edit.gsp
r609 r633 59 59 </td> 60 60 </tr> 61 61 62 62 <tr class="prop"> 63 63 <td valign="top" class="name"> … … 65 65 </td> 66 66 <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'costCode','errors')}"> 67 <g:select optionKey="id" 68 from="${ CostCode.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" 69 name="costCode.id" 70 value="${inventoryItemPurchaseInstance?.costCode?.id}" > 71 </g:select> 67 <g:if test="${costCodes}"> 68 <g:select optionKey="id" 69 from="${ costCodes }" 70 name="costCode.id" 71 value="${inventoryItemPurchaseInstance.costCode?.id}" > 72 </g:select> 73 </g:if> 74 <g:else> 75 <g:link controller="costCodeDetailed" action="show" id="${inventoryItemPurchaseInstance?.costCode?.id}"> 76 ${inventoryItemPurchaseInstance?.costCode?.encodeAsHTML()} 77 </g:link> 78 </g:else> 72 79 <g:helpBalloon code="inventoryItemPurchase.cost.code" /> 73 80 </td> … … 96 103 from="${ Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" 97 104 name="supplier.id" 98 value="${inventoryItemPurchaseInstance?.supplier?.id}" 99 noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> 105 value="${inventoryItemPurchaseInstance?.supplier?.id}"> 100 106 </g:select> 101 107 <g:helpBalloon code="inventoryItemPurchase.supplier" />
Note: See TracChangeset
for help on using the changeset viewer.