Bugzilla – Attachment 170612 Details for
Bug 36083
Not able to create customizable areas to intranet home pages that are library specific
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36083: Fix HTML additional contents for the logged in branchcode
Bug-36083-Fix-HTML-additional-contents-for-the-log.patch (text/plain), 8.57 KB, created by
Brendan Lawlor
on 2024-08-22 17:08:03 UTC
(
hide
)
Description:
Bug 36083: Fix HTML additional contents for the logged in branchcode
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2024-08-22 17:08:03 UTC
Size:
8.57 KB
patch
obsolete
>From 5a1fc1aa378f8e11223112cba2b210c2ace3f4ea Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >Date: Thu, 22 Aug 2024 16:39:55 +0000 >Subject: [PATCH] Bug 36083: Fix HTML additional contents for the logged in > branchcode > >This patch updates the calls to AdditionalContents.get() to use >Branches.GetLoggedInBranchcode instead of the logged in users >homebranch for the library parameter. > >To test: >1. In Tools > HTML Customizations >2. Choose to create an entry in StaffAcquisitionsHome >3. Assign it to a specific library > It's helpful to test with libraries other than Centerville >4. Add text and publication date (important or it will never display) >5. Save >6. Go to the Acquisitions Home page - logged into that library, no text displays. >7. Apply patch and refresh browser >8. Notice the library specifc content displays >9. Notice content created for all libraries still displays too >10. Test HTML content for specific libraries works on all 8 pages > IntranetmainUserBlock > Staff AcquisitionsHome > StaffAuthoritiesHome > StaffCataloguing Home > StaffListsHome > StaffPatronsHome > StaffPOSHome > StaffSerialsHome >--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt | 2 +- > .../prog/en/modules/authorities/authorities-home.tt | 2 +- > .../prog/en/modules/cataloguing/cataloging-home.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt | 2 +- > .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 2 +- > 8 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >index b2d862f073..2ade7ae479 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >@@ -203,7 +203,7 @@ > </div><!-- /.page-section --> > [% END %] > >- [%- SET StaffAcquisitionsHome = AdditionalContents.get( location => "StaffAcquisitionsHome", lang => lang, library => logged_in_user.branchcode ) -%] >+ [%- SET StaffAcquisitionsHome = AdditionalContents.get( location => "StaffAcquisitionsHome", lang => lang, library => Branches.GetLoggedInBranchcode ) -%] > [%- FOREACH block IN StaffAcquisitionsHome.content -%] > <div class="page-section"> > [%- block.content | $raw -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities-home.tt >index 6cf7735c35..a5e04bb146 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities-home.tt >@@ -34,7 +34,7 @@ > > <div id="merge_in_progress" class="page-section bg-info" style="display:none;"></div> > >- [%- SET StaffAuthoritiesHome = AdditionalContents.get( location => "StaffAuthoritiesHome", lang => lang, library => logged_in_user.branchcode ) -%] >+ [%- SET StaffAuthoritiesHome = AdditionalContents.get( location => "StaffAuthoritiesHome", lang => lang, library => Branches.GetLoggedInBranchcode ) -%] > [%- FOREACH block IN StaffAuthoritiesHome.content -%] > <div class="page-section"> > [%- block.content | $raw -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >index 7cf87d2ee9..850601be01 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >@@ -219,7 +219,7 @@ > </div> > </div> > >- [%- SET StaffCataloguingHome = AdditionalContents.get( location => "StaffCataloguingHome", lang => lang, library => logged_in_user.branchcode ) -%] >+ [%- SET StaffCataloguingHome = AdditionalContents.get( location => "StaffCataloguingHome", lang => lang, library => Branches.GetLoggedInBranchcode ) -%] > [%- FOREACH block IN StaffCataloguingHome.content -%] > <div class="page-section"> > [%- block.content | $raw -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index e4940a8712..f5adaa6fd3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -276,7 +276,7 @@ > </div> <!-- /.col-sm-12 --> > </div> <!-- /.row --> > >- [% SET IntranetmainUserblock = AdditionalContents.get( location => "IntranetmainUserblock", lang => lang, library => logged_in_user.branchcode || default_branch ) %] >+ [% SET IntranetmainUserblock = AdditionalContents.get( location => "IntranetmainUserblock", lang => lang, library => Branches.GetLoggedInBranchcode || default_branch ) %] > > [% IF ( IntranetmainUserblock.content && IntranetmainUserblock.content.count > 0 ) %] > <div class="row"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index 13bc58c91f..37343b771d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -120,7 +120,7 @@ > </form> > [% END %] > >- [%- SET StaffPatronsHome = AdditionalContents.get( location => "StaffPatronsHome", lang => lang, library => logged_in_user.branchcode ) -%] >+ [%- SET StaffPatronsHome = AdditionalContents.get( location => "StaffPatronsHome", lang => lang, library => Branches.GetLoggedInBranchcode ) -%] > [%- FOREACH block IN StaffPatronsHome.content -%] > <div class="page-section"> > [%- block.content | $raw -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >index 4b0a4cf709..76677c0d86 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -169,7 +169,7 @@ > </div> > [% END %] > >- [%- SET StaffPOSHome = AdditionalContents.get( location => "StaffPOSHome", lang => lang, library => logged_in_user.branchcode ) -%] >+ [%- SET StaffPOSHome = AdditionalContents.get( location => "StaffPOSHome", lang => lang, library => Branches.GetLoggedInBranchcode ) -%] > [%- FOREACH block IN StaffPOSHome.content -%] > <div class="page-section"> > [%- block.content | $raw -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt >index 22e8960ea7..52fc13f9b6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt >@@ -33,7 +33,7 @@ > > [% INCLUDE 'serials-advsearch.inc' %] > >- [%- SET StaffSerialsHome = AdditionalContents.get( location => "StaffSerialsHome", lang => lang, library => logged_in_user.branchcode ) -%] >+ [%- SET StaffSerialsHome = AdditionalContents.get( location => "StaffSerialsHome", lang => lang, library => Branches.GetLoggedInBranchcode ) -%] > [%- FOREACH block IN StaffSerialsHome.content -%] > <div class="page-section"> > [%- block.content | $raw -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 4a0d749579..773f8a099f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -547,7 +547,7 @@ > [% END # /WRAPPER tab_panels %] > [% END # /WRAPPER tabs %] > >- [%- SET StaffListsHome = AdditionalContents.get( location => "StaffListsHome", lang => lang, library => logged_in_user.branchcode ) -%] >+ [%- SET StaffListsHome = AdditionalContents.get( location => "StaffListsHome", lang => lang, library => Branches.GetLoggedInBranchcode ) -%] > [%- FOREACH block IN StaffListsHome.content -%] > <div class="page-section"> > [%- block.content | $raw -%] >-- >2.39.2
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 36083
:
170612
|
170615
|
170616
|
170617
|
170618
|
171798
|
171799
|
171800
|
171801