View | Details | Raw Unified | Return to bug 16371
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-6 / +5 lines)
Lines 515-527 OPAC: Link Here
515
                  no: Disable
515
                  no: Disable
516
            - browsing and paging search results from the OPAC detail page.
516
            - browsing and paging search results from the OPAC detail page.
517
        -
517
        -
518
            - Show quote of the day in the
518
            - pref: QuoteOfTheDay
519
            - pref: QuoteOfTheDay
519
              default:
520
              multiple:
520
              class: short
521
                intranet: staff client
521
            - Quote of the Day display in Koha.
522
                opac: OPAC
522
            - Add 'opac' to show in OPAC home page.
523
            - main page.
523
            - Add 'intranet' to show in the staff client main page.
524
            - Example 'opac intranet', displays QOTD in OPAC and the staff client.
525
        -
524
        -
526
            - pref: OPACPopupAuthorsSearch
525
            - pref: OPACPopupAuthorsSearch
527
              default: 0
526
              default: 0
(-)a/t/db_dependent/Koha/Quotes.t (-4 / +3 lines)
Lines 98-104 subtest "get_daily_quote_for_interface" => sub { Link Here
98
        timestamp   => DateTime::Format::MySQL->format_datetime(dt_from_string),
98
        timestamp   => DateTime::Format::MySQL->format_datetime(dt_from_string),
99
    };
99
    };
100
100
101
    t::lib::Mocks::mock_preference('QuoteOfTheDay', '');
101
    t::lib::Mocks::mock_preference('QuoteOfTheDay', 0);
102
102
103
    ##Set interface and get nothing because syspref is not set.
103
    ##Set interface and get nothing because syspref is not set.
104
    C4::Context->interface('opac');
104
    C4::Context->interface('opac');
Lines 106-117 subtest "get_daily_quote_for_interface" => sub { Link Here
106
    ok(not($quote), "'QuoteOfTheDay'-syspref not set so nothing returned");
106
    ok(not($quote), "'QuoteOfTheDay'-syspref not set so nothing returned");
107
107
108
    ##Set 'QuoteOfTheDay'-syspref to not include current interface 'opac'
108
    ##Set 'QuoteOfTheDay'-syspref to not include current interface 'opac'
109
    t::lib::Mocks::mock_preference('QuoteOfTheDay', 'intra commandline sip2 api yo-mama');
109
    t::lib::Mocks::mock_preference('QuoteOfTheDay', 'intranet');
110
    $quote = Koha::Quote->get_daily_quote_for_interface(id => $quote_1->id);
110
    $quote = Koha::Quote->get_daily_quote_for_interface(id => $quote_1->id);
111
    ok(not($quote), "'QuoteOfTheDay'-syspref doesn't include 'opac'");
111
    ok(not($quote), "'QuoteOfTheDay'-syspref doesn't include 'opac'");
112
112
113
    ##Set 'QuoteOfTheDay'-syspref to include current interface 'opac'
113
    ##Set 'QuoteOfTheDay'-syspref to include current interface 'opac'
114
    t::lib::Mocks::mock_preference('QuoteOfTheDay', 'intraopaccommandline');
114
    t::lib::Mocks::mock_preference('QuoteOfTheDay', 'opac,intranet');
115
    $quote = Koha::Quote->get_daily_quote_for_interface(id => $quote_1->id);
115
    $quote = Koha::Quote->get_daily_quote_for_interface(id => $quote_1->id);
116
    is_deeply($quote, $expected_quote, "Got the expected quote");
116
    is_deeply($quote, $expected_quote, "Got the expected quote");
117
117
118
- 

Return to bug 16371