@@ -, +, @@ --------- 1) Home -> Tools -> News 2) Change 'Display location' value and click 'Filter'. - Is the 'Display location' value the same now? (no) - Are the correct values displayed? 3) Click 'New entry' - Is it anything other than 'All'? (no, and is this correct?) 4) Click 'Cancel' 5) Click 'Edit' for various news items with different locations. - Does the 'Display location' get proper set? (no) 6) Apply patch 7) Change the 'Display location' value and click 'Filter'. - Does the 'Display location' value stay the same? (this should be correct now) - Are the correct values displayed? 8) Change the 'Display location' value to 'All' and click 'Filter'. - Does everything display? 9) Change the 'Display location' value and click 'Filter'. - Does it match what the filter was? (should match now) - Does the 'Display location' get proper set? (this should be correct now) --- .../prog/en/modules/tools/koha-news.tt | 79 ++++++++++++++------ tools/koha-news.pl | 2 + 2 files changed, 57 insertions(+), 24 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt @@ -61,23 +61,43 @@ Edit News Item[% ELSE %]Add News Item[% END %][% ELSE %]News[% END %] [% UNLESS ( add_form ) %]
- New entry + New entry
[% END %] [% IF ( add_form ) %] + [% IF ( op == 'add' ) %][% default_lang = lang %] + [% ELSE %][% default_lang = new_detail.lang %] + [% END %]
OPAC and Koha news
  1. - +
  2. @@ -115,17 +135,27 @@ Edit News Item[% ELSE %]Add News Item[% END %][% ELSE %]News[% END %] @@ -153,15 +183,16 @@ Edit News Item[% ELSE %]Add News Item[% END %][% ELSE %]News[% END %] - [% IF ( opac_new.lang == 'koha' ) %] - Librarian interface - [% ELSE %] - [% IF ( opac_new.lang == 'slip' ) %] - Slip - [% ELSE %] - OPAC - [% END %] - [% END %] + [% SWITCH opac_new.lang %] + [% CASE "koha" %] + Librarian interface + [% CASE "slip" %] + Slip + [% CASE "" %] + All + [% CASE %] + OPAC ([% opac_new.lang %]) + [% END %] [% opac_new.number %] --- a/tools/koha-news.pl +++ a/tools/koha-news.pl @@ -7,6 +7,7 @@ # Casta�eda, Carlos Sebastian - seba3c@yahoo.com.ar - Physics Library UNLP Argentina # Modified to include news to KOHA intranet - tgarip@neu.edu.tr NEU library -Cyprus # Copyright 2000-2002 Katipo Communications +# Copyright (C) 2013 Mark Tompsett # # Koha is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -118,4 +119,5 @@ else { ); $template->param( $lang => 1 ) if $lang; } +$template->param( lang => $lang ); output_html_with_http_headers $cgi, $cookie, $template->output; --