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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt (-24 / +55 lines)
Lines 62-84 Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> Link Here
62
62
63
[% UNLESS ( add_form ) %]
63
[% UNLESS ( add_form ) %]
64
<div id="toolbar" class="btn-toolbar">
64
<div id="toolbar" class="btn-toolbar">
65
    <a class="btn btn-small" id="newentry" href="/cgi-bin/koha/tools/koha-news.pl?op=add_form"><i class="icon-plus"></i> New entry</a>
65
    <a class="btn btn-small" id="newentry" href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&lang=[% lang %]"><i class="icon-plus"></i> New entry</a>
66
</div>
66
</div>
67
[% END %]
67
[% END %]
68
68
69
[% IF ( add_form ) %]
69
[% IF ( add_form ) %]
70
    [% IF ( op == 'add' ) %][% default_lang = lang %]
71
    [% ELSE %][% default_lang = new_detail.lang %]
72
    [% END %]
70
        <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
73
        <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
71
            <input type="hidden" name="op" value="[% op %]" />
74
            <input type="hidden" name="op" value="[% op %]" />
72
            <input type="hidden" name="id" value="[% id %]" />
75
            <input type="hidden" name="id" value="[% id %]" />
73
			<fieldset class="rows">
76
			<fieldset class="rows">
74
            <legend>OPAC and Koha news</legend>
77
            <legend>OPAC and Koha news</legend>
75
           <ol> <li>
78
           <ol> <li>
76
            <label for="lang">Display location</label>
79
            <label for="lang">([% new_detail.lang %])([% lang %])Display location</label>
77
            <select id="lang" name="lang">
80
            <select id="lang" name="lang">
78
                <option value="koha">Librarian interface</option>
81
                [% IF ( default_lang == "" ) %]
79
                [% IF ( slip ) %]<option value="slip" selected="selected">Slip</option>[% ELSE %]<option value="slip">Slip</option>[% END %]
82
                <option value=""     selected>All</option>
83
                [% ELSE %]
84
                <option value=""             >All</option>
85
                [% END %]
86
                [% IF ( default_lang == "koha" ) %]
87
                <option value="koha" selected>Librarian interface</option>
88
                [% ELSE %]
89
                <option value="koha"         >Librarian interface</option>
90
                [% END %]
91
                [% IF ( default_lang == "slip" ) %]
92
                <option value="slip" selected>Slip</option>
93
                [% ELSE %]
94
                <option value="slip"         >Slip</option>
95
                [% END %]
80
                [% FOREACH lang_lis IN lang_list %]
96
                [% FOREACH lang_lis IN lang_list %]
81
                    [% IF ( lang_lis.selected ) %]<option value="[% lang_lis.language %]" selected="selected">OPAC ([% lang_lis.language %])</option>[% ELSE %]<option value="[% lang_lis.language %]">OPAC ([% lang_lis.language %])</option>[% END %]
97
                [% IF ( lang_lis.language == default_lang ) %]
98
                    <option value="[% lang_lis.language %]" selected>OPAC ([% lang_lis.language %])</option>
99
                [% ELSE %]
100
                    <option value="[% lang_lis.language %]"         >OPAC ([% lang_lis.language %])</option>
101
                [% END %]
82
                [% END %]
102
                [% END %]
83
            </select>
103
            </select>
84
            </li>
104
            </li>
Lines 116-132 Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> Link Here
116
        <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
136
        <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
117
            <label for="lang">Display location:</label>
137
            <label for="lang">Display location:</label>
118
            <select name="lang" id="lang">
138
            <select name="lang" id="lang">
119
            <option value="">All</option>
139
            [% IF ( lang == "" ) %]
120
            <option value="koha">Librarian interface</option>
140
            <option value=""     selected>All</option>
121
	    <option value="slip">Slip</option>
141
            [% ELSE %]
142
            <option value=""             >All</option>
143
            [% END %]
