Bugzilla – Attachment 109134 Details for
Bug 26123
Show info about existing OPAC note/Patron message on patron's dashboard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26123: Add OPAC note/patron message notice to dashboard
Bug-26123-Add-OPAC-notepatron-message-notice-to-da.patch (text/plain), 3.85 KB, created by
Lucas Gass (lukeg)
on 2020-08-26 01:45:56 UTC
(
hide
)
Description:
Bug 26123: Add OPAC note/patron message notice to dashboard
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2020-08-26 01:45:56 UTC
Size:
3.85 KB
patch
obsolete
>From a29b9357a993746c41b8c63cac982248a4cc90c3 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 26 Aug 2020 01:33:32 +0000 >Subject: [PATCH] Bug 26123: Add OPAC note/patron message notice to dashboard >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >I seperated OPAC note and patron message into two distinct categories with seperate notices for each. Slightly altered test plan > >Test plan: >1. Apply patch, restartgit >2. Add some OPAC messages by clicking 'Add a message' on Home ⺠Circulation ⺠Checkouts ⺠patron >3. Log into the OPAC as that patron and you should see a notice about how many messages you have with a link to opac-user.pl >4. Add multiple OPAC messages and make sure it all continues to work. >5. Also add an OPAC note from memberentry.pl. Refrsh the OPAC and you should see a notice like '1 note'. There is never more than a single OPAC note. >6. Try an OPAC without any messages. >7. Test it with some other notices that would appear on the dashboard, checkouts, holds, overdues. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 8 +++----- > opac/opac-main.pl | 3 +-- > 2 files changed, 4 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 ef7ec54578..71e63da72d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >@@ -216,12 +216,10 @@ > <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 opacnote %] >- [% message_note_count = patron_messages.count + 1 %] >- [% ELSE %] >- [% message_note_count = patron_mssages.count %] >+ <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">1</span> note</a></li> > [% END %] >- [% IF (patron_messages && patron_messages.count > 0) || opacnote %] >- <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">[% message_note_count | html %]</span> message(s)</a></li> >+ [% IF patron_messages && patron_messages.count > 0 %] >+ <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">[% patron_messages.count | html %]</span> message(s)</a></li> > [% END %] > </ul> > </div> >diff --git a/opac/opac-main.pl b/opac/opac-main.pl >index f0b15886a8..f8dcf73dd5 100755 >--- a/opac/opac-main.pl >+++ b/opac/opac-main.pl >@@ -76,7 +76,6 @@ if (defined $news_id){ > > # For dashboard > my $patron = Koha::Patrons->find( $borrowernumber ); >-my $borr = $patron->unblessed; > > if ( $patron ) { > my $checkouts = Koha::Checkouts->search({ borrowernumber => $borrowernumber })->count; >@@ -84,7 +83,7 @@ if ( $patron ) { > my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count; > my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count; > my $patron_messages = Koha::Patron::Messages->search({borrowernumber => $borrowernumber}); >- my $patron_note = $borr->{opacnote}; >+ my $patron_note = $patron->opacnote; > my $total = $patron->account->balance; > > if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_messages > 0 ) { >-- >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 26123
:
107664
|
107685
|
108427
|
109122
|
109134
|
111336
|
112139
|
112227
|
112519
|
114769