Bugzilla – Attachment 158243 Details for
Bug 35131
Add scan-able barcode to the patron sidebar (patroninfo)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35131: Show the patron cardnumber as a borcode in the patron record
Bug-35131-Show-the-patron-cardnumber-as-a-borcode-.patch (text/plain), 4.96 KB, created by
Owen Leonard
on 2023-11-02 11:00:48 UTC
(
hide
)
Description:
Bug 35131: Show the patron cardnumber as a borcode in the patron record
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-11-02 11:00:48 UTC
Size:
4.96 KB
patch
obsolete
>From d4cb7510b75ed7a9bd21d9db13d8a67bbf1cdbaa Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 23 Oct 2023 15:16:55 +0000 >Subject: [PATCH] Bug 35131: Show the patron cardnumber as a borcode in the > patron record > >To test: >1. Apply patch, updatedatabase, yarn build, and restart services >2. Search for the system preference 'ShowBarcodeOnPatronRecord' and set > it to something other than 'Don't show'. >3. Now go to any page that shows the 'patroninfo' section. ( > circ/circulation.pl, members/moremember.pl, members/pay.pl, etc ) >4. Make sure this patron has a cardnumber. >5. From any of the aforementioned pages make sure you can see the > patron barcode. >6. Try many different barcode types, making sure they each display well. >7. Remove the patron cardnumber and confirm that nothing displays. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../data/mysql/atomicupdate/bug_35131.pl | 12 +++++++----- > .../prog/css/src/staff-global.scss | 4 ++++ > .../prog/en/includes/circ-menu.inc | 7 +++++-- > .../en/modules/admin/preferences/patrons.pref | 19 +++++++++++++++++++ > 4 files changed, 35 insertions(+), 7 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_35131.pl b/installer/data/mysql/atomicupdate/bug_35131.pl >index 729a54707d..11cc370115 100755 >--- a/installer/data/mysql/atomicupdate/bug_35131.pl >+++ b/installer/data/mysql/atomicupdate/bug_35131.pl >@@ -1,15 +1,17 @@ > use Modern::Perl; > > return { >- bug_number => 35131, >+ bug_number => 35131, > description => "Add preference ShowBarcodeOnPatronRecord", >- up => sub { >+ up => sub { > my ($args) = @_; >- my ($dbh, $out) = @$args{qw(dbh out)}; >- $dbh->do(q{ >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ $dbh->do( >+ q{ > INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type` ) VALUES > ('ShowBarcodeOnPatronRecord', '0', '|0|Code39|COOP2of5|EAN13|EAN8|IATA2of5|Industrial2of5|ITF|Matrix2of5|NW7|QRcode|UPCA|UPCE', 'Show a patron carnumber as a barcode on the patron record ', 'Choice') >- }); >+ } >+ ); > say $out "Added new system preference 'ShowBarcodeOnPatronRecord'"; > }, > }; >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 8a491aa0af..bfda1a5d4a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -1264,6 +1264,10 @@ dd { > > div { > width: 100%; > } >+ >+ #patron-barcode { >+ margin-left: 0.9em; >+ } > } > > .patroninfo-section { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index ead8c18fbe..5483163620 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -11,7 +11,11 @@ > [% patron_type_class = 'is-staff' %] > [% END %] > <div class="patroninfo [% patron_type_class | html %]"> >- >+[% IF patron.cardnumber && Koha.Preference('ShowBarcodeOnPatronRecord') %] >+ <div id="patron-barcode"> >+ <img src="/cgi-bin/koha/svc/barcode?type=[% Koha.Preference('ShowBarcodeOnPatronRecord') | uri %]¬ext=1&height=50&barcode=[% patron.cardnumber | uri %]" alt="[% patron.cardnumber | html %]" /> >+ </div> >+[% END %] > [% IF ( patronimages ) %] > <h5 class="text-center"> > [% ELSE %] >@@ -58,7 +62,6 @@ > [% IF patron.pronouns %] > <li class="patronpronouns">([% patron.pronouns | html %])</li> > [% END %] >- > [% PROCESS 'display-address-style' %] > > [% IF ( patron.phone || patron.mobile || patron.phonepro ) %]<li class="patronphone"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index c981c66e73..f73c445880 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -135,6 +135,25 @@ Patrons: > class: integer > - days. Leave empty to disable this behavior. > - "<br><strong>NOTE:</strong> This system preference requires the misc/cronjobs/cleanup_database.pl cronjob. Ask your system administrator to schedule it." >+ - >+ - "Show a " >+ - pref: ShowBarcodeOnPatronRecord >+ default: no >+ choices: >+ 0: "Don't show" >+ Code39: "Code39" >+ COOP2of5: "COOP2of5" >+ EAN13: "EAN13" >+ EAN8: "EAN8" >+ IATA2of5: "IATA2of5" >+ Industrial2of5: "Industrial2of5" >+ ITF: "ITF" >+ Matrix2of5: "Matrix2of5" >+ NW7: "NW7" >+ QRcode: "QRcode" >+ UPCA: "UPCA" >+ UPCE: "UPCE" >+ - " barcode of the patron record." > > Membership expiry: > - >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35131
:
157674
|
157675
|
157676
|
157936
|
158242
|
158243
|
158244
|
159459
|
159460
|
159461
|
159462