]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/acq/po/view.tt2
Add title to PO view page.
[working/Evergreen.git] / Open-ILS / web / templates / default / acq / po / view.tt2
1 [% WRAPPER 'default/base.tt2' %]
2 [% ctx.page_title = "Purchase Order" %]
3 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/common/base64.js"></script>
4 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/acq/po/view_po.js'></script>
5 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/po/item_table.js"></script>
6 <div dojoType="dijit.layout.ContentPane" style="height:100%">
7     <div>
8         <div id='oils-acq-picklist-header'>
9             <big>
10                 Purchase Order (<span id="acq-po-view-state"></span>) 
11             </big>
12             <span id='acq-po-activated-on' class='hidden'></span>
13             <table class="oils-generic-table acq-po-info">
14                 <tr>
15                     <th>ID</th><td><a id="acq-po-view-id"/></td>
16                     <th>Prepayment Required?</th>
17                     <td><span id="acq-po-view-prepay"/></td>
18                 </tr>
19                 <tr>
20                     <th>Name</th>
21                     <td><a id="acq-po-view-name" href="javascript:void(0);"
22                         onclick="updatePoName()"></a></td>
23                     <th>Activatable?</th>
24                     <td>
25                         <span id="acq-po-activate-checking"></span>
26                         <a class="hidden" id="acq-po-activate-link" href="javascript:void(0);" onclick="activatePo()">Activate Order</a>
27                     </td>
28                 </tr>
29                 <tr>
30                     <th>Provider</th>
31                     <td><span id="acq-po-view-provider"/></td>
32                     <th>Notes</th>
33                     <td>
34                         <a href="javascript:void(0);"
35                             id="acq-po-view-notes"></a>
36                     </td>
37                 </tr>
38                 <tr>
39                     <th>Total Lineitems</th>
40                     <td><span id="acq-po-view-total-li"/></td>
41                     <th>EDI Messages</th>
42                     <td>
43                         <a href="javascript:void(0);"
44                             id="acq-po-view-edi-messages"></a>
45                     </td>
46                 </tr>
47                 <tr>
48                     <th>Total Estimated</th>
49                     <td>$<span id="acq-po-view-total-estimated"/></td>
50                     <th>History</th>
51                     <td>
52                         <a class="hidden" href="javascript:void(0);"
53                             id="acq-po-view-history">View</a>
54                     </td>
55                 </tr>
56                 <tr>
57                     <th>Total Encumbered</th>
58                     <td>$<span id="acq-po-view-total-enc"/></td>
59                     <th>Invoicing</th>
60                     <td id="acq-po-invoice-stuff" class="hidden">
61                         <button dojoType="dijit.form.Button"
62                             id="acq-po-view-invoice-link">
63                             View Invoices
64                             (<span id="acq-po-view-invoice-count"></span>)
65                         </button> &nbsp;
66                         <button dojoType="dijit.form.Button"
67                             id="acq-po-create-invoice-link">
68                             Create Invoice
69                         </button> &nbsp;
70                         <button dojoType="dijit.form.DropDownButton">
71                             <span>Link Invoice</span>
72                             <div dojoType="dijit.TooltipDialog"
73                                 id="acq-po-link-invoice">
74                                 <script type="dojo/connect" event="onOpen">
75                                     if (!invoiceLinkDialogManager) {
76                                         invoiceLinkDialogManager =
77                                             new InvoiceLinkDialogManager(
78                                                 "po", PO
79                                             );
80                                     }
81                                 </script>
82                                 [% INCLUDE "default/acq/common/inv_dialog.tt2"
83                                     which = "po" %]
84                             </div>
85                         </button>
86                     </td>
87                 </tr>
88                 <tr>
89                     <th>Total Spent</th>
90                     <td>$<span id="acq-po-view-total-spent"/></td>
91                     <th id="acq-po-cancel-label"></th>
92                     <td>
93                         <span id="acq-po-view-cancel-reason"></span>
94                         <span id="acq-po-choose-cancel-reason" class="hidden">
95                             <span dojoType="dijit.form.DropDownButton">
96                                 <span>Cancel order</span>
97                                 <span dojoType="dijit.TooltipDialog">
98                                     <label for="acq-po-cancel-reason">
99                                         Reason:
100                                     </label>
101                                     <span id="acq-po-cancel-reason"></span>
102                                     <button jsId="acqPoCancelReasonSubmit"
103                                         dojoType="dijit.form.Button"
104                                         type="submit">Cancel order</button>
105                                 </span>
106                             </span>
107                         </span>
108                     </td>
109                 </tr>
110                 <tr>
111                     <td colspan='3'>
112                         <a class="hidden" id="acq-po-split" href="javascript:void(0);"
113                             onclick="if (confirm(localeStrings.CONFIRM_SPLIT_PO)) splitPo();">
114                             Split Order by Lineitems
115                         </a>
116                     </td>
117                 </tr>
118             </table>
119         </div>
120     </div>
121     <script type="text/javascript">
122         var poId = "[% ctx.page_args.1 %]";
123         var liFocus = "[% ctx.page_args.0 %]";
124         if (liFocus && !poId) {
125             poId = liFocus;
126             liFocus = null;
127         }
128     </script>
129     [% INCLUDE 'default/acq/common/li_table.tt2' %]
130     [% INCLUDE "default/acq/common/notes.tt2" which = "Po" %]
131     <div class='hidden' id='acq-po-no-lineitems'>
132         <button type='dijit.form.Button' onclick='location.href = oilsBasePath + "/acq/picklist/brief_record?po=" + poId'>
133             Add Brief Record
134         </button>
135     </div>
136     [% INCLUDE "default/acq/po/item_table.tt2" %]
137 </div>
138 [% END %]