232 lines
8.5 KiB
Cheetah
232 lines
8.5 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog › Subscription information for <!-- TMPL_VAR name="bibliotitle" -->
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<script type="text/javascript" language="javascript">
|
|
//<![CDATA[
|
|
|
|
$(document).ready(function(){
|
|
showlayer(<!-- TMPL_VAR name="yearmin" -->);
|
|
$("a.tabsubs:first").addClass("currentsubtab");
|
|
$("#filterform").submit(function(){
|
|
filterByLibrary();
|
|
return false;
|
|
});
|
|
$("#libraryfilter").change(function(){
|
|
filterByLibrary();
|
|
});
|
|
$("#subscriptionidfilter").change(function(){
|
|
filterBySubscriptionId();
|
|
});
|
|
$("#reset").click(function(){
|
|
clearFilters();
|
|
});
|
|
$("a.tabsubs").click(function(){
|
|
$("a.tabsubs").removeClass("currentsubtab");
|
|
$(this).addClass("currentsubtab");
|
|
});
|
|
});
|
|
|
|
// Filters initialization
|
|
function initFilters() {
|
|
// Deleting everything from the library filter
|
|
$("#libraryfilter option").remove();
|
|
|
|
// Getting each branchcode from the currently displayed tab
|
|
var subarray = [];
|
|
$("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.libraryfilterclass").each(function() {
|
|
if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
|
|
});
|
|
|
|
// Setting the option values with branchcodes
|
|
$("#libraryfilter").append('<option value="all">(All)</option>');
|
|
for (var i = 0; i < subarray.length; i++) {
|
|
$("#libraryfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
|
|
}
|
|
}
|
|
|
|
// Filter by Library
|
|
function filterByLibrary() {
|
|
|
|
selectedStatus = $("#libraryfilter").val();
|
|
|
|
// Reset the filters but keeps the selected library
|
|
clearFilters(true);
|
|
|
|
if (selectedStatus != 'all') {
|
|
|
|
// We hide everything
|
|
$("table.subscriptionstclass tbody tr").hide();
|
|
|
|
// Then show the lines that match the currently selected library
|
|
$("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedStatus + ")").parent().show();
|
|
|
|
|
|
// We then prepare the subscription filter :
|
|
|
|
// Getting subscription id's for the selected library
|
|
var subarray = [];
|
|
$("div#" + currentYear + " table.subscriptionstclass tbody tr:visible td.subscriptionidfilterclass").each(function() {
|
|
if (subarray.indexOf($(this).text()) == -1) { subarray.push($(this).text()); }
|
|
});
|
|
// Setting the option values with subscription id's
|
|
$("#subscriptionidfilter").append('<option value="all">(All)</option>');
|
|
for (var i = 0; i < subarray.length; i++) {
|
|
$("#subscriptionidfilter").append('<option value="' + subarray[i] + '">' + subarray[i] + '</option>');
|
|
}
|
|
|
|
// Subscription filtering is now ready
|
|
$("#subscriptionidfilter").removeAttr("disabled");
|
|
}
|
|
}
|
|
|
|
// Filter by subscription id
|
|
function filterBySubscriptionId() {
|
|
|
|
selectedSubscription = $("#subscriptionidfilter").val();
|
|
selectedLibrary = $("#libraryfilter").val();
|
|
|
|
if (selectedSubscription == "all") {
|
|
clearFilters(true);
|
|
filterByLibrary();
|
|
} else {
|
|
|
|
// We hide everything
|
|
$("table.subscriptionstclass tbody tr").hide();
|
|
|
|
// Then show the lines that match the currently selected library
|
|
$("table.subscriptionstclass tbody tr td.libraryfilterclass:contains(" + selectedLibrary + ")").parent().show();
|
|
|
|
// Then hide the lines where the subscription id does not match the selected one
|
|
$("table.subscriptionstclass tbody tr td.subscriptionidfilterclass").not(
|
|
$("table.subscriptionstclass tbody tr td.subscriptionidfilterclass:contains(" + selectedSubscription + ")")
|
|
).parent().hide();
|
|
}
|
|
}
|
|
|
|
// Clears filters : reset everything
|
|
// (Though preserves the selected library if the keeplibrary parameter is set to true)
|
|
function clearFilters(keeplibrary) {
|
|
|
|
// Show all content
|
|
$("table.subscriptionstclass tbody tr").show();
|
|
|
|
// Remove old subscription options
|
|
$("#subscriptionidfilter option").remove();
|
|
$("#subscriptionidfilter option").append('<option value="all">(All)</option>');
|
|
$("#subscriptionidfilter").attr("disabled", "disabled");
|
|
|
|
if (keeplibrary != true) {
|
|
// Reinit library options
|
|
initFilters();
|
|
$("#libraryfilter option[value=all]").attr("selected", "selected");
|
|
}
|
|
}
|
|
function showlayer(numlayer){
|
|
$(".yeardata").each(function(){
|
|
ong = $(this).attr("id");
|
|
if(ong == "show"+numlayer){
|
|
$(this).show();
|
|
currentYear = ong;
|
|
} else {
|
|
$(this).hide();
|
|
}
|
|
});
|
|
clearFilters();
|
|
}
|
|
//]]>
|
|
</script>
|
|
<style type="text/css">
|
|
#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-right:.3em;text-decoration:none;font-size:115%;}#subtabs strong { display:block; float: left; font-size:115%;padding:.2em .4em; }#subtabs { margin-top : 1em; }a.currentsubtab { background-color:#FFC;}
|
|
</style>
|
|
</head>
|
|
<body id="opac-full-serial-issues">
|
|
<div id="doc3" class="yui-t1">
|
|
<div id="bd">
|
|
<!-- TMPL_INCLUDE name="masthead.inc" -->
|
|
|
|
<div id="yui-main">
|
|
<div class="yui-b"><div class="yui-g">
|
|
|
|
<!-- TMPL_UNLESS name="popup" -->
|
|
<h2>Subscription information for <!-- TMPL_VAR name="bibliotitle" --></h2>
|
|
<div id="views">
|
|
<span class="view"><a id="Normalview" href="opac-detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->">Normal view</a></span>
|
|
<span class="view"><a id="Briefhistory" href="opac-serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->&selectview=small">Brief history</a></span>
|
|
<span class="view"><span id="Fullhistory">Full history</span></span>
|
|
</div>
|
|
|
|
<!-- /TMPL_UNLESS -->
|
|
<div id="subtabs"><strong>Show year: </strong>
|
|
<!-- TMPL_LOOP NAME="years" -->
|
|
<!-- TMPL_IF NAME="year" -->
|
|
<a class="tabsubs" href="#" onclick="showlayer(<!-- TMPL_VAR NAME="year" -->); return false;"><!-- TMPL_VAR NAME="year" --></a>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_LOOP -->
|
|
</div>
|
|
|
|
<!-- TMPL_LOOP NAME="years" -->
|
|
<!--TMPL_IF Name="first" -->
|
|
<div class="yeardata tabsub" id="show<!-- TMPL_VAR NAME="year" -->" style="display:block"><!--TMPL_ELSE --><div class="yeardata tabsub" id="show<!-- TMPL_VAR NAME="year" -->" style="display:none"><!--/TMPL_IF -->
|
|
<table class="subscriptionstclass">
|
|
<thead>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Library</th>
|
|
<th>Notes</th>
|
|
<th>Date received</th>
|
|
<th>Number</th>
|
|
<th>Status</th>
|
|
<th>Subscription</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- TMPL_LOOP Name="serials" -->
|
|
<tr>
|
|
<td> <!-- TMPL_VAR Name="publisheddate" -->
|
|
</td>
|
|
<td class="libraryfilterclass"> <!-- TMPL_VAR name="branchname" -->
|
|
</td>
|
|
<td> <!-- TMPL_VAR name="notes" -->
|
|
</td>
|
|
<td> <!-- TMPL_IF Name="status2" --> <!-- TMPL_VAR Name="planneddate" --> <!-- /TMPL_IF -->
|
|
</td>
|
|
<td> <!-- TMPL_VAR Name="serialseq" -->
|
|
</td>
|
|
<td> <!-- TMPL_IF Name="status1" -->Waiting<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF Name="status2" -->Arrived<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF Name="status3" -->Late<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF Name="status4" -->Missing<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF Name="status5" -->Not Available<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF Name="status7" -->Claimed<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="notes" -->(<!-- TMPL_VAR name="notes" -->)<!-- /TMPL_IF -->
|
|
</td>
|
|
<td class="subscriptionidfilterclass"> <!-- TMPL_VAR Name="subscriptionid" -->
|
|
</td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!--/TMPL_LOOP -->
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<div class="container">
|
|
<div id="search-facets">
|
|
<form action="opac-serial-issues.pl" id="filterform">
|
|
<h4>Refine your search</h4>
|
|
<fieldset>
|
|
<ol><li> <label for="libraryfilter">Library : </label>
|
|
<select id="libraryfilter" name="libraryfilter" style="width:10em;"></select></li>
|
|
<li><label for="subscriptionidfilter">Subscription : </label>
|
|
<select id="subscriptionidfilter" name="subscriptionfilter" style="width:10em;" disabled="disabled"></select></li></ol>
|
|
</fieldset>
|
|
<fieldset class="action"><input type="reset" id="reset" value="Clear" /></fieldset>
|
|
</form>
|
|
</div>
|
|
<!-- TMPL_IF NAME="OpacNav" --><!--TMPL_INCLUDE NAME="navigation.inc" --><!-- /TMPL_IF -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
|