dba4e4d814dbfd93b0b70df27347e3e1f94f9b25
[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 <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>
18
19 <div class="main container-fluid">
20     <div class="row">
21         <div class="col-sm-10 col-sm-push-2">
22             <main>
23
24             <h2>Serials subscriptions</h2>
25             [% IF (done_searched) %]
26                 <label for="show_only_renewed">
27                     <input type="checkbox" style="vertical-align: middle;" id="show_only_renewed" />
28                     Show only renewed
29                 </label>
30                 [% IF (subs_loop) %]
31                     <table id="srlt">
32                         <thead>
33                             <tr>
34                                 <th>ISSN</th>
35                                 <th class="anti-the">Title</th>
36                                 <th> Notes </th>
37                                 <th>Vendor</th>
38                                 <th>Library</th>
39                                 <th>Call number</th>
40                                 <th class="title-string">Expiration date</th>
41                                 <th class="NoSort"></th>
42                             </tr>
43                         </thead>
44                         <tbody>
45                         [% FOREACH sub IN subs_loop %]
46                             <tr data-reneweddate="[% sub.reneweddate | html %]" >
47                                 <td>[% sub.issn | html %]</td>
48                                 <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 %]
49                                 ---
50                             [% END %][% IF (sub.unititle) %], [% sub.unititle | html %][% END %]</a>
51                                 </td>
52                                 <td>[% IF (sub.publicnotes) %][% sub.publicnotes | html %][% END %]
53                                     [% IF (sub.internalnotes) %]([% sub.internalnotes | html %])[% END %]
54                                 </td>
55                                 <td>
56                                     [% IF (sub.vendorname) %][% sub.vendorname | html %][% END %]
57                                 </td>
58                                 <td>
59                                     [% IF (sub.branchcode) %][% Branches.GetName( sub.branchcode ) | html %][% END %]
60                                 </td>
61                                 <td>
62                                     [% IF (sub.callnumber) %][% sub.callnumber | html %][% END %]
63                                 </td>
64                                 <td>
65                                     [% IF (sub.enddate) %]
66                                         <span title="[% sub.enddate | html %]">[% sub.enddate | $KohaDates %]</span>
67                                     [% ELSE %]
68                                         <span title="0000-00-00"></span>
69                                     [% END %]
70                                 </td>
71                                 <td class="actions">
72                                     [% IF (sub.alreadyOnOrder) %]
73                                         Outstanding order
74                                     [% END %]
75                                     [% IF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid %]
76                                         <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">
77                                             <i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]
78                                         </a>
79                                     [% ELSE %]
80                                         <a title="This subscription depends on another supplier" style="cursor:help">Cannot be ordered</a>
81                                     [% END %]
82                                 </td>
83                             </tr>
84                         [% END %]
85                         </tbody>
86                     </table>
87                 [% ELSE %]
88                     <p>Sorry, there is no result for your search.</p>
89                 [% END %]
90             [% ELSE %]
91                 <p>Use the search form on the left to find subscriptions.</p>
92             [% END %]
93         </main>
94     </div> <!-- /.col-sm-10.col-sm-push-2 -->
95
96 <div class="col-sm-2 col-sm-pull-10">
97     <aside>
98         [% INCLUDE 'subscriptions-search.inc' %]
99         [% INCLUDE 'acquisitions-menu.inc' %]
100     </aside>
101 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
102 </div> <!-- /.row -->
103
104 [% MACRO jsinclude BLOCK %]
105     [% Asset.js("js/acquisitions-menu.js") | $raw %]
106     [% INCLUDE 'datatables.inc' %]
107     [% INCLUDE 'calendar.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' %]