Acq: several interface improvements
[working/Evergreen.git] / Open-ILS / src / templates / acq / lineitem / related.tt2
1 [% WRAPPER "base.tt2" %]
2 [% ctx.page_title = l("Related Lineitems") %]
3 <script type="text/javascript">var targetId = "[% ctx.page_args.0 %]";</script>
4 <h1>[% l('Related Lineitems') %]</h1>
5 <div id="acq-related-mini">
6     <script type="text/javascript">
7         function iterateSubfields(item) {
8             var out = '';
9             dojo.query('subfield', item).forEach(
10                 function(item) { out += item.textContent + ' '; } );
11             return out;
12         }
13     </script>
14     <ul id="acq-related-mini-display">
15         <li>
16             <div type='opac/slot-data' query='datafield[tag=245]'>
17                 <script type='opac/slot-format'>return iterateSubfields(item)</script>
18             </div>
19         </li>
20         <li>
21             <div type='opac/slot-data' query='datafield[tag=100] subfield[code=a]'></div>
22         </li>
23         <li>
24             <div type='opac/slot-data' query='datafield[tag=020]'>
25                 <script type='opac/slot-format'>return iterateSubfields(item)</script>
26             </div> 
27             <div type='opac/slot-data' query='datafield[tag=024]'>
28                 <script type='opac/slot-format'>return iterateSubfields(item)</script>
29             </div> 
30             <div type='opac/slot-data' query='datafield[tag=022]'>
31                 <script type='opac/slot-format'>return iterateSubfields(item)</script>
32             </div>
33         </li>
34         <li>
35             <div type='opac/slot-data' query='datafield[tag=260] subfield[code=c]'></div>
36         </li>
37     </ul>
38
39     <div id="acq-related-li-create-holder">
40         <button jsId="addToPlButton" dojoType="dijit.form.Button">
41             [% l('Add to Selection List') %]
42         </button>
43         <button jsId="addToPoButton" dojoType="dijit.form.Button">
44             [% l('Add to Purchase Order') %]
45         </button>
46         <button jsId="createPoButton" dojoType="dijit.form.Button">
47             [% l('Create Purchase Order') %]
48         </button>
49     </div>
50
51     <div class="hidden">
52         [% INCLUDE "acq/common/add_to_po.tt2" %]
53     </div>
54
55 </div>
56 [% INCLUDE "acq/common/info.tt2" which = "Related" %]
57 [% INCLUDE "acq/common/li_table.tt2" %]
58 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/common/add_to_po.js"></script>
59 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/acq/lineitem/related.js"></script>
60 [% END %]