Bugzilla – Attachment 182667 Details for
Bug 38792
Move "My virtual card" tab and maybe re-label it
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38792: Rename "My virtual card" to "Library card" and move tab
Bug-38792-Rename-My-virtual-card-to-Library-card-a.patch (text/plain), 9.02 KB, created by
Paul Derscheid
on 2025-05-20 12:30:52 UTC
(
hide
)
Description:
Bug 38792: Rename "My virtual card" to "Library card" and move tab
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2025-05-20 12:30:52 UTC
Size:
9.02 KB
patch
obsolete
>From 42a744db24a6e0340519875d1116d0d7342ce995 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 15 Apr 2025 13:23:45 +0000 >Subject: [PATCH] Bug 38792: Rename "My virtual card" to "Library card" and > move tab > >This patch makes a number of changes to the "My virtual card" page and >associated menu item: > >1. Rename it to "Library card." This fits better with the naming of > other user pages. This change includes updates to the page title, > breadcrumb menu, and page heading. >2. Move the menu item up to appear right after the "Summary" link. >3. Make some style changes to the display of the card, giving the card > more comfortable padding and adding some responsive behavior to the > card width. > >To test, apply the patch and rebuild the OPAC CSS. > >- If necessary, go to Administration -> System preferences and enable > the OPACVirtualCard preference. >- Log in to the OPAC. >- You should see a "Library card" menu item in the left-hand sidebar > menu, right below the "Summary" item. >- On the "Library card" page, the page title, breadcrumb item, and page > heading should read "Your library card." >- The "card" should look good, and should adjust well at various browser > widths. > - Above 769px wide, the card should not expand wider than 500px. > - Below 769px wide, the card should have a width of 100% and should > adjust as the viewport is narrowed. > >Sponsored-by: Athens County Public Libraries >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> >--- > .../bootstrap/css/src/_responsive.scss | 5 ++ > .../opac-tmpl/bootstrap/css/src/opac.scss | 51 ++++++++++--------- > .../bootstrap/en/includes/usermenu.inc | 9 ++-- > .../bootstrap/en/modules/opac-virtual-card.tt | 32 ++++++------ > 4 files changed, 55 insertions(+), 42 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss >index c0eb207a7cb..405bda267b7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss >@@ -542,4 +542,9 @@ > .koha_url_text { > display: inline; > } >+ >+ #patron-virtual-card { >+ max-width: 500px; >+ min-width: 300px; >+ } > } >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index 5f182f644ab..21071965df6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -2935,38 +2935,43 @@ $star-selected: #EDB867; > } > > #patron-virtual-card { >+ border: 1px solid #BBB; >+ border-radius: 15px; >+ box-shadow: 5px 5px 6px rgba( 4, 0, 0, .2 ); >+ margin: 1rem 0; >+ padding: 1rem; > width: 100%; >- min-width: 300px; >- max-width: 500px; >+} >+ >+#image-container { >+ padding: 0 .5rem; >+} >+ >+#patron-image { > border-radius: 15px; >- box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3); > display: flex; > flex-direction: column; >- align-items: flex-start; >+ flex-shrink: 1; >+ width: auto; >+} > >- #image-container { >- width: 100%; >- #patron-image { >- height: 75%; >- width: auto; >- border-radius: 15px; >- padding: 0.5rem; >- } >- } >+#card-details { >+ display: flex; >+ flex-direction: column; >+ flex-grow: 1; >+ padding: 0 .5rem; >+} > >- #barcode-container { >+#barcode-container { >+ margin-bottom: 1rem; >+ >+ svg { >+ display: block; > width: 100%; >- padding: 0.25rem 0.5rem 0.25rem 0.5rem; >- &.qrcode { >- width: 50%; // Set a smaller width for QR codes >- } > } > >- #lib-container { >- width: 100%; >- #patron-lib { >- padding-left: 0.5rem; >- } >+ &.qrcode { >+ width: 50%; // Set a smaller width for QR codes > } > } > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >index cf37dcc1586..894b317dcc3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >@@ -4,6 +4,11 @@ > <div id="menu"> > <ul> > <li [% IF userview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-user.pl">Summary</a></li> >+ >+ [% IF Koha.Preference( 'OPACVirtualCard' ) %] >+ <li [% IF virtualcardview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-virtual-card.pl">Library card</a></li> >+ [% END %] >+ > [% IF ( OPACFinesTab ) %] > <li [% IF accountview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-account.pl">Charges</a></li> > [% END %] >@@ -76,10 +81,6 @@ > [% IF logged_in_user.alert_subscriptions.count %] > <li [% IF alertsview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-alert-subscriptions.pl">Alert subscriptions ([% logged_in_user.alert_subscriptions.count | html %])</a></li> > [% END %] >- >- [% IF Koha.Preference( 'OPACVirtualCard' ) %] >- <li [% IF virtualcardview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-virtual-card.pl">My virtual card</a></li> >- [% END %] > </ul> > </div> > [% END %] >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 ddd0b72b0a3..36c4747a8a5 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 >@@ -7,7 +7,7 @@ > [% 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' %] >-<title>My virtual card › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title> >+<title>Your library card › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title> > [% INCLUDE 'doc-head-close.inc' %] > [% BLOCK cssinclude %] > [% END %] >@@ -21,7 +21,7 @@ > <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> > [% END %] > [% WRAPPER breadcrumb_item bc_active= 1 %] >- <span>My virtual card</span> >+ <span>Your library card</span> > [% END %] > [% END #/ WRAPPER breadcrumbs %] > >@@ -30,25 +30,27 @@ > <div class="col-lg-2"> > <div id="navigation"> [% INCLUDE 'navigation.inc' IsPatronPage=1 %] </div> > </div> >- <div class="col-10 order-first order-lg-2"> >- <h1>My virtual card </h1> >+ <div class="col-lg-10 order-first order-lg-2"> >+ <h1>Your library card </h1> > <div id="patron-virtual-card"> > [% 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 %]" data-barcode-format="[% barcode_format | html %]"></svg> >- </div> >- <div id="lib-container"> >- <p id="patron-lib"><strong>Library:</strong> [% Branches.GetName( patron.branchcode ) | html %]</p> >- </div> >- <div id="cardnumber-container"> >- <p id="patron-cardnumber"><strong>Card number:</strong> [% patron.cardnumber | html %]</p> >- </div> >- <div id="dateexpiry-container"> >- <p id="patron-dateexpiry"><strong>Expiration date:</strong> [% patron.dateexpiry | $KohaDates %]</p> >+ <div id="card-details"> >+ <div id="barcode-container"> >+ <svg id="patron-barcode" data-barcode="[% patron.cardnumber | html %]" data-barcode-format="[% barcode_format | html %]"></svg> >+ </div> >+ <div id="lib-container"> >+ <p id="patron-lib"><strong>Library:</strong> [% Branches.GetName( patron.branchcode ) | html %]</p> >+ </div> >+ <div id="cardnumber-container"> >+ <p id="patron-cardnumber"><strong>Card number:</strong> [% patron.cardnumber | html %]</p> >+ </div> >+ <div id="dateexpiry-container"> >+ <p id="patron-dateexpiry"><strong>Expiration date:</strong> [% patron.dateexpiry | $KohaDates %]</p> >+ </div> > </div> > </div> > </div> >-- >2.49.0
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 38792
:
182625
|
182630
|
182666
|
182667
|
183257