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