144
            [% IF ( lang == "koha" ) %]
145
            <option value="koha" selected>Librarian interface</option>
146
            [% ELSE %]
147
            <option value="koha"         >Librarian interface</option>
148
            [% END %]
149
            [% IF ( lang == "slip" ) %]
150
            <option value="slip" selected>Slip</option>
151
            [% ELSE %]
152
            <option value="slip"         >Slip</option>
153
            [% END %]
122
                [% FOREACH lang_lis IN lang_list %]
154
                [% FOREACH lang_lis IN lang_list %]
123
                    [% IF ( lang_lis.selected ) %]
155
                [% IF ( lang_lis.language == lang ) %]
124
                        <option value="[% lang_lis.language %]" selected="selected">
156
                    <option value="[% lang_lis.language %]" selected>OPAC ([% lang_lis.language %])</option>
125
                    [% ELSE %]
157
                [% ELSE %]
126
                        <option value="[% lang_lis.language %]">
158
                    <option value="[% lang_lis.language %]">OPAC ([% lang_lis.language %])</option>
127
                    [% END %]
159
                [% END %]
128
                        OPAC ([% lang_lis.language %])
129
                    </option>
130
                [% END %]
160
                [% END %]
131
            </select>
161
            </select>
132
            <input type="submit" class="button" value="Filter" />
162
            <input type="submit" class="button" value="Filter" />
Lines 154-168 Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> Link Here
154
                            <td>
184
                            <td>
155
                                <input type="checkbox" name="ids" value="[% opac_new.idnew %]" />
185
                                <input type="checkbox" name="ids" value="[% opac_new.idnew %]" />
156
                            </td>
186
                            </td>
157
                            <td>[% IF ( opac_new.lang == 'koha' ) %]
187
                            <td>[% SWITCH opac_new.lang %]
158
			            Librarian interface
188
                                [%   CASE "koha" %]
159
                                 [% ELSE %]
189
                                    Librarian interface
160
                                    [% IF ( opac_new.lang == 'slip' ) %]
190
                                [%   CASE "slip" %]
161
				        Slip
191
                                    Slip
162
                                    [% ELSE %]
192
                                [%   CASE "" %]
163
                                        OPAC
193
                                    All
164
				    [% END %]
194
                                [%   CASE %]
165
				 [% END %]
195
                                    OPAC ([% opac_new.lang %])
196
                                [% END %]
166
                             </td>
197
                             </td>
167
198
168
                            <td>[% opac_new.number %]</td>
199
                            <td>[% opac_new.number %]</td>
(-)a/tools/koha-news.pl (-1 / +2 lines)
Lines 7-12 Link Here
7
# Casta�eda, Carlos Sebastian - seba3c@yahoo.com.ar - Physics Library UNLP Argentina
7
# Casta�eda, Carlos Sebastian - seba3c@yahoo.com.ar - Physics Library UNLP Argentina
8
# Modified to include news to KOHA intranet - tgarip@neu.edu.tr NEU library -Cyprus
8
# Modified to include news to KOHA intranet - tgarip@neu.edu.tr NEU library -Cyprus
9
# Copyright 2000-2002 Katipo Communications
9
# Copyright 2000-2002 Katipo Communications
10
# Copyright (C) 2013    Mark Tompsett
10
#
11
#
11
# Koha is free software; you can redistribute it and/or modify it
12
# Koha is free software; you can redistribute it and/or modify it
12
# under the terms of the GNU General Public License as published by
13
# under the terms of the GNU General Public License as published by
Lines 118-121 else { Link Here
118
		);
119
		);
119
    $template->param( $lang => 1 ) if $lang;
120
    $template->param( $lang => 1 ) if $lang;
120
}
121
}
122
$template->param( lang => $lang );
121
output_html_with_http_headers $cgi, $cookie, $template->output;
123
output_html_with_http_headers $cgi, $cookie, $template->output;
122
- 

Return to bug 7567