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 %]
139 <td data-order="[% serial.publisheddate | html %]">
140 [% IF ( serial.publisheddate ) %]
141 [% IF serial.publisheddatetext %]
142 [% serial.publisheddatetext | html %]
144 [% serial.publisheddate | $KohaDates %]
150 <td class="libraryfilterclass">[% Branches.GetName( serial.branchcode ) | html %]</td>
151 <td>[% serial.notes | html %]</td>
152 [% IF ( serial.status2 && serial.planneddate ) %]
153 <td data-order="[% serial.planneddate | html %]">
154 [% serial.planneddate | $KohaDates %]
156 <td data-order="9999-12-31">
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" ]]
217 // Filters initialization
218 function initFilters() {
219 // Deleting everything from the library filter
220 $("#libraryfilter option").remove();
222 // Getting each branchcode from the currently displayed tab
224 $("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.libraryfilterclass").each(function() {
225 if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
228 // Setting the option values with branchcodes
229 $("#libraryfilter").append('<option value="all">'+_("(All)")+'</option>');
230 for (var i = 0; i < subarray.length; i++) {
231 $("#libraryfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
236 function filterByLibrary() {
238 selectedStatus = $("#libraryfilter").val();
240 // Reset the filters but keeps the selected library
243 if (selectedStatus != 'all') {
245 // We hide everything
246 $("table.subscriptionstclass tbody tr").hide();
248 // Then show the lines that match the currently selected library
249 $("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedStatus + ")").parent().show();
252 // We then prepare the subscription filter :
254 // Getting subscription id's for the selected library
256 $("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.subscriptionidfilterclass").each(function() {
257 if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
259 // Setting the option values with subscription id's
260 $("#subscriptionidfilter").append('<option value="all">'+_("(All)")+'</option>');
261 for (var i = 0; i < subarray.length; i++) {
262 $("#subscriptionidfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
265 // Subscription filtering is now ready
266 $("#subscriptionidfilter").removeAttr("disabled");
270 // Filter by subscription id
271 function filterBySubscriptionId() {
273 selectedSubscription = $("#subscriptionidfilter").val();
274 selectedLibrary = $("#libraryfilter").val();
276 if (selectedSubscription == "all") {
281 // We hide everything
282 $("table.subscriptionstclass tbody tr").hide();
284 // Then show the lines that match the currently selected library
285 $("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedLibrary + ")").parent().show();
287 // Then hide the lines where the subscription id does not match the selected one
288 $("table.subscriptionstclass tbody tr td.subscriptionidfilterclass").not(
289 $("table.subscriptionstclass tbody tr td.subscriptionidfilterclass:contains(" + selectedSubscription + ")")
294 // Clears filters : reset everything
295 // (Though preserves the selected library if the keeplibrary parameter is set to true)
296 function clearFilters(keeplibrary) {
298 $("table.subscriptionstclass tbody tr").show();
300 // Remove old subscription options
301 $("#subscriptionidfilter option").remove();
302 $("#subscriptionidfilter option").append('<option value="all">'+_("(All)")+'</option>');
303 $("#subscriptionidfilter").attr("disabled", "disabled");
305 if (keeplibrary != true) {
306 // Reinit library options
308 $("#libraryfilter option[value=all]").attr("selected", "selected");
312 function showlayer(numlayer){
313 $(".yeardata").each(function(){
314 ong = $(this).attr("id");
315 if(ong == "show"+numlayer){