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

(-)a/koha-tmpl/opac-tmpl/prog/en/includes/opac-topissues.inc (-2 / +2 lines)
Lines 15-23 Link Here
15
				<li>
15
				<li>
16
               <label for="branch">From: </label>
16
               <label for="branch">From: </label>
17
                <select name="branch" id="branch" style="width: 10em;">
17
                <select name="branch" id="branch" style="width: 10em;">
18
                <option value="">All libraries</option>
18
                <option value="__ANY__">All libraries</option>
19
                [% FOREACH branchloo IN branchloop %]
19
                [% FOREACH branchloo IN branchloop %]
20
                    [% IF ( branch == branchname ) %]<option value="[% branchloo.value %]" selected="selected">[% ELSE %]<option value="[% branchloo.value %]">[% END %]
20
                    [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% ELSE %]<option value="[% branchloo.value %]">[% END %]
21
                        [% branchloo.branchname %]
21
                        [% branchloo.branchname %]
22
                    </option>
22
                    </option>
23
                [% END %]
23
                [% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-topissues.tt (-1 / +1 lines)
Lines 100-106 function Dopop(link) { Link Here
100
				<li>
100
				<li>
101
               <label for="branch">From: </label>
101
               <label for="branch">From: </label>
102
                <select name="branch" id="branch">
102
                <select name="branch" id="branch">
103
                <option value="">All libraries</option>
103
                <option value="__ANY__">All libraries</option>
104
                [% FOREACH branchloo IN branchloop %]
104
                [% FOREACH branchloo IN branchloop %]
105
                    [% IF ( branchloo.selected ) %]
105
                    [% IF ( branchloo.selected ) %]
106
                        <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
106
                        <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
(-)a/opac/opac-topissues.pl (-3 / +5 lines)
Lines 62-68 my $dbh = C4::Context->dbh; Link Here
62
my $limit = $input->param('limit');
62
my $limit = $input->param('limit');
63
$limit = 10 unless ($limit && $limit =~ /^\d+$/); # control user input for SQL query
63
$limit = 10 unless ($limit && $limit =~ /^\d+$/); # control user input for SQL query
64
$limit = 100 if $limit > 100;
64
$limit = 100 if $limit > 100;
65
my $branch = $input->param('branch') || '';
65
my $branch_input = $input->param('branch') || '';
66
my $branch = $branch_input eq '__ANY__' ? '' : $branch_input ; # __ANY__ is used to distinguish form display and no branch filter selected
66
my $itemtype = $input->param('itemtype') || '';
67
my $itemtype = $input->param('itemtype') || '';
67
my $timeLimit = $input->param('timeLimit') || 3;
68
my $timeLimit = $input->param('timeLimit') || 3;
68
my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes');
69
my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes');
Lines 138-144 $template->param(do_it => 1, Link Here
138
                results_loop => \@results,
139
                results_loop => \@results,
139
                );
140
                );
140
141
141
$template->param( branchloop => GetBranchesLoop(C4::Context->userenv?C4::Context->userenv->{'branch'}:''));
142
# GetBranchesLoop without parameter will select user default branch
143
my $branchloop = $branch_input ? GetBranchesLoop($branch_input) : GetBranchesLoop();
144
$template->param( branchloop => $branchloop );
142
145
143
# the index parameter is different for item-level itemtypes
146
# the index parameter is different for item-level itemtypes
144
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
147
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
145
- 

Return to bug 10588