Ignore:
Timestamp:
Oct 29, 2009, 8:30:58 PM (14 years ago)
Author:
gav
Message:

Substantial refactor of the Inventory domain.
InventoryItems can now be added to tasks, no quantity adjustments done yet.
Removed StoredItem and with it the ability to store an inventoryItem in multiple places, just too complex right now.
Svn move StoreLocation to InventoryLocation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/taskDetailed/show.gsp

    r168 r175  
    194194                                        <th>Entered By</th>
    195195                                        <th></th>
    196 
    197             <!--                            <g:sortableColumn property="comment" title="Comment" />
    198 
    199                                         <g:sortableColumn property="dateDone" title="Date Done" />
    200 
    201                                         <g:sortableColumn property="enteredBy" title="Entered By" />-->
    202196                                    </tr>
    203197                                </thead>
     
    288282                                <div class="buttons">
    289283                                    <span class="button">
    290                                         <g:actionSubmit value="New" action="create"  class="add"/>
     284                                        <g:actionSubmit value="New" action="create" class="add"/>
    291285                                    </span>
    292286                                    <span class="button">
    293                                         <g:actionSubmit value="Search" action="search"  class="search"/>
     287                                        <g:actionSubmit value="Search" action="search" class="search"/>
    294288                                    </span>
    295289                                </div>
     
    506500<!-- Start Inventory tab -->
    507501                    <richui:tabContent>
    508                         Used Inventory
     502
     503                        <g:if test="${inventoryMovementList.isEmpty()}">
     504                            <br />
     505                            No Inventory Used.
     506                            <br />
     507                            <br />
     508                        </g:if>
     509                        <g:else>
     510                            <div class="list">
     511                                <table>
     512                                    <thead>
     513                                        <tr>
     514                                            <th>Inventory Item</th>
     515                                            <th>Quantity</th>
     516                                            <th>Movement Type</th>
     517                                            <th>Date</th>
     518                                            <th></th>
     519                                        </tr>
     520                                    </thead>
     521                                    <tbody>
     522                                        <g:each in="${inventoryMovementList}" status="i" var="inventoryMovementInstance">
     523                                            <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${inventoryMovementInstance.id}"'/>
     524
     525                                                <td>${fieldValue(bean:inventoryMovementInstance, field:'inventoryItem')}</td>
     526                                                <td>${fieldValue(bean:inventoryMovementInstance, field:'quantity')}</td>
     527                                                <td>${fieldValue(bean:inventoryMovementInstance, field:'inventoryMovementType')}</td>
     528                                                <td><g:formatDate date="${inventoryMovementInstance.date}" format="EEE, dd-MMM-yyyy"/></td>
     529                                                <td>
     530                                                    <g:link controller="inventoryMovementDetailed" action="show" id="${inventoryMovementInstance.id}">
     531                                                        <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
     532                                                    </g:link>
     533                                                </td>
     534
     535                                            </tr>
     536                                        </g:each>
     537                                    </tbody>
     538                                </table>
     539                            </div>
     540                        </g:else>
     541
     542                        <g:form controller="inventoryMovementDetailed" >
     543                            <input type="hidden" name="task.id" value="${taskInstance?.id}" />
     544                            <div class="buttons">
     545                                <g:if test="${!inventoryMovementList.isEmpty()}">
     546                                    Results: ${inventoryMovementList.size()}
     547                                    <br />
     548                                </g:if>
     549                                <span class="button">
     550                                    <g:actionSubmit value="Add" action="create"  class="add"/>
     551                                </span>
     552                            </div>
     553                        </g:form>
     554
    509555                    </richui:tabContent>
    510556<!-- End Inventory tab -->
Note: See TracChangeset for help on using the changeset viewer.