Lines 368-379
Link Here
|
368 |
[% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %] |
368 |
[% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %] |
369 |
[% IF ( ShowCourseReserves ) %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %] |
369 |
[% IF ( ShowCourseReserves ) %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %] |
370 |
[% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %] |
370 |
[% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %] |
371 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]<th id="[% tab | html %]_actions" data-colname="[% tab | html %]_actions"class="NoSort"> </th>[% END %] |
371 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]<th id="[% tab | html %]_actions" data-colname="[% tab | html %]_actions"class="NoSort noExport"> </th>[% END %] |
372 |
</tr> |
372 |
</tr> |
373 |
</thead> |
373 |
</thead> |
374 |
<tbody> |
374 |
<tbody> |
375 |
[% FOREACH item IN items %] |
375 |
[% FOREACH item IN items %] |
376 |
<tr> |
376 |
<tr id="item_[% item.itemnumber | html %]" data-itemnumber="[% item.itemnumber | html %]" data-duedate="[% item.datedue | html %]"> |
377 |
[% IF (StaffDetailItemSelection) %] |
377 |
[% IF (StaffDetailItemSelection) %] |
378 |
<td style="text-align:center;vertical-align:middle"> |
378 |
<td style="text-align:center;vertical-align:middle"> |
379 |
<input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" /> |
379 |
<input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" /> |
Lines 545-550
Note that permanent location is a code, and location may be an authval.
Link Here
|
545 |
[% IF ( item.restricted ) %] |
545 |
[% IF ( item.restricted ) %] |
546 |
<span class="restricted">([% item.restrictedvalue | html %])</span> |
546 |
<span class="restricted">([% item.restrictedvalue | html %])</span> |
547 |
[% END %] |
547 |
[% END %] |
|
|
548 |
|
549 |
[% IF ( item.bundle_host ) %] |
550 |
<span class="bundled">In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio link = 1 %]</span> |
551 |
[% END %] |
552 |
|
548 |
</td> |
553 |
</td> |
549 |
<td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td> |
554 |
<td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td> |
550 |
<td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td> |
555 |
<td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td> |
Lines 631-636
Note that permanent location is a code, and location may be an authval.
Link Here
|
631 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]#edititem"><i class="fa fa-pencil"></i> Edit</a> |
636 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]#edititem"><i class="fa fa-pencil"></i> Edit</a> |
632 |
[% END %] |
637 |
[% END %] |
633 |
[% END %] |
638 |
[% END %] |
|
|
639 |
[% IF bundlesEnabled %] |
640 |
<button class="btn btn-default btn-xs details-control"><i class="fa fa-folder"></i> Manage bundle ([% item.bundled | html %]|[% item.bundled_lost | html %])</button> |
641 |
[% END %] |
634 |
</td> |
642 |
</td> |
635 |
[% END %] |
643 |
[% END %] |
636 |
</tr> |
644 |
</tr> |
Lines 1222-1227
Note that permanent location is a code, and location may be an authval.
Link Here
|
1222 |
</div> |
1230 |
</div> |
1223 |
</div> |
1231 |
</div> |
1224 |
|
1232 |
|
|
|
1233 |
[% IF bundlesEnabled %] |
1234 |
<div class="modal" id="addToBundleModal" tabindex="-1" role="dialog" aria-labelledby="addToBundleLabel"> |
1235 |
<form id="addToBundleForm" action=""> |
1236 |
<div class="modal-dialog" role="document"> |
1237 |
<div class="modal-content"> |
1238 |
<div class="modal-header"> |
1239 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
1240 |
<h3 id="addToBundleLabel">Add to bundle</h3> |
1241 |
</div> |
1242 |
<div class="modal-body"> |
1243 |
<div id="addResult"></div> |
1244 |
<fieldset class="rows"> |
1245 |
<ol> |
1246 |
<li> |
1247 |
<label class="required" for="external_id">Item barcode: </label> |
1248 |
<input type="text" id="external_id" name="external_id" required="required"> |
1249 |
<span class="required">Required</span> |
1250 |
</li> |
1251 |
</ol> |
1252 |
</fieldset> |
1253 |
</div> |
1254 |
<div class="modal-footer"> |
1255 |
<button type="submit" class="btn btn-default">Submit</button> |
1256 |
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button> |
1257 |
</div> |
1258 |
</div> |
1259 |
</div> |
1260 |
</form> |
1261 |
</div> |
1262 |
|
1263 |
<div class="modal" id="removeFromBundleModal" tabindex="-1" role="dialog" aria-labelledby="removeFromBundleLabel"> |
1264 |
<form id="removeFromBundleForm" action=""> |
1265 |
<div class="modal-dialog" role="document"> |
1266 |
<div class="modal-content"> |
1267 |
<div class="modal-header"> |
1268 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
1269 |
<h3 id="removeFromBundleLabel">Remove from bundle</h3> |
1270 |
</div> |
1271 |
<div class="modal-body"> |
1272 |
<div id="removeResult"></div> |
1273 |
<fieldset class="rows"> |
1274 |
<ol> |
1275 |
<li> |
1276 |
<label class="required" for="external_id">Item barcode: </label> |
1277 |
<input type="text" id="rm_external_id" name="external_id" required="required"> |
1278 |
<span class="required">Required</span> |
1279 |
</li> |
1280 |
</ol> |
1281 |
</fieldset> |
1282 |
</div> |
1283 |
<div class="modal-footer"> |
1284 |
<button type="submit" class="btn btn-default">Submit</button> |
1285 |
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button> |
1286 |
</div> |
1287 |
</div> |
1288 |
</div> |
1289 |
</form> |
1290 |
</div> |
1291 |
[% END %] |
1292 |
|
1225 |
[% MACRO jsinclude BLOCK %] |
1293 |
[% MACRO jsinclude BLOCK %] |
1226 |
[% INCLUDE 'catalog-strings.inc' %] |
1294 |
[% INCLUDE 'catalog-strings.inc' %] |
1227 |
[% Asset.js("js/catalog.js") | $raw %] |
1295 |
[% Asset.js("js/catalog.js") | $raw %] |
Lines 1528-1533
Note that permanent location is a code, and location may be an authval.
Link Here
|
1528 |
[% INCLUDE 'datatables.inc' %] |
1596 |
[% INCLUDE 'datatables.inc' %] |
1529 |
[% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %] |
1597 |
[% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %] |
1530 |
[% INCLUDE 'columns_settings.inc' %] |
1598 |
[% INCLUDE 'columns_settings.inc' %] |
|
|
1599 |
[% INCLUDE 'js-date-format.inc' %] |
1600 |
[% INCLUDE 'js-patron-format.inc' %] |
1601 |
[% INCLUDE 'js-biblio-format.inc' %] |
1531 |
[% Asset.js("js/browser.js") | $raw %] |
1602 |
[% Asset.js("js/browser.js") | $raw %] |
1532 |
[% Asset.js("js/table_filters.js") | $raw %] |
1603 |
[% Asset.js("js/table_filters.js") | $raw %] |
1533 |
<script> |
1604 |
<script> |
Lines 1535-1541
Note that permanent location is a code, and location may be an authval.
Link Here
|
1535 |
browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10)); |
1606 |
browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10)); |
1536 |
browser.show(); |
1607 |
browser.show(); |
1537 |
|
1608 |
|
|
|
1609 |
[% IF bundlesEnabled %] |
1610 |
var bundle_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail','bundle_tables','json') | $raw %]; |
1611 |
var bundle_lost_value = [% Koha.Preference('BundleLostValue') | html %]; |
1612 |
[% END %] |
1538 |
$(document).ready(function() { |
1613 |
$(document).ready(function() { |
|
|
1614 |
|
1615 |
[% IF bundlesEnabled %] // Bundle handling |
1616 |
function createChild ( row, itemnumber, duedate ) { |
1617 |
|
1618 |
// Toolbar |
1619 |
var bundle_toolbar = $('<div id="toolbar" class="btn-toolbar"></div>'); |
1620 |
bundle_toolbar.append('<a class="btn btn-default" data-toggle="modal" data-target="#addToBundleModal" data-item="' + itemnumber + '"><i class="fa fa-plus"></i> ' + _("Add to bundle") + '</a>'); |
1621 |
bundle_toolbar.append('<a class="btn btn-default" data-toggle="modal" data-target="#removeFromBundleModal" data-item="' + itemnumber + '"><i class="fa fa-minus"></i> ' + _("Remove from bundle") + '</a>'); |
1622 |
|
1623 |
// Disable management if there's a duedate |
1624 |
if(duedate) { |
1625 |
bundle_toolbar.children('.btn').addClass("disabled"); |
1626 |
} |
1627 |
|
1628 |
// This is the table we'll convert into a DataTable |
1629 |
var bundles_table = $('<table class="display tbundle" data-itemnumber="'+itemnumber+'" id="bundle_table_'+itemnumber+'" width="100%"/>'); |
1630 |
|
1631 |
// Display it the child row |
1632 |
row.child( bundle_toolbar.add(bundles_table), 'bundle' ).show(); |
1633 |
|
1634 |
// Initialise as a DataTable |
1635 |
var bundle_table_url = "/api/v1/items/" + itemnumber + "/bundled_items?"; |
1636 |
var bundle_table = bundles_table.kohaTable({ |
1637 |
"ajax": { |
1638 |
"url": bundle_table_url |
1639 |
}, |
1640 |
"header_filter": false, |
1641 |
"embed": [ |
1642 |
"biblio", |
1643 |
"return_claim.patron" |
1644 |
], |
1645 |
"order": [[ 1, "asc" ]], |
1646 |
"columnDefs": [ { |
1647 |
"targets": [0,1,2,3], |
1648 |
"render": function (data, type, row, meta) { |
1649 |
if ( data && type == 'display' ) { |
1650 |
return data.escapeHtml(); |
1651 |
} |
1652 |
return data; |
1653 |
} |
1654 |
} ], |
1655 |
"columns": [ |
1656 |
{ |
1657 |
"data": "biblio.title:biblio.subtitle:biblio.medium", |
1658 |
"title": _("Title"), |
1659 |
"searchable": true, |
1660 |
"orderable": true, |
1661 |
"render": function(data, type, row, meta) { |
1662 |
return $biblio_to_html(row.biblio, { link: 1 }); |
1663 |
} |
1664 |
}, |
1665 |
{ |
1666 |
"data": "biblio.author", |
1667 |
"title": _("Author"), |
1668 |
"searchable": true, |
1669 |
"orderable": true, |
1670 |
}, |
1671 |
{ |
1672 |
"data": "callnumber", |
1673 |
"title": _("Callnumber"), |
1674 |
"searchable": true, |
1675 |
"orderable": true, |
1676 |
}, |
1677 |
{ |
1678 |
"data": "external_id", |
1679 |
"title": _("Barcode"), |
1680 |
"searchable": true, |
1681 |
"orderable": true, |
1682 |
}, |
1683 |
{ |
1684 |
"data": "lost_status:last_seen_date:return_claim.patron", |
1685 |
"title": _("Status"), |
1686 |
"searchable": false, |
1687 |
"orderable": true, |
1688 |
"render": function(data, type, row, meta) { |
1689 |
if ( row.lost_status == bundle_lost_value ) { |
1690 |
let out = '<span class="lost">' + _("Last seen") + ': ' + $date(row.last_seen_date) + '</span>'; |
1691 |
if ( row.return_claim ) { |
1692 |
out = out + '<span class="claims_return">' + _("Claims returned by") + ': ' + $patron_to_html( row.return_claim.patron, { display_cardnumber: false, url: true } ) + '</span>'; |
1693 |
} |
1694 |
return out; |
1695 |
} |
1696 |
else if ( row.lost_status !== 0 ) { |
1697 |
return '<span class="lost">' + _("Lost") + ': ' + row.lost_status + '</span>'; |
1698 |
} |
1699 |
return '<span class="available">' + _("Present") + '</span>'; |
1700 |
} |
1701 |
}, |
1702 |
{ |
1703 |
"data": function( row, type, val, meta ) { |
1704 |
var result; |
1705 |
if (duedate) { |
1706 |
result = '<button class="btn btn-default btn-xs remove disabled" role="button" data-itemnumber="'+row.item_id+'"><i class="fa fa-minus" aria-hidden="true"></i> '+_("Remove")+'</button>\n'; |
1707 |
} else { |
1708 |
result = '<button class="btn btn-default btn-xs remove" role="button" data-itemnumber="'+row.item_id+'"><i class="fa fa-minus" aria-hidden="true"></i> '+_("Remove")+'</button>\n'; |
1709 |
} |
1710 |
return result; |
1711 |
}, |
1712 |
"title": _("Actions"), |
1713 |
"searchable": false, |
1714 |
"orderable": false, |
1715 |
"class": "noExport" |
1716 |
} |
1717 |
] |
1718 |
}, bundle_settings, 1); |
1719 |
$(".tbundle").on("click", ".remove:not(.disabled)", function(){ |
1720 |
var bundle_table = $(this).closest('table'); |
1721 |
var host_itemnumber = bundle_table.data('itemnumber'); |
1722 |
var component_itemnumber = $(this).data('itemnumber'); |
1723 |
var unlink_item_url = "/api/v1/items/" + host_itemnumber + "/bundled_items/" + component_itemnumber; |
1724 |
$.ajax({ |
1725 |
type: "DELETE", |
1726 |
url: unlink_item_url, |
1727 |
success: function(){ |
1728 |
bundle_table.DataTable({ 'retrieve': true }).draw(false); |
1729 |
} |
1730 |
}); |
1731 |
}); |
1732 |
|
1733 |
return; |
1734 |
} |
1735 |
|
1736 |
var bundle_changed; |
1737 |
var bundle_form_active; |
1738 |
$("#addToBundleModal").on("shown.bs.modal", function(e){ |
1739 |
var button = $(e.relatedTarget); |
1740 |
var item_id = button.data('item'); |
1741 |
$("#addResult").replaceWith('<div id="addResult"></div>'); |
1742 |
$("#addToBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items'); |
1743 |
$("#external_id").focus(); |
1744 |
bundle_changed = 0; |
1745 |
bundle_form_active = item_id; |
1746 |
}); |
1747 |
|
1748 |
$("#addToBundleForm").submit(function(event) { |
1749 |
|
1750 |
/* stop form from submitting normally */ |
1751 |
event.preventDefault(); |
1752 |
|
1753 |
/* get the action attribute from the <form action=""> element */ |
1754 |
var $form = $(this), |
1755 |
url = $form.attr('action'); |
1756 |
|
1757 |
/* Send the data using post with external_id */ |
1758 |
var posting = $.post({ |
1759 |
url: url, |
1760 |
data: JSON.stringify({ external_id: $('#external_id').val()}), |
1761 |
contentType: "application/json; charset=utf-8", |
1762 |
dataType: "json" |
1763 |
}); |
1764 |
|
1765 |
/* Report the results */ |
1766 |
posting.done(function(data) { |
1767 |
var barcode = $('#external_id').val(); |
1768 |
$('#addResult').replaceWith('<div id="addResult" class="alert alert-success">'+_("Success: Added '%s'").format(barcode)+'</div>'); |
1769 |
$('#external_id').val('').focus(); |
1770 |
bundle_changed = 1; |
1771 |
}); |
1772 |
posting.fail(function(data) { |
1773 |
var barcode = $('#external_id').val(); |
1774 |
if ( data.status === 409 ) { |
1775 |
var response = data.responseJSON; |
1776 |
if ( response.key === "PRIMARY" ) { |
1777 |
$('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>'); |
1778 |
} else { |
1779 |
$('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>'); |
1780 |
} |
1781 |
} else if ( data.status === 404 ) { |
1782 |
$('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>'); |
1783 |
} else { |
1784 |
$('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>'); |
1785 |
} |
1786 |
$('#external_id').val('').focus(); |
1787 |
}); |
1788 |
}); |
1789 |
|
1790 |
$("#addToBundleModal").on("hidden.bs.modal", function(e){ |
1791 |
if ( bundle_changed ) { |
1792 |
$('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload(); |
1793 |
} |
1794 |
bundle_form_active = 0; |
1795 |
bundle_changed = 0; |
1796 |
}); |
1797 |
|
1798 |
$("#removeFromBundleModal").on("shown.bs.modal", function(e){ |
1799 |
var button = $(e.relatedTarget); |
1800 |
var item_id = button.data('item'); |
1801 |
$("#removeResult").replaceWith('<div id="removeResult"></div>'); |
1802 |
$("#removeFromBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items/'); |
1803 |
$("#rm_external_id").focus(); |
1804 |
bundle_changed = 0; |
1805 |
bundle_form_active = item_id; |
1806 |
}); |
1807 |
|
1808 |
$("#removeFromBundleForm").submit(function(event) { |
1809 |
|
1810 |
/* stop form from submitting normally */ |
1811 |
event.preventDefault(); |
1812 |
|
1813 |
/* get the action attribute from the <form action=""> element */ |
1814 |
var $form = $(this), |
1815 |
url = $form.attr('action'); |
1816 |
|
1817 |
var barcode = $('#rm_external_id').val(); |
1818 |
|
1819 |
/* Fetch itemnumber using rm_external_id */ |
1820 |
var itemReq = $.get('/api/v1/items', { q: JSON.stringify({ |
1821 |
external_id: barcode |
1822 |
}) }, null, "json"); |
1823 |
|
1824 |
var itemnumber; |
1825 |
itemReq.done(function(data) { |
1826 |
if (data.length === 1) { |
1827 |
itemnumber = data[0].item_id; |
1828 |
|
1829 |
/* Remove link using fetch itemnumber */ |
1830 |
var deleteReq = $.ajax( url + itemnumber, { |
1831 |
type : 'DELETE' |
1832 |
}); |
1833 |
|
1834 |
/* Report the results */ |
1835 |
deleteReq.done(function(data) { |
1836 |
var barcode = $('#rm_external_id').val(); |
1837 |
$('#removeResult').replaceWith('<div id="removeResult" class="alert alert-success">'+_("Success: Removed '%s'").format(barcode)+'</div>'); |
1838 |
$('#rm_external_id').val('').focus(); |
1839 |
bundle_changed = 1; |
1840 |
}); |
1841 |
deleteReq.fail(function(data) { |
1842 |
var barcode = $('#rm_external_id').val(); |
1843 |
if ( data.status === 409 ) { |
1844 |
var response = data.responseJSON; |
1845 |
if ( response.key === "PRIMARY" ) { |
1846 |
$('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>'); |
1847 |
} else { |
1848 |
$('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>'); |
1849 |
} |
1850 |
} else if ( data.status === 404 ) { |
1851 |
$('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>'); |
1852 |
} else { |
1853 |
$('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>'); |
1854 |
} |
1855 |
$('#rm_external_id').val('').focus(); |
1856 |
}); |
1857 |
} else { |
1858 |
$('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Barcode matched more than one item '%s'").format(barcode)+'</div>'); |
1859 |
} |
1860 |
}); |
1861 |
itemReq.fail(function(data) { |
1862 |
$('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Item not found '%s'").format(barcode)+'</div>'); |
1863 |
$('#rm_external_id').val('').focus(); |
1864 |
|
1865 |
}); |
1866 |
}); |
1867 |
|
1868 |
$("#removeFromBundleModal").on("hidden.bs.modal", function(e){ |
1869 |
if ( bundle_changed ) { |
1870 |
$('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload(); |
1871 |
} |
1872 |
bundle_form_active = 0; |
1873 |
bundle_changed = 0; |
1874 |
}); |
1875 |
// End bundle handling |
1876 |
[% END %] |
1877 |
|
1539 |
var table_names = [ 'holdings_table', 'otherholdings_table' ]; |
1878 |
var table_names = [ 'holdings_table', 'otherholdings_table' ]; |
1540 |
var table_settings = [ [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json') | $raw %] ]; |
1879 |
var table_settings = [ [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json') | $raw %] ]; |
1541 |
var has_images = [ "[% itemloop_has_images | html %]", "[% otheritemloop_has_images | html %]" ]; |
1880 |
var has_images = [ "[% itemloop_has_images | html %]", "[% otheritemloop_has_images | html %]" ]; |
Lines 1551-1556
Note that permanent location is a code, and location may be an authval.
Link Here
|
1551 |
"sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', |
1890 |
"sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', |
1552 |
}; |
1891 |
}; |
1553 |
var table = KohaTable( table_name, dt_parameters, table_settings[index], 'with_filters' ); |
1892 |
var table = KohaTable( table_name, dt_parameters, table_settings[index], 'with_filters' ); |
|
|
1893 |
|
1894 |
[% IF bundlesEnabled %] |
1895 |
// Add event listener for opening and closing bundle details |
1896 |
$('#' + table_name + ' tbody').on('click', 'button.details-control', function () { |
1897 |
var button = $(this); |
1898 |
var tr = button.closest('tr'); |
1899 |
var dTable = button.closest('table').DataTable({ 'retrieve': true }); |
1900 |
|
1901 |
var itemnumber = tr.data('itemnumber'); |
1902 |
var duedate = tr.data('duedate'); |
1903 |
var row = dTable.row( tr ); |
1904 |
|
1905 |
if ( row.child.isShown() ) { |
1906 |
// This row is already open - close it |
1907 |
row.child.hide(); |
1908 |
tr.removeClass('shown'); |
1909 |
button.removeClass('active'); |
1910 |
} |
1911 |
else { |
1912 |
// Open this row |
1913 |
createChild(row, itemnumber, duedate); |
1914 |
tr.addClass('shown'); |
1915 |
button.addClass('active'); |
1916 |
} |
1917 |
} ); |
1918 |
[% END %] |
1554 |
}); |
1919 |
}); |
1555 |
|
1920 |
|
1556 |
[% IF Koha.Preference('AcquisitionDetails') %] |
1921 |
[% IF Koha.Preference('AcquisitionDetails') %] |
Lines 1572-1577
Note that permanent location is a code, and location may be an authval.
Link Here
|
1572 |
"sPaginationType": "full" |
1937 |
"sPaginationType": "full" |
1573 |
})); |
1938 |
})); |
1574 |
[% END %] |
1939 |
[% END %] |
|
|
1940 |
|
1575 |
}); |
1941 |
}); |
1576 |
|
1942 |
|
1577 |
[% IF (found1) %] |
1943 |
[% IF (found1) %] |