Bug 27846: (follow-up) Add id back to breadcrumbs container
[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 class="title-string">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>
85                                     [% IF (sub.enddate) %]
86                                         <span title="[% sub.enddate | html %]">[% sub.enddate | $KohaDates %]</span>
87                                     [% ELSE %]
88                                         <span title="0000-00-00"></span>
89                                     [% END %]
90                                 </td>
91                                 <td class="actions">
92                                     [% IF (sub.alreadyOnOrder) %]
93                                         Outstanding order
94                                     [% END %]
95                                     [% IF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid %]
96                                         <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">
97                                             <i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]
98                                         </a>
99                                     [% ELSE %]
100                                         <a title="This subscription depends on another supplier" style="cursor:help">Cannot be ordered</a>
101                                     [% END %]
102                                 </td>
103                             </tr>
104                         [% END %]
105                         </tbody>
106                     </table>
107                 [% ELSE %]
108                     <p>Sorry, there is no result for your search.</p>
109                 [% END %]
110             [% ELSE %]
111                 <p>Use the search form on the left to find subscriptions.</p>
112             [% END %]
113         </main>
114     </div> <!-- /.col-sm-10.col-sm-push-2 -->
115
116 <div class="col-sm-2 col-sm-pull-10">
117     <aside>
118         [% INCLUDE 'subscriptions-search.inc' %]
119         [% INCLUDE 'acquisitions-menu.inc' %]
120     </aside>
121 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
122 </div> <!-- /.row -->
123
124 [% MACRO jsinclude BLOCK %]
125     [% Asset.js("js/acquisitions-menu.js") | $raw %]
126     [% INCLUDE 'datatables.inc' %]
127     [% INCLUDE 'calendar.inc' %]
128     <script>
129         function updateRowsVisibility(show_only_renewed) {
130             if ( show_only_renewed ) {
131                 $("#srlt [data-reneweddate='']").hide();
132             } else {
133                 $("#srlt > tbody > tr").show();
134             }
135         }
136
137         $(document).ready(function() {
138             $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, {
139                 "aoColumnDefs": [
140                     { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
141                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
142                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
143                 ],
144                 "sPaginationType": "full"
145             }));
146
147             $("#show_only_renewed").click(function(){
148                 updateRowsVisibility( $(this).is(":checked") );
149             });
150             $("#show_only_renewed").prop('checked', false);
151             updateRowsVisibility(false);
152
153             $("#advsearch_form").show();
154         });
155     </script>
156 [% END %]
157
158 [% INCLUDE 'intranet-bottom.inc' %]