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

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 222-227 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
222
('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'),
222
('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'),
223
('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''),
223
('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''),
224
('NewsAuthorDisplay','none','none|opac|staff|both','Display the author name for news items.','Choice'),
224
('NewsAuthorDisplay','none','none|opac|staff|both','Display the author name for news items.','Choice'),
225
('NewsArchiveEnabled','0',NULL,'Enables users to view expired news items.','YesNo'),
225
('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'),
226
('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'),
226
('noItemTypeImages','0',NULL,'If ON, disables item-type images','YesNo'),
227
('noItemTypeImages','0',NULL,'If ON, disables item-type images','YesNo'),
227
('NoLoginInstructions', '', '60|10', 'Instructions to display on the OPAC login form when a patron is not logged in', 'Textarea'),
228
('NoLoginInstructions', '', '60|10', 'Instructions to display on the OPAC login form when a patron is not logged in', 'Textarea'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref (+8 lines)
Lines 21-23 Tools: Link Here
21
                  staff: "Staff client only"
21
                  staff: "Staff client only"
22
                  both: "Both OPAC and staff client"
22
                  both: "Both OPAC and staff client"
23
            -
23
            -
24
        -
25
            -
26
            - pref: NewsArchiveEnabled
27
              choices:
28
                  yes: "Enable"
29
                  no: "Disable"
30
            - the news archive for expired items.
31
        -
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (+3 lines)
Lines 53-58 Link Here
53
                [% SET branchcode = Branches.GetLoggedInBranchcode() %]
53
                [% SET branchcode = Branches.GetLoggedInBranchcode() %]
54
                <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode %]"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png"></a>
54
                <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode %]"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png"></a>
55
                RSS feed for [% IF ( loggedinusername ) %][% Branches.GetName( branchcode ) %] <i>and</i> [% END %] system-wide library news.
55
                RSS feed for [% IF ( loggedinusername ) %][% Branches.GetName( branchcode ) %] <i>and</i> [% END %] system-wide library news.
56
57
                [% IF ( Koha.Preference( 'NewsArchiveEnabled' ) ) %]
58
                <a href="/cgi-bin/koha/opac-main.pl?news_id=all" style="float: right">Archived news</a>[% END %]
56
            </div>
59
            </div>
57
        [% END %]
60
        [% END %]
58
61
(-)a/opac/opac-main.pl (-3 / +7 lines)
Lines 55-62 if (C4::Context->userenv) { Link Here
55
my $news_id = $input->param('news_id');
55
my $news_id = $input->param('news_id');
56
my ($all_koha_news, $koha_news_count);
56
my ($all_koha_news, $koha_news_count);
57
if (defined $news_id && length $news_id) {
57
if (defined $news_id && length $news_id) {
58
    $all_koha_news = [ get_opac_new($news_id) ];
58
    if ($news_id eq 'all' && C4::Context->preference('NewsArchiveEnabled')) {
59
    $koha_news_count = 1;
59
        $all_koha_news = get_opac_news(undef, $news_lang, $homebranch);
60
        $koha_news_count = scalar @$all_koha_news;
61
    } else {
62
        $all_koha_news = [ get_opac_new($news_id) ];
63
        $koha_news_count = 1;
64
    }
60
} else {
65
} else {
61
    $all_koha_news = GetNewsToDisplay($news_lang, $homebranch);
66
    $all_koha_news = GetNewsToDisplay($news_lang, $homebranch);
62
    $koha_news_count = scalar @$all_koha_news;
67
    $koha_news_count = scalar @$all_koha_news;
63
- 

Return to bug 15385