source: trunk/grails-app/views/taskDetailed/_showInventoryTab.gsp @ 822

Last change on this file since 822 was 822, checked in by gav, 13 years ago

Refactor task show view to use templates.

File size: 2.9 KB
RevLine 
[822]1    <g:if test="${inventoryMovementList.isEmpty()}">
2        <br />
3        No Inventory Movements.
4        <br />
5        <br />
6    </g:if>
7    <g:else>
8        <div class="list">
9            <table>
10                <thead>
11                    <tr>
12                        <th>Inventory Item</th>
13                        <th>Quantity</th>
14                        <th>Movement Type</th>
15                        <th>Date</th>
16                        <th></th>
17                    </tr>
18                </thead>
19                <tbody>
20                    <g:each in="${inventoryMovementList}" status="i" var="inventoryMovementInstance">
21                        <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/>
22
23                            <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${inventoryMovementInstance.id}"'>
24                                ${fieldValue(bean:inventoryMovementInstance, field:'inventoryItem')}
25                            </td>
26
27                            <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${inventoryMovementInstance.id}"'>
28                                ${fieldValue(bean:inventoryMovementInstance, field:'quantity')}
29                            </td>
30
31                            <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${inventoryMovementInstance.id}"'>
32                                ${fieldValue(bean:inventoryMovementInstance, field:'inventoryMovementType')}
33                            </td>
34
35                            <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${inventoryMovementInstance.id}"'>
36                                <g:formatDate date="${inventoryMovementInstance.date}" format="EEE, dd-MMM-yyyy"/>
37                            </td>
38
39                            <td class="notClickable">
40                                <g:link controller="inventoryMovementDetailed" action="show" id="${inventoryMovementInstance.id}">
41                                    <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" title="Show" />
42                                </g:link>
43                            </td>
44
45                        </tr>
46                    </g:each>
47                </tbody>
48            </table>
49        </div>
50    </g:else>
51
52    <g:form controller="inventoryItemDetailed" >
53        <g:hiddenField name="task.id" value="${taskInstance?.id}" />
54        <div class="buttons">
55            <g:if test="${!inventoryMovementList.isEmpty()}">
56                Results: ${inventoryMovementList.size()}
57                <br />
58            </g:if>
59            <span class="button">
60                <g:actionSubmit action="findInventoryItemForMovement" class="add" value="Add" />
61            </span>
62        </div>
63    </g:form>
Note: See TracBrowser for help on using the repository browser.