4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Full subscription history for [% bibliotitle | html %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
9 #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;}
13 [% INCLUDE 'bodytag.inc' bodyid='opac-full-serial-issues' bodyclass='scrollto' %]
14 [% INCLUDE 'masthead.inc' %]
17 <ul class="breadcrumb">
18 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
19 <li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | uri %]">Details for [% bibliotitle | html %]</a> <span class="divider">›</span></li>
20 <li><a href="#">Full subscription history</a></li>
23 <div class="container-fluid">
24 <div class="row-fluid">
26 <div id="searchfacetscontainer">
27 <div id="search-facets">
28 <form action="/cgi-bin/koha/opac-serial-issues.pl" id="filterform">
29 <h2><a href="#" class="menu-collapse-toggle">Refine your search</a></h2>
30 <ul class="menu-collapse">
32 <label for="libraryfilter">Library: </label>
33 <select id="libraryfilter" name="libraryfilter" style="width:10em;"></select>
34 <label for="subscriptionidfilter">Subscription: </label>
35 <select id="subscriptionidfilter" name="subscriptionfilter" style="width:10em;" disabled="disabled"></select>
38 <input type="reset" id="reset" class="btn" value="Clear" />
42 </div> <!-- / #search-facets -->
43 </div> <!-- / #searchfacetscontainer -->
45 [% INCLUDE 'navigation.inc' %]
47 </div> <!-- / .span2 -->
49 <div id="fullserialissues" class="maincontent">
50 [% UNLESS ( popup ) %]
51 <h2>Full subscription history for [% bibliotitle | html %]</h2>
53 <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | html %]">Normal view</a></span>
54 <span class="view"><a id="Briefhistory" href="/cgi-bin/koha/opac-serial-issues.pl?biblionumber=[% biblionumber | html %]&selectview=small">Brief history</a></span>
55 <span class="view"><span id="Fullhistory">Full history</span></span>
60 <strong>Show year: </strong>
61 [% FOREACH year IN years %]
62 [% IF ( year.year ) %]
63 <a class="tabsubs" href="#" onclick="showlayer([% year.year | html %]); return false;">[% year.year | html %]</a>
68 [% FOREACH year IN years %]
70 <div class="yeardata tabsub" id="show[% year.year | html %]" style="display:block">
72 <div class="yeardata tabsub" id="show[% year.year | html %]" style="display:none">
74 <table class="subscriptionstclass table table-bordered table-striped">
80 <th>Date received</th>
87 [% FOREACH serial IN year.serials %]
90 [% IF ( serial.publisheddate ) %]
91 <span title="[% serial.publisheddate | html %]">
92 [% IF serial.publisheddatetext %]
93 [% serial.publisheddatetext | html %]
95 [% serial.publisheddate | $KohaDates %]
102 <td class="libraryfilterclass">[% Branches.GetName( serial.branchcode ) | html %]</td>
103 <td>[% serial.notes | html %]</td>
105 [% IF ( serial.status2 && serial.planneddate ) %]
106 <span title="[% serial.planneddate | html %]">[% serial.planneddate | $KohaDates %]</span>
108 <span title="9999-12-31"> </span>
111 <td>[% serial.serialseq | html %]</td>
113 [% IF ( serial.status1 ) %]Expected[% END %]
114 [% IF ( serial.status2 ) %]Arrived[% END %]
115 [% IF ( serial.status3 ) %]Late[% END %]
116 [% IF ( serial.status4 ) %]Missing[% END %]
117 [% IF ( serial.status41 ) %]Missing (never received)[% END %]
118 [% IF ( serial.status42 ) %]Missing (sold out)[% END %]
119 [% IF ( serial.status43 ) %]Missing (damaged)[% END %]
120 [% IF ( serial.status44 ) %]Missing (lost)[% END %]
121 [% IF ( serial.status5 ) %]Not available[% END %]
122 [% IF ( serial.status6 ) %]Delete[% END %]
123 [% IF ( serial.status7 ) %]Claimed[% END %]
124 [% IF ( serial.status8 ) %]Stopped[% END %]
126 <td class="subscriptionidfilterclass">[% serial.subscriptionid | html %]</td>
131 </div> <!-- / .yeardata tabsub -->
132 [% END # / FOREACH year %]
133 </div> <!-- / #fullserialissues -->
134 </div> <!-- / .span10 -->
135 </div> <!-- / .row-fluid -->
136 </div> <!-- / .container-fluid -->
137 </div> <!-- / .main -->
139 [% INCLUDE 'opac-bottom.inc' %]
140 [% BLOCK jsinclude %]
141 [% INCLUDE 'datatables.inc' %]
144 $(document).ready(function(){
145 showlayer([% yearmin | html %]);
146 $("a.tabsubs:first").addClass("currentsubtab");
147 $("#filterform").submit(function(){
151 $("#libraryfilter").change(function(){
154 $("#subscriptionidfilter").change(function(){
155 filterBySubscriptionId();
157 $("#reset").click(function(){
160 $("a.tabsubs").click(function(){
161 $("a.tabsubs").removeClass("currentsubtab");
162 $(this).addClass("currentsubtab");
164 $(".subscriptionstclass").dataTable($.extend(true, {}, dataTablesDefaults, {
165 "order": [[ 0, "desc" ]],
167 { "type": "title-string" },
170 { "type": "title-string" },
178 // Filters initialization
179 function initFilters() {
180 // Deleting everything from the library filter
181 $("#libraryfilter option").remove();
183 // Getting each branchcode from the currently displayed tab
185 $("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.libraryfilterclass").each(function() {
186 if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
189 // Setting the option values with branchcodes
190 $("#libraryfilter").append('<option value="all">'+_("(All)")+'</option>');
191 for (var i = 0; i < subarray.length; i++) {
192 $("#libraryfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
198 function filterByLibrary() {
200 selectedStatus = $("#libraryfilter").val();
202 // Reset the filters but keeps the selected library
205 if (selectedStatus != 'all') {
207 // We hide everything
208 $("table.subscriptionstclass tbody tr").hide();
210 // Then show the lines that match the currently selected library
211 $("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedStatus + ")").parent().show();
214 // We then prepare the subscription filter :
216 // Getting subscription id's for the selected library
218 $("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.subscriptionidfilterclass").each(function() {
219 if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
221 // Setting the option values with subscription id's
222 $("#subscriptionidfilter").append('<option value="all">'+_("(All)")+'</option>');
223 for (var i = 0; i < subarray.length; i++) {
224 $("#subscriptionidfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
227 // Subscription filtering is now ready
228 $("#subscriptionidfilter").removeAttr("disabled");
232 // Filter by subscription id
233 function filterBySubscriptionId() {
235 selectedSubscription = $("#subscriptionidfilter").val();
236 selectedLibrary = $("#libraryfilter").val();
238 if (selectedSubscription == "all") {
243 // We hide everything
244 $("table.subscriptionstclass tbody tr").hide();
246 // Then show the lines that match the currently selected library
247 $("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedLibrary + ")").parent().show();
249 // Then hide the lines where the subscription id does not match the selected one
250 $("table.subscriptionstclass tbody tr td.subscriptionidfilterclass").not(
251 $("table.subscriptionstclass tbody tr td.subscriptionidfilterclass:contains(" + selectedSubscription + ")")
256 // Clears filters : reset everything
257 // (Though preserves the selected library if the keeplibrary parameter is set to true)
258 function clearFilters(keeplibrary) {
261 $("table.subscriptionstclass tbody tr").show();
263 // Remove old subscription options
264 $("#subscriptionidfilter option").remove();
265 $("#subscriptionidfilter option").append('<option value="all">'+_("(All)")+'</option>');
266 $("#subscriptionidfilter").attr("disabled", "disabled");
268 if (keeplibrary != true) {
269 // Reinit library options
271 $("#libraryfilter option[value=all]").attr("selected", "selected");
274 function showlayer(numlayer){
275 $(".yeardata").each(function(){
276 ong = $(this).attr("id");
277 if(ong == "show"+numlayer){