209 lines
5.2 KiB
Cheetah
209 lines
5.2 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › Administration › Item Circulation Alerts</title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<style type="text/css">
|
|
table.grid thead th {
|
|
vertical-align: bottom;
|
|
}
|
|
|
|
table.grid tbody th {
|
|
text-align: right;
|
|
}
|
|
|
|
table.grid tbody td {
|
|
font-size: xx-small;
|
|
}
|
|
|
|
table.grid tbody td.info {
|
|
background: #fff;
|
|
}
|
|
|
|
table.grid.active tbody td {
|
|
width: 10%;
|
|
cursor: pointer;
|
|
}
|
|
|
|
table.grid tbody td {
|
|
background: #cfc;
|
|
color: #111;
|
|
}
|
|
|
|
table.grid td.disabled {
|
|
background: #fcc;
|
|
}
|
|
|
|
table.grid td.default {
|
|
background: #f88;
|
|
}
|
|
</style>
|
|
|
|
<script type="text/javascript">//<![CDATA[
|
|
var $branch = "<!-- TMPL_VAR NAME="branch" -->";
|
|
$(function(){
|
|
$('#alerttabs > ul').tabs();
|
|
|
|
var blocked = _('Blocked!');
|
|
var saving = _('Saving...');
|
|
var disabledForAll = _('Disabled for all');
|
|
var disabledForCurrent = _('Disabled for') + ' ' + $branch;
|
|
|
|
$('#branch_selector input:submit').hide();
|
|
$('#branch').change(function(){
|
|
$('#branch_selector').submit();
|
|
});
|
|
|
|
$('table.grid.active tbody td').click(function(ev){
|
|
var id = this.id;
|
|
var td = $(this);
|
|
if (td.hasClass('default') && $branch != '*') {
|
|
td.html(blocked);
|
|
window.setTimeout(
|
|
function(){ td.html(disabledForAll) },
|
|
3000
|
|
);
|
|
} else {
|
|
td.html(saving);
|
|
$.ajax({
|
|
url : '/cgi-bin/koha/admin/item_circulation_alerts.pl',
|
|
type : 'POST',
|
|
dataType : 'json',
|
|
data : { action: 'toggle', id: id, branch: $branch },
|
|
success : function(response){
|
|
if ($branch == '*' && response.classes.match(/default/)) {
|
|
td.html(disabledForAll);
|
|
} else if (response.classes.match(/disabled/)) {
|
|
td.html(disabledForCurrent);
|
|
} else {
|
|
td.html(' ');
|
|
}
|
|
td.attr('class', response.classes);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
}); //]]>
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Item Circulation Alerts </div>
|
|
|
|
<div id="doc3" class="yui-t1">
|
|
|
|
<div id="bd">
|
|
|
|
<div id="yui-main" class="circulation-alert">
|
|
<div class="yui-b">
|
|
|
|
<div class="yui-g">
|
|
<div class="yui-u first">
|
|
<h1>Item Circulation Alerts</h1>
|
|
<h2>Select a library:</h2>
|
|
<form id="branch_selector" method="get" action="/cgi-bin/koha/admin/item_circulation_alerts.pl">
|
|
<select id="branch" name="branch">
|
|
<!-- TMPL_LOOP NAME="branches" -->
|
|
<!-- TMPL_IF NAME="selected" -->
|
|
<option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
|
|
<!-- TMPL_ELSE -->
|
|
<option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_LOOP -->
|
|
</select>
|
|
<input type="submit" name="pick" value="Pick" />
|
|
</form>
|
|
</div>
|
|
<div class="yui-u">
|
|
<table class="grid">
|
|
<caption>Legend</caption>
|
|
<thead>
|
|
<tr>
|
|
<th>Color</th>
|
|
<th>Meaning</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td width="100" class="default"> </td>
|
|
<td class="info">These are disabled for ALL libraries. To change these settings, choose the "Default" library.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="disabled"> </td>
|
|
<td class="info">These are disabled for the current library.</td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td class="info">These are enabled.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>Circulation Alerts for <!-- TMPL_VAR NAME="branch_name" --></h2>
|
|
<p>Click on the grid to toggle the settings.</p>
|
|
|
|
<div id="alerttabs" class="toptabs">
|
|
<ul>
|
|
<li><a href="#checkout">Checkout</a></li>
|
|
<li><a href="#checkin">Check-in</a></li>
|
|
</ul>
|
|
|
|
<div id="checkout">
|
|
<h3>Checkout</h3>
|
|
<table class="grid active" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th> </th>
|
|
<!-- TMPL_LOOP NAME="item_types" -->
|
|
<th><!-- TMPL_VAR NAME="br_description" --></th>
|
|
<!-- /TMPL_LOOP -->
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- TMPL_LOOP NAME="grid_checkout" -->
|
|
<tr>
|
|
<th><!-- TMPL_VAR NAME="description" --></th>
|
|
<!-- TMPL_LOOP NAME="items" -->
|
|
<td class="<!-- TMPL_VAR NAME="class" -->" id="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="text" --></td>
|
|
<!-- /TMPL_LOOP -->
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="checkin">
|
|
<h3>Check-in</h3>
|
|
<table class="grid active" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th> </th>
|
|
<!-- TMPL_LOOP NAME="item_types" -->
|
|
<th><!-- TMPL_VAR NAME="br_description" --></th>
|
|
<!-- /TMPL_LOOP -->
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- TMPL_LOOP NAME="grid_checkin" -->
|
|
<tr>
|
|
<th><!-- TMPL_VAR NAME="description" --></th>
|
|
<!-- TMPL_LOOP NAME="items" -->
|
|
<td class="<!-- TMPL_VAR NAME="class" -->" id="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="text" --></td>
|
|
<!-- /TMPL_LOOP -->
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="yui-b">
|
|
<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|