+ </main>
+ </div> <!-- /.col-sm-10.col-sm-push-2 -->
+
+ <div class="col-sm-2 col-sm-pull-10">
+ <aside>
+ [% INCLUDE 'tools-menu.inc' %]
+ </aside>
+ </div> <!-- /.col-sm-2.col-sm-pull-10 -->
+ </div> <!-- /.row -->
+
+[% MACRO jsinclude BLOCK %]
+ [% Asset.js("js/tools-menu.js") | $raw %]
+ [% INCLUDE 'greybox.inc' %]
+ [% INCLUDE 'datatables.inc' %]
+ <script>
+ function Xport() {
+ batches= new Array;
+ if(document.layouts.action.length > 0) {
+ for (var i=0; i < document.layouts.action.length; i++) {
+ if (document.layouts.action[i].checked) {
+ batches.push("batch_id=" + document.layouts.action[i].value);
+ }
+ }
+ if (batches.length < 1) {
+ alert(_("Please select at least one batch to export."));
+ return; // no batch selected
+ }
+ getstr = batches.join("&");
+ }
+ else if (document.layouts.action.checked) {
+ getstr = "batch_id="+document.layouts.action.value;
+ }
+ else {
+ alert(_("Please select at least one batch to export."));
+ return; // no batch selected
+ }
+ return GB_showCenter(_("Export labels"), "/cgi-bin/koha/labels/label-print.pl?" + getstr, 400, 800);
+ }
+ function selected_layout(op) {
+ var selected = new Array;
+ if (document.layouts.action.length) {
+ for (i=0;i<document.layouts.action.length;i++){
+ if (document.layouts.action[i].checked){
+ selected.push(i);
+ }
+ };
+ if (selected.length == 1) {
+ return(document.layouts.action[selected[0]].value);
+ }
+ else {
+ alert(_("Please select only one %s to %s.").format("[% label_element | html %]", op));
+ return (-1);
+ }
+ }
+ else {
+ if (document.layouts.action.checked){
+ return(document.layouts.action.value);
+ }
+ };
+ alert(_("Please select a %s.").format("[% label_element | html %]"));
+ return (-1);
+ }
+ $(document).ready(function(){
+ $("#print").click(function(e){
+ e.preventDefault();
+ Xport();
+ });
+ $(".delete").on("click", function(){
+ return confirmDelete( _("Are you sure you want to delete this?") );
+ });
+ $("#labels-table").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "sPaginationType": "full",
+ "aaSorting": [[ 1, "asc" ]],
+ "aoColumnDefs": [
+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
+ ]
+ }));
+ });
+ </script>
+[% END %]
+
+[% INCLUDE 'intranet-bottom.inc' %]