Lines 61-68
if (defined $input->param('branch') and length $input->param('branch')) {
Link Here
|
61 |
elsif (C4::Context->userenv and defined $input->param('branch') and length $input->param('branch') == 0 ){ |
61 |
elsif (C4::Context->userenv and defined $input->param('branch') and length $input->param('branch') == 0 ){ |
62 |
$homebranch = ""; |
62 |
$homebranch = ""; |
63 |
} |
63 |
} |
64 |
my $all_koha_news = &GetNewsToDisplay($news_lang,$homebranch); |
64 |
|
65 |
my $koha_news_count = scalar @$all_koha_news; |
65 |
my $news_id = $input->param('news_id'); |
|
|
66 |
my ($all_koha_news, $koha_news_count, $news_type); |
67 |
if (defined $news_id && length $news_id) { |
68 |
$all_koha_news = &GetNewsToDisplay($news_lang, $homebranch, undef, $news_id); |
69 |
$koha_news_count = 1; |
70 |
$news_type = 'news_item'; |
71 |
} else { |
72 |
$all_koha_news = &GetNewsToDisplay($news_lang, $homebranch); |
73 |
$koha_news_count = scalar @$all_koha_news; |
74 |
} |
66 |
|
75 |
|
67 |
my $quote = GetDailyQuote(); # other options are to pass in an exact quote id or select a random quote each pass... see perldoc C4::Koha |
76 |
my $quote = GetDailyQuote(); # other options are to pass in an exact quote id or select a random quote each pass... see perldoc C4::Koha |
68 |
|
77 |
|
Lines 86-91
$template->param(
Link Here
|
86 |
koha_news => $all_koha_news, |
95 |
koha_news => $all_koha_news, |
87 |
koha_news_count => $koha_news_count, |
96 |
koha_news_count => $koha_news_count, |
88 |
branchcode => $homebranch, |
97 |
branchcode => $homebranch, |
|
|
98 |
news_type => $news_type, |
89 |
display_daily_quote => C4::Context->preference('QuoteOfTheDay'), |
99 |
display_daily_quote => C4::Context->preference('QuoteOfTheDay'), |
90 |
daily_quote => $quote, |
100 |
daily_quote => $quote, |
91 |
); |
101 |
); |
92 |
- |
|
|