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