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
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');
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");