Bugzilla – Attachment 115037 Details for
Bug 27325
Fix singular/plural forms on the OPAC dashboard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27325: Fix singular/plural forms on the OPAC dashboard
Bug-27325-Fix-singularplural-forms-on-the-OPAC-das.patch (text/plain), 7.57 KB, created by
Lucas Gass (lukeg)
on 2021-01-11 15:28:12 UTC
(
hide
)
Description:
Bug 27325: Fix singular/plural forms on the OPAC dashboard
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2021-01-11 15:28:12 UTC
Size:
7.57 KB
patch
obsolete
>From c124cdf2a445a34410f62360cd8c762b0867f50a Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 6 Jan 2021 16:41:48 +0000 >Subject: [PATCH] Bug 27325: Fix singular/plural forms on the OPAC dashboard > >This patch adds handling of plurals to the display of counts on the >logged-in user's dashboard: checkouts, overdues, etc. > >To test, apply the patch and log in to the OPAC. > > - Go to the OPAC main page and check the user dashboard area. > - Confirm that the correct numbers and plural forms are shown for > checkouts, overdues, holds pending, holds waiting, and messages. > - Test each of those categories with counts of 0, 1, and more than one > to confirm that the plural forms are correct. > - Test with various counts of each type of message: OPAC notes as > defined when editing a patron record and notes added via the checkout > page. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../opac-tmpl/bootstrap/en/modules/opac-main.tt | 50 +++++++++++++++++++--- > 1 file changed, 43 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >index 37c50aacdc..f2ccf82271 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >@@ -5,6 +5,7 @@ > [% USE Categories %] > [% USE Price %] > [% USE KohaNews %] >+[% PROCESS 'i18n.inc' %] > [% SET OpacNavRight = KohaNews.get( location => "OpacNavRight", lang => lang, library => branchcode ) %] > [% SET OpacMainUserBlock = KohaNews.get( location => "OpacMainUserBlock", lang => lang, library => branchcode ) %] > [% SET OpacLoginInstructions = KohaNews.get( location => "OpacLoginInstructions", lang => lang, library => branchcode ) %] >@@ -218,25 +219,60 @@ > <h3>Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</span></a></h3> > <ul id="user_summary_shortcuts"> > [% IF checkouts && checkouts > 0 %] >- <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-checkouts"><span class="user_checkouts_count count_label">[% checkouts | html %]</span> checkout(s)</a></li> >+ <li> >+ <a href="/cgi-bin/koha/opac-user.pl#opac-user-checkouts"> >+ <span class="user_checkouts_count count_label">[% checkouts | html %]</span> >+ [% tn('checkout', 'checkouts', checkouts ) | html %] >+ </a> >+ </li> > [% END %] > [% IF overdues && overdues > 0 %] >- <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-overdues"><span class="user_overdues_count count_label">[% overdues | html %]</span> overdue(s)</a></li> >+ <li> >+ <a href="/cgi-bin/koha/opac-user.pl#opac-user-overdues"> >+ <span class="user_overdues_count count_label">[% overdues | html %]</span> >+ [% tn('overdue', 'overdues', overdues ) | html %] >+ </a> >+ </li> > [% END %] > [% IF holds_pending && holds_pending > 0 %] >- <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-holds"><span class="user_holds_pending_count count_label">[% holds_pending | html %]</span> hold(s) pending</a></li> >+ <li> >+ <a href="/cgi-bin/koha/opac-user.pl#opac-user-holds"> >+ <span class="user_holds_pending_count count_label">[% holds_pending | html %]</span> >+ [% tn('hold pending', 'holds pending', holds_pending ) | html %] >+ </a> >+ </li> > [% END %] > [% IF holds_waiting && holds_waiting > 0 %] >- <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-holds"><span class="user_holds_waiting_count count_label">[% holds_waiting | html %]</span> hold(s) waiting</a></li> >+ <li> >+ <a href="/cgi-bin/koha/opac-user.pl#opac-user-holds"> >+ <span class="user_holds_waiting_count count_label">[% holds_waiting | html %]</span> >+ [% tn('hold waiting', 'holds waiting', holds_waiting ) | html %] >+ </a> >+ </li> > [% END %] > [% IF total_owing && total_owing > 0 %] >- <li><a href="/cgi-bin/koha/opac-account.pl"><span class="user_fines_count count_label">[% total_owing | $Price with_symbol => 1 %]</span> due in fines and charges</a></li> >+ <li> >+ <a href="/cgi-bin/koha/opac-account.pl"> >+ <span class="user_fines_count count_label">[% total_owing | $Price with_symbol => 1 %]</span> >+ due in fines and charges >+ </a> >+ </li> > [% END %] > [% IF patron_messages && patron_messages.count > 0 || opacnote %] > [% IF opacnote %] >- <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">[% patron_messages.count + 1 | html %]</span> message(s)</a></li> >+ <li> >+ <a href="/cgi-bin/koha/opac-user.pl"> >+ <span class="count_label">[% patron_messages.count + 1 | html %]</span> >+ [% tn('message', 'messages', patron_messages.count + 1 ) | html %] >+ </a> >+ </li> > [% ELSE %] >- <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">[% patron_messages.count | html %]</span> message(s)</a></li> >+ <li> >+ <a href="/cgi-bin/koha/opac-user.pl"> >+ <span class="count_label">[% patron_messages.count | html %]</span> >+ [% tn('message', 'messages', patron_messages.count ) | html %] >+ </a> >+ </li> > [% END %] > [% END %] > </ul> >-- >2.11.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 27325
:
114899
|
115015
|
115037
|
115102