Bugzilla – Attachment 113795 Details for
Bug 26630
Allow custom text for each library on the purchase suggestion page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26630: Add OpacSuggestionInstructions options to News
Bug-26630-Add-OpacSuggestionInstructions-options-t.patch (text/plain), 4.41 KB, created by
Lucas Gass (lukeg)
on 2020-11-18 23:50:43 UTC
(
hide
)
Description:
Bug 26630: Add OpacSuggestionInstructions options to News
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2020-11-18 23:50:43 UTC
Size:
4.41 KB
patch
obsolete
>From bf64abe506b8de0d8f07d6a122d2233e525d18c3 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 18 Nov 2020 23:44:43 +0000 >Subject: [PATCH] Bug 26630: Add OpacSuggestionInstructions options to News > >Test plan: >1. Apply patch >2. Go to /cgi-bin/koha/tools/koha-news.pl and create 'New entry' with a dsiplay location of OpacSuggestionInstructions >3. Login to the OPAC and go to the purchase suggestion page (/cgi-bin/koha/opac-suggestions.pl) >4. Your new content should be there. >5. Delete the OpacSuggestionInstructions news entry. >6. Re-load the OPAC purchase suggestion page and the original text will be restored. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt | 2 +- > .../opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 13 +++++++++---- > 2 files changed, 10 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >index 2ad87f82a6..8393dc00b3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >@@ -403,7 +403,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > [% END %] > [% FOREACH lang_lis IN lang_list %] > <optgroup label="[% lang_lis.language | html %]"> >- [% FOREACH location IN [ '', 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions'] %] >+ [% FOREACH location IN [ '', 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacSuggestionInstructions'] %] > [% IF ( location == '' ) %] > [% SET location_lang = lang_lis.language %] > [% location = BLOCK %]OPAC news[% END %] >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 c5d8ef650d..3ed0d03057 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -4,6 +4,8 @@ > [% USE Branches %] > [% USE AuthorisedValues %] > [% USE KohaDates %] >+[% USE KohaNews %] >+[% SET opacsuggestion = KohaNews.get( location => "OpacSuggestioninstructions", lang => lang, library => branchcode ) %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › > [% IF ( op_add ) %]Enter a new purchase suggestion[% END %] >@@ -47,11 +49,14 @@ > <h1 class="TooManySuggestions">You cannot place any more suggestions</h1> > <h2 class="TooManySuggestionsText">You have reached your limit for suggestions you can place at this time ([% Koha.Preference('MaxOpenSuggestions') | html %]). Once the library has processed those suggestions you will be able to place more.</h2> > [% ELSE %] >- <h1>Enter a new purchase suggestion</h1> >- >- <p>Please fill out this form to make a purchase suggestion. You will receive an email when the library processes your suggestion.</p> >- <p>Only certain fields (marked in red) are required, but the more information you enter the easier it will be for the librarians to find the title you're requesting. The "Notes" field can be used to provide any additional information.</p> >+ [% IF ( opacsuggestion ) %] >+ [% PROCESS koha_news_block news => opacsuggestion %] >+ [% ELSE %] >+ <h1>Enter a new purchase suggestion</h1> > >+ <p>Please fill out this form to make a purchase suggestion. You will receive an email when the library processes your suggestion.</p> >+ <p>Only certain fields (marked in red) are required, but the more information you enter the easier it will be for the librarians to find the title you're requesting. The "Notes" field can be used to provide any additional information.</p> >+ [% END %] > [% FOR m IN messages %] > <div class="alert alert-[% m.type | html %]"> > [% SWITCH m.code %] >-- >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 26630
:
113795
|
114740
|
115525