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 93-98
$template->param(
Link Here
|
93 |
koha_news => $all_koha_news, |
102 |
koha_news => $all_koha_news, |
94 |
koha_news_count => $koha_news_count, |
103 |
koha_news_count => $koha_news_count, |
95 |
branchcode => $homebranch, |
104 |
branchcode => $homebranch, |
|
|
105 |
news_type => $news_type, |
96 |
display_daily_quote => C4::Context->preference('QuoteOfTheDay'), |
106 |
display_daily_quote => C4::Context->preference('QuoteOfTheDay'), |
97 |
daily_quote => $quote, |
107 |
daily_quote => $quote, |
98 |
); |
108 |
); |
99 |
- |
|
|