Ignore:
Timestamp:
Jun 11, 2010, 11:44:49 AM (14 years ago)
Author:
gav
Message:

Improve work flow when working from inventoryItemPurchase search view.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/inventoryItemPurchaseDetailed/search.gsp

    r570 r595  
    1010    <body>
    1111        <div class="nav">
    12             <h1>Inventory Purchases</h1>
     12            <nav:renderSubItems group="navAlt"/>
    1313        </div>
    1414
     
    110110                                <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/>
    111111
    112                                     <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'>
     112                                    <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'>
    113113                                        ${fieldValue(bean:purchase, field:'purchaseOrderNumber')}
    114114                                    </td>
    115                                     <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'>
     115                                    <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'>
    116116                                        <g:formatDate date="${purchase.dateEntered}" format="EEE, dd-MMM-yyyy"/>
    117117                                    </td>
    118                                     <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'>
     118                                    <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'>
    119119                                        ${fieldValue(bean:purchase, field:'costCode')}
    120120                                    </td>
    121                                     <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'>
     121                                    <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'>
    122122                                        ${fieldValue(bean:purchase, field:'quantity')}
    123123                                    </td>
    124                                     <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'>
     124                                    <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'>
    125125                                        ${fieldValue(bean:purchase, field:'orderValueAmount')}
    126126                                        ${fieldValue(bean:purchase, field:'orderValueCurrency')}
    127127                                    </td>
    128                                     <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'>
     128                                    <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'>
    129129                                        ${fieldValue(bean:purchase, field:'invoiceNumber')}
    130130                                    </td>
    131                                     <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'>
     131                                    <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'>
    132132                                        ${fieldValue(bean:purchase, field:'inventoryItemPurchaseType')}
    133133                                    </td>
    134134                                    <td class="notClickable">
    135                                         <g:link controller="inventoryItemPurchaseDetailed" action="show" id="${purchase.id}">
     135                                        <g:link controller="inventoryItemPurchaseDetailed" action="show" params="[id: purchase.id, returnTo: 'search']">
    136136                                            <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" title="Show" />
    137137                                        </g:link>
    138138                                    </td>
     139
    139140                                    <g:if test="${purchase.inventoryItemPurchaseType.id == 1}">
    140141                                        <g:if test="${!purchase.receivedComplete}">
    141142                                            <td class="notClickable">
    142                                                 <g:link controller="inventoryItemPurchaseDetailed" action="receive" id="${purchase.id}">
     143                                                <g:link controller="inventoryItemPurchaseDetailed" action="receive" params="[id: purchase.id, returnTo: 'search']">
    143144                                                    <img  src="${resource(dir:'images/skin',file:'basket_put.png')}" alt="Receive" title="Receive" />
    144145                                                </g:link>
    145146                                            </td>
     147                                            <td class="notClickable">
     148                                            </td>
    146149                                        </g:if>
    147150                                        <g:else>
    148151                                            <td class="notClickable">
    149152                                            </td>
     153                                            <td class="notClickable">
     154                                            </td>
    150155                                        </g:else>
     156                                    </g:if>
     157                                    <g:elseif test="${(purchase.inventoryItemPurchaseType.id == 2)||(purchase.inventoryItemPurchaseType.id == 3)}">
    151158                                        <g:if test="${!purchase.invoicePaymentApproved}">
    152159                                            <td class="notClickable">
    153                                                 <g:link controller="inventoryItemPurchaseDetailed" action="approveInvoicePayment" id="${purchase.id}">
     160                                            </td>
     161                                            <td class="notClickable">
     162                                                <g:link controller="inventoryItemPurchaseDetailed" action="approveInvoicePayment" params="[id: purchase.id, returnTo: 'search']">
    154163                                                    <img  src="${resource(dir:'images/skin',file:'tick.png')}" alt="Approve" title="Approve Payment" />
    155164                                                </g:link>
     
    159168                                            <td class="notClickable">
    160169                                            </td>
     170                                            <td class="notClickable">
     171                                            </td>
    161172                                        </g:else>
    162                                     </g:if>
     173                                    </g:elseif>
    163174                                    <g:else>
    164175                                        <td class="notClickable">
Note: See TracChangeset for help on using the changeset viewer.