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 <h1>Full subscription history</h1>
101 <h2>Full subscription history for [% bibliotitle | html %]</h2>
103 <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | html %]">Normal view</a></span>
104 <span class="view"><a id="Briefhistory" href="/cgi-bin/koha/opac-serial-issues.pl?biblionumber=[% biblionumber | html %]&selectview=small">Brief history</a></span>
105 <span class="view"><span id="Fullhistory">Full history</span></span>
110 <strong>Show year: </strong>
111 [% FOREACH year IN years %]
112 [% IF ( year.year ) %]
113 <a class="tabsubs" href="#" onclick="showlayer([% year.year | html %]); return false;">[% year.year | html %]</a>
118 [% FOREACH year IN years %]
120 <div class="yeardata tabsub" id="show[% year.year | html %]" style="display:block">
122 <div class="yeardata tabsub" id="show[% year.year | html %]" style="display:none">
124 <table class="subscriptionstclass table table-bordered table-striped">
130 <th>Date received</th>
133 <th>Subscription</th>
137 [% FOREACH serial IN year.serials %]
140 [% IF ( serial.publisheddate ) %]
141 <span title="[% serial.publisheddate | html %]">
142 [% IF serial.publisheddatetext %]
143 [% serial.publisheddatetext | html %]
145 [% serial.publisheddate | $KohaDates %]
152 <td class="libraryfilterclass">[% Branches.GetName( serial.branchcode ) | html %]</td>
153 <td>[% serial.notes | html %]</td>
155 [% IF ( serial.status2 && serial.planneddate ) %]
156 <span title="[% serial.planneddate | html %]">[% serial.planneddate | $KohaDates %]</span>
158 <span title="9999-12-31"> </span>
161 <td>[% serial.serialseq | html %]</td>
163 [% IF ( serial.status1 ) %]Expected[% END %]
164 [% IF ( serial.status2 ) %]Arrived[% END %]
165 [% IF ( serial.status3 ) %]Late[% END %]
166 [% IF ( serial.status4 ) %]Missing[% END %]
167 [% IF ( serial.status41 ) %]Missing (never received)[% END %]
168 [% IF ( serial.status42 ) %]Missing (sold out)[% END %]
169 [% IF ( serial.status43 ) %]Missing (damaged)[% END %]
170 [% IF ( serial.status44 ) %]Missing (lost)[% END %]
171 [% IF ( serial.status5 ) %]Not available[% END %]
172 [% IF ( serial.status6 ) %]Delete[% END %]
173 [% IF ( serial.status7 ) %]Claimed[% END %]
174 [% IF ( serial.status8 ) %]Stopped[% END %]
176 <td class="subscriptionidfilterclass">[% serial.subscriptionid | html %]</td>
181 </div> <!-- / .yeardata tabsub -->
182 [% END # / FOREACH year %]
183 </div> <!-- / #fullserialissues -->
184 </div> <!-- / .col-10 -->
185 </div> <!-- / .row -->
186 </div> <!-- / .container-fluid -->
187 </div> <!-- / .main -->
189 [% INCLUDE 'opac-bottom.inc' %]
190 [% BLOCK jsinclude %]
191 [% INCLUDE 'datatables.inc' %]
193 $(document).ready(function(){
194 showlayer([% yearmin | html %]);
195 $("a.tabsubs:first").addClass("currentsubtab");
196 $("#filterform").submit(function(){
200 $("#libraryfilter").change(function(){
203 $("#subscriptionidfilter").change(function(){
204 filterBySubscriptionId();
206 $("#reset").click(function(){
209 $("a.tabsubs").click(function(){
210 $("a.tabsubs").removeClass("currentsubtab");
211 $(this).addClass("currentsubtab");
213 $(".subscriptionstclass").dataTable($.extend(true, {}, dataTablesDefaults, {
214 "order": [[ 0, "desc" ]],
216 { "type": "title-string" },
219 { "type": "title-string" },
227 // Filters initialization
228 function initFilters() {
229 // Deleting everything from the library filter
230 $("#libraryfilter option").remove();
232 // Getting each branchcode from the currently displayed tab
234 $("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.libraryfilterclass").each(function() {
235 if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
238 // Setting the option values with branchcodes
239 $("#libraryfilter").append('<option value="all">'+_("(All)")+'</option>');
240 for (var i = 0; i < subarray.length; i++) {
241 $("#libraryfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
246 function filterByLibrary() {
248 selectedStatus = $("#libraryfilter").val();
250 // Reset the filters but keeps the selected library
253 if (selectedStatus != 'all') {
255 // We hide everything
256 $("table.subscriptionstclass tbody tr").hide();
258 // Then show the lines that match the currently selected library
259 $("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedStatus + ")").parent().show();
262 // We then prepare the subscription filter :
264 // Getting subscription id's for the selected library
266 $("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.subscriptionidfilterclass").each(function() {
267 if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
269 // Setting the option values with subscription id's
270 $("#subscriptionidfilter").append('<option value="all">'+_("(All)")+'</option>');
271 for (var i = 0; i < subarray.length; i++) {
272 $("#subscriptionidfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
275 // Subscription filtering is now ready
276 $("#subscriptionidfilter").removeAttr("disabled");
280 // Filter by subscription id
281 function filterBySubscriptionId() {
283 selectedSubscription = $("#subscriptionidfilter").val();
284 selectedLibrary = $("#libraryfilter").val();
286 if (selectedSubscription == "all") {
291 // We hide everything
292 $("table.subscriptionstclass tbody tr").hide();
294 // Then show the lines that match the currently selected library
295 $("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedLibrary + ")").parent().show();
297 // Then hide the lines where the subscription id does not match the selected one
298 $("table.subscriptionstclass tbody tr td.subscriptionidfilterclass").not(
299 $("table.subscriptionstclass tbody tr td.subscriptionidfilterclass:contains(" + selectedSubscription + ")")
304 // Clears filters : reset everything
305 // (Though preserves the selected library if the keeplibrary parameter is set to true)
306 function clearFilters(keeplibrary) {
308 $("table.subscriptionstclass tbody tr").show();
310 // Remove old subscription options
311 $("#subscriptionidfilter option").remove();
312 $("#subscriptionidfilter option").append('<option value="all">'+_("(All)")+'</option>');
313 $("#subscriptionidfilter").attr("disabled", "disabled");
315 if (keeplibrary != true) {
316 // Reinit library options
318 $("#libraryfilter option[value=all]").attr("selected", "selected");
322 function showlayer(numlayer){
323 $(".yeardata").each(function(){
324 ong = $(this).attr("id");
325 if(ong == "show"+numlayer){