Bug 26777: (follow-up) Adjust script, template, and CSS
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
3b5b84034c
commit
049836607d
3 changed files with 13 additions and 28 deletions
|
@ -2927,6 +2927,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;
|
||||
|
@ -2935,10 +2938,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2948,9 +2949,6 @@ $star-selected: #EDB867;
|
|||
width: 100%;
|
||||
#patron-image {
|
||||
padding: 1rem 0 0.25rem 0.25rem;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue