Bugzilla – Attachment 76310 Details for
Bug 20921
Expose borrowernumber and branch when user is logged in to OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20921: Add borrowernumber and branchcode as html attributes
Bug-20921-Add-borrowernumber-and-branchcode-as-htm.patch (text/plain), 2.12 KB, created by
Maryse Simard
on 2018-06-22 21:00:09 UTC
(
hide
)
Description:
Bug 20921: Add borrowernumber and branchcode as html attributes
Filename:
MIME Type:
Creator:
Maryse Simard
Created:
2018-06-22 21:00:09 UTC
Size:
2.12 KB
patch
obsolete
>From c5aff827c64322c307d000a925708087e8d978ec Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 12 Jun 2018 15:57:56 +0000 >Subject: [PATCH] Bug 20921: Add borrowernumber and branchcode as html > attributes > >To test: >1 - Apply patch >2 - Visit the opac >3 - Sign in >4 - You should not see any difference >5 - Inspect the element 'Welcome, {username}' >6 - Note the attributes for borrowernumber and branchcode >7 - Add to OPACUserJS: >$(document).ready(function(){ > console.log( $(".loggedinusername").attr('data-branchcode')); > console.log( $(".loggedinusername").attr('data-borrowernumber')); >}); >8 - Check the console and note you can see the info expected > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> >Followed the test plan and it works. >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 0984563..3ace3a4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -103,7 +103,7 @@ > [% END %] > [% END %] > [% IF ( loggedinusername ) %] >- <li><p class="members navbar-text">Welcome, <a class="login-link" href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</span></a></p></li> >+ <li><p class="members navbar-text">Welcome, <a class="login-link" href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername" data-borrowernumber="[% USER_INFO.borrowernumber %]" data-branchcode="[% USER_INFO.branchcode %]" >[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</span></a></p></li> > <li class="divider-vertical"></li> > [% END %] > [% END %] >-- >2.7.4
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 20921
:
76005
|
76200
|
76310
|
76413
|
76414
|
76415