Bugzilla – Attachment 106899 Details for
Bug 16371
Quote of the Day (QOTD) for the staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16371: Use multi-select on syspref
Bug-16371-Use-multi-select-on-syspref.patch (text/plain), 3.35 KB, created by
Katrin Fischer
on 2020-07-15 06:35:07 UTC
(
hide
)
Description:
Bug 16371: Use multi-select on syspref
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-07-15 06:35:07 UTC
Size:
3.35 KB
patch
obsolete
>From 5ffbe2b28ae57d66a9b63727e5264e967d6e00f9 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@outlook.com> >Date: Tue, 14 Apr 2020 12:51:50 +0300 >Subject: [PATCH] Bug 16371: Use multi-select on syspref > >This patch replaces textbox with multi-select dropdown on >syspref 'QuoteOfTheDay' and changes tests to match this change. > >To test: >1. Check 'OPAC', 'staff client' or both on 'QuoteOfTheDay'. >2. Make sure that quote is displayed on (both) mainpage(s). > >Prove t/db_dependent/Koha/Quotes.t > >Sponsored-by: Koha-Suomi Oy > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 11 +++++------ > t/db_dependent/Koha/Quotes.t | 6 +++--- > 2 files changed, 8 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 55076c7837..6f1b28aadd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -515,13 +515,12 @@ OPAC: > no: Disable > - browsing and paging search results from the OPAC detail page. > - >+ - Show quote of the day in the > - pref: QuoteOfTheDay >- default: >- class: short >- - Quote of the Day display in Koha. >- - Add 'opac' to show in OPAC home page. >- - Add 'intranet' to show in the staff client main page. >- - Example 'opac intranet', displays QOTD in OPAC and the staff client. >+ multiple: >+ intranet: staff client >+ opac: OPAC >+ - main page. > - > - pref: OPACPopupAuthorsSearch > default: 0 >diff --git a/t/db_dependent/Koha/Quotes.t b/t/db_dependent/Koha/Quotes.t >index dd1477ec6b..de8212a9dd 100644 >--- a/t/db_dependent/Koha/Quotes.t >+++ b/t/db_dependent/Koha/Quotes.t >@@ -98,7 +98,7 @@ subtest "get_daily_quote_for_interface" => sub { > timestamp => DateTime::Format::MySQL->format_datetime(dt_from_string), > }; > >- t::lib::Mocks::mock_preference('QuoteOfTheDay', ''); >+ t::lib::Mocks::mock_preference('QuoteOfTheDay', 0); > > ##Set interface and get nothing because syspref is not set. > C4::Context->interface('opac'); >@@ -106,12 +106,12 @@ subtest "get_daily_quote_for_interface" => sub { > ok(not($quote), "'QuoteOfTheDay'-syspref not set so nothing returned"); > > ##Set 'QuoteOfTheDay'-syspref to not include current interface 'opac' >- t::lib::Mocks::mock_preference('QuoteOfTheDay', 'intra commandline sip2 api yo-mama'); >+ t::lib::Mocks::mock_preference('QuoteOfTheDay', 'intranet'); > $quote = Koha::Quote->get_daily_quote_for_interface(id => $quote_1->id); > ok(not($quote), "'QuoteOfTheDay'-syspref doesn't include 'opac'"); > > ##Set 'QuoteOfTheDay'-syspref to include current interface 'opac' >- t::lib::Mocks::mock_preference('QuoteOfTheDay', 'intraopaccommandline'); >+ t::lib::Mocks::mock_preference('QuoteOfTheDay', 'opac,intranet'); > $quote = Koha::Quote->get_daily_quote_for_interface(id => $quote_1->id); > is_deeply($quote, $expected_quote, "Got the expected quote"); > >-- >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 16371
:
102515
|
102516
|
102517
|
102969
|
103019
|
103329
|
103330
|
103331
|
103332
|
103333
|
103334
|
103732
|
103973
|
103974
|
103975
|
103976
|
103977
|
103978
|
103979
|
106818
|
106819
|
106820
|
106858
|
106859
|
106860
|
106861
|
106862
|
106863
|
106864
|
106865
|
106866
|
106867
|
106868
|
106894
|
106895
|
106896
|
106897
|
106898
| 106899 |
106900
|
106901
|
106902
|
106903
|
108097
|
108098
|
108160
|
108163