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 528-540 OPAC: Link Here
528
                  no: Disable
528
                  no: Disable
529
            - browsing and paging search results from the OPAC detail page.
529
            - browsing and paging search results from the OPAC detail page.
530
        -
530
        -
531
            - Show quote of the day in the
531
            - pref: QuoteOfTheDay
532
            - pref: QuoteOfTheDay
532
              default:
533
              multiple:
533
              class: short
534
                intranet: staff client
534
            - Quote of the Day display in Koha.
535
                opac: OPAC
535
            - Add 'opac' to show in OPAC home page.
536
            - main page.
536
            - Add 'intranet' to show in the staff client main page.
537
            - Example 'opac intranet', displays QOTD in OPAC and the staff client.
538
        -
537
        -
539
            - pref: OPACPopupAuthorsSearch
538
            - pref: OPACPopupAuthorsSearch
540
              default: 0
539
              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