3 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Full subscription history for [% bibliotitle %]
4 [% INCLUDE 'doc-head-close.inc' %]
6 <style type="text/css">
7 #search-facets fieldset { border: 0; margin: 0;padding:0;}#search-facets ol{padding:.3em;}#search-facets li {list-style-type:none;padding:4px 4px;}#search-facets label{font-weight:bold;display:block;margin:.2em 0;}#search-facets fieldset.action {padding-left:4px;margin:.3em;}div.tabsub { clear:both;}#subtabs a { display:block;float:left;border:1px solid #CCC;padding:.2em .4em;margin:.3em;text-decoration:none;font-size:115%;}#subtabs strong { display:block; float: left; font-size:115%;padding:.2em .4em; margin: 0.3em 0;}#subtabs { margin-top : 1em; }a.currentsubtab { background-color:#FFC;}
11 <body id="opac-full-serial-issues" class="scrollto">
12 [% INCLUDE 'masthead.inc' %]
15 <ul class="breadcrumb">
16 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
17 <li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]">Details for [% bibliotitle %]</a> <span class="divider">›</span></li>
18 <li><a href="#">Full subscription history</a></li>
21 <div class="container-fluid">
22 <div class="row-fluid">
24 <div id="searchfacetscontainer">
25 <div id="search-facets">
26 <h4>Refine your search</h4>
27 <form action="/cgi-bin/koha/opac-serial-issues.pl" id="filterform">
29 <label for="libraryfilter">Library : </label>
30 <select id="libraryfilter" name="libraryfilter" style="width:10em;"></select>
32 <label for="subscriptionidfilter">Subscription : </label>
33 <select id="subscriptionidfilter" name="subscriptionfilter" style="width:10em;" disabled="disabled"></select>
35 <fieldset class="action">
36 <input type="reset" id="reset" class="btn" value="Clear" />
39 </div> <!-- / #search-facets -->
40 </div> <!-- / #searchfacetscontainer -->
42 [% INCLUDE 'navigation.inc' %]
44 </div> <!-- / .span2 -->
46 <div id="fullserialissues" class="maincontent">
47 [% UNLESS ( popup ) %]
48 <h2>Full subscription history for [% bibliotitle %]</h2>
50 <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]">Normal view</a></span>
51 <span class="view"><a id="Briefhistory" href="/cgi-bin/koha/opac-serial-issues.pl?biblionumber=[% biblionumber %]&selectview=small">Brief history</a></span>
52 <span class="view"><span id="Fullhistory">Full history</span></span>
57 <strong>Show year: </strong>
58 [% FOREACH year IN years %]
59 [% IF ( year.year ) %]
60 <a class="tabsubs" href="#" onclick="showlayer([% year.year %]); return false;">[% year.year %]</a>
65 [% FOREACH year IN years %]
67 <div class="yeardata tabsub" id="show[% year.year %]" style="display:block">
69 <div class="yeardata tabsub" id="show[% year.year %]" style="display:none">
71 <table class="subscriptionstclass table table-bordered table-striped">
77 <th>Date received</th>
84 [% FOREACH serial IN year.serials %]
87 [% IF ( serial.publisheddate ) %]
88 <span title="[% serial.publisheddate %]">[% serial.publisheddate | $KohaDates %]</span>
93 <td class="libraryfilterclass">[% serial.branchcode %]</td>
94 <td>[% serial.notes %]</td>
96 [% IF ( serial.status2 && serial.planneddate ) %]
97 <span title="[% serial.planneddate %]">[% serial.planneddate | $KohaDates %]</span>
99 <span title="9999-12-31"> </span>
102 <td>[% serial.serialseq %]</td>
104 [% IF ( serial.status1 ) %]Expected[% END %]
105 [% IF ( serial.status2 ) %]Arrived[% END %]
106 [% IF ( serial.status3 ) %]Late[% END %]
107 [% IF ( serial.status4 ) %]Missing[% END %]
108 [% IF ( serial.status5 ) %]Not available[% END %]
109 [% IF ( serial.status6 ) %]Delete[% END %]
110 [% IF ( serial.status7 ) %]Claimed[% END %]
111 [% IF ( serial.status8 ) %]Stopped[% END %]
113 <td class="subscriptionidfilterclass">[% serial.subscriptionid %]</td>
118 </div> <!-- / .yeardata tabsub -->
119 [% END # / FOREACH year %]
120 </div> <!-- / #fullserialissues -->
121 </div> <!-- / .span10 -->
122 </div> <!-- / .row-fluid -->
123 </div> <!-- / .container-fluid -->
124 </div> <!-- / .main -->
126 [% INCLUDE 'opac-bottom.inc' %]
127 [% BLOCK jsinclude %]
128 [% INCLUDE 'datatables.inc' %]
129 <script type="text/javascript">
131 $(document).ready(function(){
132 showlayer([% yearmin %]);
133 $("a.tabsubs:first").addClass("currentsubtab");
134 $("#filterform").submit(function(){
138 $("#libraryfilter").change(function(){
141 $("#subscriptionidfilter").change(function(){
142 filterBySubscriptionId();
144 $("#reset").click(function(){
147 $("a.tabsubs").click(function(){
148 $("a.tabsubs").removeClass("currentsubtab");
149 $(this).addClass("currentsubtab");
151 $(".subscriptionstclass").dataTable($.extend(true, {}, dataTablesDefaults, {
152 "aaSorting": [[ 0, "desc" ]],
154 { "sType": "title-string" },
157 { "sType": "title-string" },
165 // Filters initialization
166 function initFilters() {
167 // Deleting everything from the library filter
168 $("#libraryfilter option").remove();
170 // Getting each branchcode from the currently displayed tab
172 $("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.libraryfilterclass").each(function() {
173 if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
176 // Setting the option values with branchcodes
177 $("#libraryfilter").append('<option value="all">(All)</option>');
178 for (var i = 0; i < subarray.length; i++) {
179 $("#libraryfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
184 function filterByLibrary() {
186 selectedStatus = $("#libraryfilter").val();
188 // Reset the filters but keeps the selected library
191 if (selectedStatus != 'all') {
193 // We hide everything
194 $("table.subscriptionstclass tbody tr").hide();
196 // Then show the lines that match the currently selected library
197 $("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedStatus + ")").parent().show();
200 // We then prepare the subscription filter :
202 // Getting subscription id's for the selected library
204 $("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.subscriptionidfilterclass").each(function() {
205 if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
207 // Setting the option values with subscription id's
208 $("#subscriptionidfilter").append('<option value="all">(All)</option>');
209 for (var i = 0; i < subarray.length; i++) {
210 $("#subscriptionidfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
213 // Subscription filtering is now ready
214 $("#subscriptionidfilter").removeAttr("disabled");
218 // Filter by subscription id
219 function filterBySubscriptionId() {
221 selectedSubscription = $("#subscriptionidfilter").val();
222 selectedLibrary = $("#libraryfilter").val();
224 if (selectedSubscription == "all") {
229 // We hide everything
230 $("table.subscriptionstclass tbody tr").hide();
232 // Then show the lines that match the currently selected library
233 $("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedLibrary + ")").parent().show();
235 // Then hide the lines where the subscription id does not match the selected one
236 $("table.subscriptionstclass tbody tr td.subscriptionidfilterclass").not(
237 $("table.subscriptionstclass tbody tr td.subscriptionidfilterclass:contains(" + selectedSubscription + ")")
242 // Clears filters : reset everything
243 // (Though preserves the selected library if the keeplibrary parameter is set to true)
244 function clearFilters(keeplibrary) {
247 $("table.subscriptionstclass tbody tr").show();
249 // Remove old subscription options
250 $("#subscriptionidfilter option").remove();
251 $("#subscriptionidfilter option").append('<option value="all">(All)</option>');
252 $("#subscriptionidfilter").attr("disabled", "disabled");
254 if (keeplibrary != true) {
255 // Reinit library options
257 $("#libraryfilter option[value=all]").attr("selected", "selected");
260 function showlayer(numlayer){
261 $(".yeardata").each(function(){
262 ong = $(this).attr("id");
263 if(ong == "show"+numlayer){