diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index 7352f3e3e2..327fe0632a 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -712,6 +712,12 @@ fieldset { } li { + margin-top: 1em; + + &:first-child { + margin-top: 0; + } + &[aria-disabled="true"] { color: #999; } @@ -908,10 +914,6 @@ fieldset { padding-left: 0; } } - - legend { - margin-bottom: 0; - } } ol { @@ -1037,6 +1039,7 @@ legend { border-radius: 3px; font-size: 123.1%; font-weight: bold; + margin-bottom: 0; padding: .2em .5em; width: auto; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc index 0b5f33110f..7ec650be1c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc @@ -73,6 +73,7 @@ [% IF ( CAN_user_tools_label_creator ) %]
  • Label creator
  • Quick spine label creator
  • +
  • Barcode image generator
  • [% END %] [% IF ( CAN_user_tools_rotating_collections ) %]
  • Rotating collections
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/barcode-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/barcode-print.tt new file mode 100644 index 0000000000..f020565e43 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/barcode-print.tt @@ -0,0 +1,212 @@ +[% USE raw %] +[% USE Asset %] +[% SET footerjs = 1 %] +[% INCLUDE 'doc-head-open.inc' %]Barcode image generator › Tools › Koha +[% INCLUDE 'doc-head-close.inc' %] +[% Asset.css("css/humanmsg.css") | $raw %] +[% FILTER collapse %] + +[% END %] + + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'cat-search.inc' %] + + + +
    +
    +
    +
    +

    Barcode image generator

    + +
    +
    +
    +
    +
      +
    1. + + +
    2. +
    3. + + + 3 +
      Module size refers to the pixel dimensions of each black or white square in the generated QR code.
      +
    4. +
    5. + +
    6. +
    7. + + +
    8. +
    9. + + + +
      Actual dimensions of the QR code depend on the amount of characters being encoded.
      +
      Barcode text must be numeric (0-9)
      +
    10. +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    + +[% MACRO jsinclude BLOCK %] + [% Asset.js("js/tools-menu.js") | $raw %] + [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %] + +[% END %] + +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt index 5d0d7f84cb..22dab0b384 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt @@ -224,7 +224,12 @@
    Label creator
    Create printable labels and barcodes from catalog data
    [% END %] - + + [% IF ( CAN_user_tools_label_creator ) %] +
    Barcode image generator
    +
    Configure and create barcodes of various types to be output as an image
    + [% END %] + [% IF ( CAN_user_tools_label_creator ) %]
    Quick spine label creator
    Enter a barcode to generate a printable spine label. For use with dedicated label printers
    diff --git a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js b/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js index 14325b6f9d..8fad270f87 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js +++ b/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js @@ -1,6 +1,6 @@ $(document).ready(function() { var path = location.pathname.substring(1); - if (path.indexOf("labels") >= 0 && path.indexOf("spine") < 0 ) { + if (path.indexOf("labels") >= 0 && path.indexOf("spine") < 0 && path.indexOf("barcode") < 0 ) { $('#navmenulist a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current"); } else if (path.indexOf("patroncards") >= 0 ) { $('#navmenulist a[href$="/cgi-bin/koha/patroncards/home.pl"]').addClass("current"); diff --git a/labels/barcode-print.pl b/labels/barcode-print.pl new file mode 100755 index 0000000000..2707521575 --- /dev/null +++ b/labels/barcode-print.pl @@ -0,0 +1,33 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; +use CGI qw ( -utf8 ); +use C4::Auth qw( get_template_and_user ); +use C4::Output qw( output_html_with_http_headers ); +use C4::Context; + +my $query = CGI->new; +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { template_name => "labels/barcode-print.tt", + query => $query, + type => "intranet", + flagsrequired => { catalogue => 1 }, + } +); + +output_html_with_http_headers $query, $cookie, $template->output;