Koha/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt
Brendan Lawlor ae61b031ae
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

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-09-30 15:23:20 +01:00

65 lines
1.9 KiB
Text

[% USE raw %]
[% USE AdditionalContents %]
[% USE Asset %]
[% USE KohaDates %]
[% USE Branches %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% FILTER collapse %]
[% tx("Serials {biblionumber}", { biblionumber = biblionumber }) | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="ser_serials-home" class="ser">
[% WRAPPER 'header.inc' %]
[% INCLUDE 'serials-search.inc' %]
[% END %]
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Serials</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 order-md-2 order-sm-1">
<main>
[% INCLUDE 'messages.inc' %]
[% INCLUDE 'serials-toolbar.inc' %]
<h1>Serials</h1>
[% INCLUDE 'serials-advsearch.inc' %]
[%- SET StaffSerialsHome = AdditionalContents.get( location => "StaffSerialsHome", lang => lang, library => Branches.GetLoggedInBranchcode ) -%]
[%- FOREACH block IN StaffSerialsHome.content -%]
<div class="page-section">
[%- block.content | $raw -%]
</div>
[%- END -%]
</main>
</div> <!-- /.col-md-10.order-md-2 -->
<div class="col-md-2 order-sm-2 order-md-1">
<aside>
[% INCLUDE 'serials-menu.inc' %]
</aside>
</div> <!-- /.col-md-2.order-md-1 -->
</div> <!-- /.row -->
</div>
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'calendar.inc' %]
[% Asset.js("js/serials-toolbar.js") | $raw %]
<script>
var subscriptionid = "[% subscriptionid | html %]";
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]