Bug 23983: Contextualization of 'Order' (verb) vs 'Order' (noun)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / newordersubscription.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% USE Koha %]
6 [%# USE the plugin and define some macros %]
7 [% PROCESS 'i18n.inc' %]
8 [% SET footerjs = 1 %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Koha &rsaquo; Serials [% biblionumber | html %]</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 </head>
13
14 <body id="acq_newordersubscription" class="acq">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'acquisitions-search.inc' %]
17
18 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Basket [% basketno | html %]</a> &rsaquo; Add order from a subscription</div>
19
20 <div class="main container-fluid">
21     <div class="row">
22         <div class="col-sm-10 col-sm-push-2">
23             <main>
24
25             <h2>Serials subscriptions</h2>
26             [% IF (done_searched) %]
27                 <label for="show_only_renewed">
28                     <input type="checkbox" style="vertical-align: middle;" id="show_only_renewed" />
29                     Show only renewed
30                 </label>
31                 [% IF (subs_loop) %]
32                     <table id="srlt">
33                         <thead>
34                             <tr>
35                                 <th>ISSN</th>
36                                 <th class="anti-the">Title</th>
37                                 <th> Notes </th>
38                                 <th>Vendor</th>
39                                 <th>Library</th>
40                                 <th>Call number</th>
41                                 <th class="title-string">Expiration date</th>
42                                 <th class="NoSort"></th>
43                             </tr>
44                         </thead>
45                         <tbody>
46                         [% FOREACH sub IN subs_loop %]
47                             <tr data-reneweddate="[% sub.reneweddate | html %]" >
48                                 <td>[% sub.issn | html %]</td>
49                                 <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% sub.subscriptionid | uri %]" class="button" title="subscription detail">[% IF (sub.title) %][% sub.title | html %][% ELSE %]
50                                 ---
51                             [% END %][% IF (sub.unititle) %], [% sub.unititle | html %][% END %]</a>
52                                 </td>
53                                 <td>[% IF (sub.publicnotes) %][% sub.publicnotes | html %][% END %]
54                                     [% IF (sub.internalnotes) %]([% sub.internalnotes | html %])[% END %]
55                                 </td>
56                                 <td>
57                                     [% IF (sub.vendorname) %][% sub.vendorname | html %][% END %]
58                                 </td>
59                                 <td>
60                                     [% IF (sub.branchcode) %][% Branches.GetName( sub.branchcode ) | html %][% END %]
61                                 </td>
62                                 <td>
63                                     [% IF (sub.callnumber) %][% sub.callnumber | html %][% END %]
64                                 </td>
65                                 <td>
66                                     [% IF (sub.enddate) %]
67                                         <span title="[% sub.enddate | html %]">[% sub.enddate | $KohaDates %]</span>
68                                     [% ELSE %]
69                                         <span title="0000-00-00"></span>
70                                     [% END %]
71                                 </td>
72                                 <td class="actions">
73                                     [% IF (sub.alreadyOnOrder) %]
74                                         Outstanding order
75                                     [% END %]
76                                     [% IF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid %]
77                                         <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;biblionumber=[% sub.biblionumber | uri %]&amp;from_subscriptionid=[% sub.subscriptionid | uri %]" title="Order this one" class="btn btn-default btn-xs">
78                                             <i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]
79                                         </a>
80                                     [% ELSE %]
81                                         <a title="This subscription depends on another supplier" style="cursor:help">Cannot be ordered</a>
82                                     [% END %]
83                                 </td>
84                             </tr>
85                         [% END %]
86                         </tbody>
87                     </table>
88                 [% ELSE %]
89                     <p>Sorry, there is no result for your search.</p>
90                 [% END %]
91             [% ELSE %]
92                 <p>Use the search form on the left to find subscriptions.</p>
93             [% END %]
94         </main>
95     </div> <!-- /.col-sm-10.col-sm-push-2 -->
96
97 <div class="col-sm-2 col-sm-pull-10">
98     <aside>
99         [% INCLUDE 'subscriptions-search.inc' %]
100         [% INCLUDE 'acquisitions-menu.inc' %]
101     </aside>
102 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
103 </div> <!-- /.row -->
104
105 [% MACRO jsinclude BLOCK %]
106     [% Asset.js("js/acquisitions-menu.js") | $raw %]
107     [% INCLUDE 'datatables.inc' %]
108     <script>
109         function updateRowsVisibility(show_only_renewed) {
110             if ( show_only_renewed ) {
111                 $("#srlt [data-reneweddate='']").hide();
112             } else {
113                 $("#srlt > tbody > tr").show();
114             }
115         }
116
117         $(document).ready(function() {
118             $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, {
119                 "aoColumnDefs": [
120                     { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
121                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
122                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
123                 ],
124                 "sPaginationType": "full"
125             }));
126
127             $("#show_only_renewed").click(function(){
128                 updateRowsVisibility( $(this).is(":checked") );
129             });
130             $("#show_only_renewed").prop('checked', false);
131             updateRowsVisibility(false);
132
133             $("#advsearch_form").show();
134         });
135     </script>
136 [% END %]
137
138 [% INCLUDE 'intranet-bottom.inc' %]