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

(-)a/Koha/Quote.pm (-2 / +2 lines)
Lines 113-119 sub get_daily_quote { Link Here
113
113
114
Is a wrapper for get_daily_quote(), with an extra check for using the correct
114
Is a wrapper for get_daily_quote(), with an extra check for using the correct
115
interface defined in the syspref 'QuoteOfTheDay'.
115
interface defined in the syspref 'QuoteOfTheDay'.
116
If the current interface is not allowed to display quotes, then returns undef.
116
If the current interface is not allowed to display quotes, then returns nothing.
117
117
118
=cut
118
=cut
119
119
Lines 126-132 sub get_daily_quote_for_interface { Link Here
126
        Koha::Exceptions::UnknownProgramState->throw(error => $cc[3]."()> C4::Context->interface() is not set! Don't know are you in OPAC or staff client?");
126
        Koha::Exceptions::UnknownProgramState->throw(error => $cc[3]."()> C4::Context->interface() is not set! Don't know are you in OPAC or staff client?");
127
    }
127
    }
128
    unless ($qotdPref =~ /$interface/) {
128
    unless ($qotdPref =~ /$interface/) {
129
        return undef;
129
        return;
130
    }
130
    }
131
131
132
    return $self->get_daily_quote(%opts);
132
    return $self->get_daily_quote(%opts);
(-)a/Koha/Quotes.pm (+4 lines)
Lines 41-46 sub _type { Link Here
41
    return 'Quote';
41
    return 'Quote';
42
}
42
}
43
43
44
=head3 object_class
45
46
=cut
47
44
sub object_class {
48
sub object_class {
45
    return 'Koha::Quote';
49
    return 'Koha::Quote';
46
}
50
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +1 lines)
Lines 518-524 OPAC: Link Here
518
            - Show quote of the day in the
518
            - Show quote of the day in the
519
            - pref: QuoteOfTheDay
519
            - pref: QuoteOfTheDay
520
              multiple:
520
              multiple:
521
                intranet: staff client
521
                intranet: staff interface
522
                opac: OPAC
522
                opac: OPAC
523
            - main page.
523
            - main page.
524
        -
524
        -
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-2 / +1 lines)
Lines 38-44 Link Here
38
                    <div id="area-news">
38
                    <div id="area-news">
39
                        <h3>Quote of the Day</h3>
39
                        <h3>Quote of the Day</h3>
40
                        <div class="newsitem">
40
                        <div class="newsitem">
41
                            <span id="daily-quote-text">[% daily_quote.text %]</span><span id="daily-quote-sep"> ~ </span><span id="daily-quote-source">[% daily_quote.source %]</span>
41
                            <span id="daily-quote-text">[% daily_quote.text | html %]</span><span id="daily-quote-sep"> ~ </span><span id="daily-quote-source">[% daily_quote.source | html %]</span>
42
                        </div>
42
                        </div>
43
                    </div>
43
                    </div>
44
                [% END %]
44
                [% END %]
45
- 

Return to bug 16371