From ef33a4b86fffd2bb1fec5b888fa313c2ccf1f05a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 21 Sep 2023 15:17:34 +0000 Subject: [PATCH] Bug 34866: Use template wrapper for breadcrumbs: OPAC part 4 This patch updates several OPAC templates so that they use a new WRAPPER for displaying breadcrumbs. Apply the patch and log in to the OPAC. Test each of the following pages and their variations. Breadcrumbs should look correct, and each link should be correct: - Recent comments - Most popular - Enable "PatronSelfRegistration" and set "PatronSelfRegistrationVerifyByEmail" to "Don't require." - In the OPAC, go to "Register here." Fill out the form and submit your registration. - Check the "Registration complete" page. - Set "PatronSelfRegistrationVerifyByEmail" to "Require" - Submit another registration and check the "Confirm your registration" page. - Visit the registration page passing an invalid token: /cgi-bin/koha/opac-registration-verify.pl?token=foo Check the "Registration invalid" page. - Enable the "ArticleRequests" system preference and log in to the OPAC. - Perform a search which will return results. - Check the search results page - View the detail page for one of the results. - Click "Request article." - Return to the detail page and click "Place hold." - Complete each step of the hold process. - Enable the "OpacAllowSharingPrivateLists" system preference. - Create a private list if necessary. - Click the "Share" link - Locate a serial record and view the detail page. - Click the "More details" link under the "Subscriptions" plan - Enable the system preference "suggestion." - From the logged-in user summary page click "Purchase suggestions" - Click the "New purchase suggestion" link - Enable the "AnonSuggestions" and "OPACViewOthersSuggestions" system preferences and log out of the OPAC. - View the purchase suggestions page. - Enable the "OpacCloud" system preference and go to the "Subject cloud" page. (the feature doesn't need to be configured to test). - Populate the "RestrictedPageTitle" and "RestrictedPageContent" system preferences and navigate directly to /cgi-bin/koha/opac-restrictedpage.pl - Remove the contents of "RestrictedPageTitle" and check the page again. - This patch also updates svc/suggestion.tt but I don't know how to test it! --- .../modules/opac-registration-confirmation.tt | 15 ++---- .../modules/opac-registration-email-sent.tt | 16 +++---- .../en/modules/opac-registration-invalid.tt | 19 ++++---- .../en/modules/opac-request-article.tt | 22 ++++----- .../bootstrap/en/modules/opac-reserve.tt | 16 +++---- .../en/modules/opac-restrictedpage.tt | 17 +++---- .../bootstrap/en/modules/opac-results.tt | 47 +++++++++---------- .../en/modules/opac-serial-issues.tt | 22 ++++----- .../bootstrap/en/modules/opac-shareshelf.tt | 26 ++++------ .../bootstrap/en/modules/opac-showreviews.tt | 16 +++---- .../bootstrap/en/modules/opac-suggestions.tt | 32 +++++++------ .../bootstrap/en/modules/opac-tags_subject.tt | 16 +++---- .../bootstrap/en/modules/opac-topissues.tt | 16 +++---- .../bootstrap/en/modules/svc/suggestion.tt | 16 +++---- 14 files changed, 126 insertions(+), 170 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt index dc5e3a7388..6d904f4f2e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt @@ -13,16 +13,11 @@ [% INCLUDE 'masthead.inc' %]
- + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Registration complete + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt index 295da996aa..abbd92032a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE Koha %] [% USE AdditionalContents %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] @@ -11,16 +12,11 @@ [% INCLUDE 'masthead.inc' %]
- + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Confirm your registration + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-invalid.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-invalid.tt index feede44fcf..3ee11b637c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-invalid.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-invalid.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE Koha %] [% USE AdditionalContents %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] @@ -11,16 +12,14 @@ [% INCLUDE 'masthead.inc' %]
- + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item %] + Register a new account + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Registration invalid + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt index 4ba935bb8d..1b6ef84443 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE Koha %] [% USE Branches %] [% USE ItemTypes %] @@ -17,19 +18,14 @@ [% SET disclaimer = AdditionalContents.get( location => "ArticleRequestsDisclaimerText", lang => lang, library => logged_in_user.branchcode || default_branch ) %]
- + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item %] + Details for: [% biblio.title | html %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Request article + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index 982da83306..da2a1910ed 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE Koha %] [% USE Branches %] [% USE KohaDates %] @@ -14,16 +15,11 @@ [% INCLUDE 'masthead.inc' %]
- + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Placing a hold + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-restrictedpage.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-restrictedpage.tt index b9fc832961..ebb0a37c5f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-restrictedpage.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-restrictedpage.tt @@ -22,18 +22,15 @@ [% INCLUDE 'masthead.inc' %]
- + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index c58dee9e18..39c7621f6e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -34,31 +34,30 @@ [% INCLUDE 'masthead.inc' %]
- + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% IF ( ms_value ) %] + Results of search for '[% ms_value | html %]' + [% ELSE %] + Search results + [% END %] + [% END %] + [% ELSE %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + You did not specify any search criteria + [% END %] + [% END %] + [% END #/ WRAPPER breadcrumbs %] [% UNLESS ( total ) %]
@@ -123,9 +122,9 @@ [% END # / IF searchdesc %]
- [% IF ( DidYouMean ) %] + [% #IF ( DidYouMean ) %]
Not what you expected? Check for suggestions
- [% END %] + [% #END %] [% IF ( koha_spsuggest ) %] Did you mean: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt index 86dd33578c..834214a08f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE Koha %] [% USE AdditionalContents %] [% USE AuthorisedValues %] @@ -19,19 +20,14 @@ [% INCLUDE 'masthead.inc' %]
- + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item %] + Details for [% bibliotitle | html %] + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Issues for a subscription + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt index 5ea99a8915..98e1c39b91 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE Koha %] [% USE AdditionalContents %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] @@ -11,24 +12,17 @@ [% INCLUDE 'bodytag.inc' bodyid='opac-shareshelf' bodyclass='scrollto' %] [% INCLUDE 'masthead.inc' %]
- + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Share a list + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt index e307d688ef..517bcd82b0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE Koha %] [% USE KohaDates %] [% USE AdditionalContents %] @@ -13,16 +14,11 @@ [% INCLUDE 'masthead.inc' %]
- + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Recent comments + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt index da92b75578..ae8b3509d7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -19,21 +19,25 @@ [% INCLUDE 'masthead.inc' %]
- + [% END %] + [% IF ( op_add ) %] + [% WRAPPER breadcrumb_item %] + Purchase suggestions + [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + New purchase suggestion + [% END %] + [% ELSE %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Purchase suggestions + [% END %] + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt index a357a5712f..d241fdb3b1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE Koha %] [% USE AdditionalContents %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] @@ -11,16 +12,11 @@ [% INCLUDE 'masthead.inc' %]
- + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Subject cloud + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt index 602633a9c6..8dbc89ce48 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE Koha %] [% USE Branches %] [% USE AuthorisedValues %] @@ -41,16 +42,11 @@ [% INCLUDE 'masthead.inc' %]
- + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Most popular titles + [% END %] + [% END #/ WRAPPER breadcrumbs %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/svc/suggestion.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/svc/suggestion.tt index aab088ff2d..2c0a7180da 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/svc/suggestion.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/svc/suggestion.tt @@ -1,3 +1,4 @@ +[% USE raw %] [% USE Koha %] [% USE AdditionalContents %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] @@ -12,16 +13,11 @@ [% INCLUDE 'masthead.inc' %]
- + [% WRAPPER breadcrumbs %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Search suggestions + [% END %] + [% END #/ WRAPPER breadcrumbs %]
-- 2.30.2