4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Full subscription history for [% bibliotitle | html %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
6 [% INCLUDE 'doc-head-close.inc' %]
22 border: 1px solid #CCC;
25 text-decoration: none;
48 background-color: #FFC;
54 [% INCLUDE 'bodytag.inc' bodyid='opac-full-serial-issues' bodyclass='scrollto' %]
55 [% INCLUDE 'masthead.inc' %]
58 <nav aria-label="breadcrumb">
59 <ul class="breadcrumb">
60 <li class="breadcrumb-item">
61 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
63 <li class="breadcrumb-item">
64 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | uri %]">Details for [% bibliotitle | html %]</a>
66 <li class="breadcrumb-item active" aria-current="page">
67 <a href="#">Full subscription history</a>
72 <div class="container-fluid">
74 <div class="col-lg-2">
75 <div id="searchfacetscontainer">
76 <div id="search-facets">
77 <form action="/cgi-bin/koha/opac-serial-issues.pl" id="filterform">
78 <h2><a href="#" class="menu-collapse-toggle">Refine your search</a></h2>
79 <ul class="menu-collapse">
81 <label for="libraryfilter">Library: </label>
82 <select id="libraryfilter" name="libraryfilter"></select>
83 <label for="subscriptionidfilter">Subscription: </label>
84 <select id="subscriptionidfilter" name="subscriptionfilter" disabled="disabled"></select>
87 <input type="reset" id="reset" class="btn btn-primary" value="Clear" />
91 </div> <!-- / #search-facets -->
92 </div> <!-- / #searchfacetscontainer -->
94 [% INCLUDE 'navigation.inc' %]
96 </div> <!-- / .col-lg-2 -->
97 <div class="col-10 order-first order-md-first order-lg-2">
98 <div id="fullserialissues" class="maincontent">
99 [% UNLESS ( popup ) %]
100 <h2>Full subscription history for [% bibliotitle | html %]</h2>
102 <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | html %]">Normal view</a></span>
103 <span class="view"><a id="Briefhistory" href="/cgi-bin/koha/opac-serial-issues.pl?biblionumber=[% biblionumber | html %]&selectview=small">Brief history</a></span>
104 <span class="view"><span id="Fullhistory">Full history</span></span>
109 <strong>Show year: </strong>
110 [% FOREACH year IN years %]
111 [% IF ( year.year ) %]
112 <a class="tabsubs" href="#" onclick="showlayer([% year.year | html %]); return false;">[% year.year | html %]</a>
117 [% FOREACH year IN years %]
119 <div class="yeardata tabsub" id="show[% year.year | html %]" style="display:block">
121 <div class="yeardata tabsub" id="show[% year.year | html %]" style="display:none">
123 <table class="subscriptionstclass table table-bordered table-striped">
129 <th>Date received</th>
132 <th>Subscription</th>
136 [% FOREACH serial IN year.serials %]
139 [% IF ( serial.publisheddate ) %]
140 <span title="[% serial.publisheddate | html %]">
141 [% IF serial.publisheddatetext %]
142 [% serial.publisheddatetext | html %]
144 [% serial.publisheddate | $KohaDates %]
151 <td class="libraryfilterclass">[% Branches.GetName( serial.branchcode ) | html %]</td>
152 <td>[% serial.notes | html %]</td>
154 [% IF ( serial.status2 && serial.planneddate ) %]
155 <span title="[% serial.planneddate | html %]">[% serial.planneddate | $KohaDates %]</span>
157 <span title="9999-12-31"> </span>
160 <td>[% serial.serialseq | html %]</td>
162 [% IF ( serial.status1 ) %]Expected[% END %]
163 [% IF ( serial.status2 ) %]Arrived[% END %]
164 [% IF ( serial.status3 ) %]Late[% END %]
165 [% IF ( serial.status4 ) %]Missing[% END %]
166 [% IF ( serial.status41 ) %]Missing (never received)[% END %]
167 [% IF ( serial.status42 ) %]Missing (sold out)[% END %]
168 [% IF ( serial.status43 ) %]Missing (damaged)[% END %]
169 [% IF ( serial.status44 ) %]Missing (lost)[% END %]
170 [% IF ( serial.status5 ) %]Not available[% END %]
171 [% IF ( serial.status6 ) %]Delete[% END %]
172 [% IF ( serial.status7 ) %]Claimed[% END %]
173 [% IF ( serial.status8 ) %]Stopped[% END %]
175 <td class="subscriptionidfilterclass">[% serial.subscriptionid | html %]</td>
180 </div> <!-- / .yeardata tabsub -->
181 [% END # / FOREACH year %]
182 </div> <!-- / #fullserialissues -->
183 </div> <!-- / .col-10 -->
184 </div> <!-- / .row -->
185 </div> <!-- / .container-fluid -->
186 </div> <!-- / .main -->
188 [% INCLUDE 'opac-bottom.inc' %]
189 [% BLOCK jsinclude %]
190 [% INCLUDE 'datatables.inc' %]
192 $(document).ready(function(){
193 showlayer([% yearmin | html %]);
194 $("a.tabsubs:first").addClass("currentsubtab");
195 $("#filterform").submit(function(){
199 $("#libraryfilter").change(function(){
202 $("#subscriptionidfilter").change(function(){
203 filterBySubscriptionId();
205 $("#reset").click(function(){
208 $("a.tabsubs").click(function(){
209 $("a.tabsubs").removeClass("currentsubtab");
210 $(this).addClass("currentsubtab");
212 $(".subscriptionstclass").dataTable($.extend(true, {}, dataTablesDefaults, {
213 "order": [[ 0, "desc" ]],
215 { "type": "title-string" },
218 { "type": "title-string" },
226 // Filters initialization
227 function initFilters() {
228 // Deleting everything from the library filter
229 $("#libraryfilter option").remove();
231 // Getting each branchcode from the currently displayed tab
233 $("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.libraryfilterclass").each(function() {
234 if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
237 // Setting the option values with branchcodes
238 $("#libraryfilter").append('<option value="all">'+_("(All)")+'</option>');
239 for (var i = 0; i < subarray.length; i++) {
240 $("#libraryfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
245 function filterByLibrary() {
247 selectedStatus = $("#libraryfilter").val();
249 // Reset the filters but keeps the selected library
252 if (selectedStatus != 'all') {
254 // We hide everything
255 $("table.subscriptionstclass tbody tr").hide();
257 // Then show the lines that match the currently selected library
258 $("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedStatus + ")").parent().show();
261 // We then prepare the subscription filter :
263 // Getting subscription id's for the selected library
265 $("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.subscriptionidfilterclass").each(function() {
266 if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
268 // Setting the option values with subscription id's
269 $("#subscriptionidfilter").append('<option value="all">'+_("(All)")+'</option>');
270 for (var i = 0; i < subarray.length; i++) {
271 $("#subscriptionidfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
274 // Subscription filtering is now ready
275 $("#subscriptionidfilter").removeAttr("disabled");
279 // Filter by subscription id
280 function filterBySubscriptionId() {
282 selectedSubscription = $("#subscriptionidfilter").val();
283 selectedLibrary = $("#libraryfilter").val();
285 if (selectedSubscription == "all") {
290 // We hide everything
291 $("table.subscriptionstclass tbody tr").hide();
293 // Then show the lines that match the currently selected library
294 $("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedLibrary + ")").parent().show();
296 // Then hide the lines where the subscription id does not match the selected one
297 $("table.subscriptionstclass tbody tr td.subscriptionidfilterclass").not(
298 $("table.subscriptionstclass tbody tr td.subscriptionidfilterclass:contains(" + selectedSubscription + ")")
303 // Clears filters : reset everything
304 // (Though preserves the selected library if the keeplibrary parameter is set to true)
305 function clearFilters(keeplibrary) {
307 $("table.subscriptionstclass tbody tr").show();
309 // Remove old subscription options
310 $("#subscriptionidfilter option").remove();
311 $("#subscriptionidfilter option").append('<option value="all">'+_("(All)")+'</option>');
312 $("#subscriptionidfilter").attr("disabled", "disabled");
314 if (keeplibrary != true) {
315 // Reinit library options
317 $("#libraryfilter option[value=all]").attr("selected", "selected");
321 function showlayer(numlayer){
322 $(".yeardata").each(function(){
323 ong = $(this).attr("id");
324 if(ong == "show"+numlayer){