Bugzilla – Attachment 168168 Details for
Bug 26777
Give the user the option to display their patron card barcode from the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26777: (follow-up) Adjust script, template, and CSS
Bug-26777-follow-up-Adjust-script-template-and-CSS.patch (text/plain), 4.82 KB, created by
Sam Lau
on 2024-06-26 16:33:20 UTC
(
hide
)
Description:
Bug 26777: (follow-up) Adjust script, template, and CSS
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2024-06-26 16:33:20 UTC
Size:
4.82 KB
patch
obsolete
>From a43aba1cc1501d5c847b5ba83adc75e612fefac8 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 21 Jun 2024 17:13:38 +0000 >Subject: [PATCH] Bug 26777: (follow-up) Adjust script, template, and CSS > >--- > .../opac-tmpl/bootstrap/css/src/opac.scss | 10 ++++------ > .../bootstrap/en/modules/opac-virtual-card.tt | 13 +++++++------ > opac/opac-virtual-card.pl | 18 ++---------------- > 3 files changed, 13 insertions(+), 28 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index f265937c9b..821805bfbe 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -3005,6 +3005,9 @@ $star-selected: #EDB867; > } > > #patron-virtual-card { >+ width: 400px; >+ border-radius: 15px; >+ box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3); > display: flex; > flex-direction: column; > align-items: flex-start; >@@ -3013,10 +3016,8 @@ $star-selected: #EDB867; > flex: 1; > width: 100%; > #patron-barcode { >- padding: 1rem 0.25rem 1rem 0.25rem; >+ padding: .5rem; > width: 100%; >- height: auto; >- min-height: 25px; > } > } > >@@ -3026,9 +3027,6 @@ $star-selected: #EDB867; > width: 100%; > #patron-image { > padding: 1rem 0 0.25rem 0.25rem; >- display: block; >- width: 100%; >- height: auto; > } > } > } >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-virtual-card.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-virtual-card.tt >index b21dcf98b2..85a727d947 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-virtual-card.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-virtual-card.tt >@@ -2,6 +2,7 @@ > [% USE raw %] > [% USE Asset %] > [% USE Koha %] >+[% USE Branches %] > [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -32,22 +33,22 @@ > </div> > </div> > <div class="col-10 order-first order-lg-2"> >+ <h1>My virtual card </h1> > <div id="patron-virtual-card"> >- <h1>My virtual card </h1> >- <div id="barcode-container"> >- <svg id="patron-barcode" data-barcode="[% cardnumber | html %]"></svg> >- </div> > <div id="image-and-library-container"> > [% IF ( display_patron_image ) %] > <div id="image-container"> > <img id="patron-image" src="/cgi-bin/koha/opac-patron-image.pl" alt="" /> > </div> > [% END %] >+ <div id="barcode-container"> >+ <svg id="patron-barcode" data-barcode="[% patron.cardnumber | html %]"></svg> >+ </div> > <div id="lib-container"> >- <p id="patron-lib"><strong>Library:</strong> [% library | html %]</p> >+ <p id="patron-lib"><strong>Library:</strong> [% Branches.GetName( patron.branchcode ) | html %]</p> > </div> > </div> >- </div> <!-- / #patron-virtual-card --> >+ </div> > </div> <!-- / .col-10 --> > </div> <!-- / .row --> > </div> <!-- / .container-fluid --> >diff --git a/opac/opac-virtual-card.pl b/opac/opac-virtual-card.pl >index 26cd722d85..423de58dcb 100644 >--- a/opac/opac-virtual-card.pl >+++ b/opac/opac-virtual-card.pl >@@ -19,18 +19,12 @@ > > use Modern::Perl; > >-#need > use CGI qw ( -utf8 ); > use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_html_with_http_headers ); > use Koha::Libraries; >- >-#unsure >-use C4::Biblio; >-use C4::External::BakerTaylor qw( image_url link_url ); >-use MARC::Record; > use Koha::Patrons; >-use Koha::ItemTypes; >+ > > my $query = CGI->new; > >@@ -54,17 +48,9 @@ if (C4::Context->preference('OPACpatronimages')) { > $template->param( display_patron_image => 1 ) if $patron->image; > } > >-my $branchcode = $patron->branchcode; >-# Fetch the library object using the branchcode >-my $library = Koha::Libraries->find($branchcode); >- >-# Get the library name >-my $library_name = $library ? $library->branchname : 'Unknown Library'; >- > $template->param( > virtualcardview => 1, >- cardnumber => $patron->cardnumber, >- library => $library_name, >+ patron => $patron, > ); > > >-- >2.39.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 26777
:
167969
|
167970
|
167971
|
167972
|
167976
|
167977
|
168029
|
168030
|
168165
|
168166
|
168167
|
168168
|
168169
|
168170
|
168171
|
168172
|
168289
|
168290
|
168291
|
168292
|
168293
|
168294
|
168295
|
168296
|
169742
|
169743
|
169744
|
169745
|
169746
|
169747
|
169748
|
169749
|
170667
|
170668
|
170669
|
170670
|
170671
|
170672
|
170673
|
170674