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 55-61 my $dbh = C4::Context->dbh; Link Here
55
my $limit = $input->param('limit');
55
my $limit = $input->param('limit');
56
$limit = 10 unless ($limit && $limit =~ /^\d+$/); # control user input for SQL query
56
$limit = 10 unless ($limit && $limit =~ /^\d+$/); # control user input for SQL query
57
$limit = 100 if $limit > 100;
57
$limit = 100 if $limit > 100;
58
my $branch = $input->param('branch') || '';
58
my $branch_input = $input->param('branch') || '';
59
my $branch = $branch_input eq '__ANY__' ? '' : $branch_input ; # __ANY__ is used to distinguish form display and no branch filter selected
59
my $itemtype = $input->param('itemtype') || '';
60
my $itemtype = $input->param('itemtype') || '';
60
my $timeLimit = $input->param('timeLimit') || 3;
61
my $timeLimit = $input->param('timeLimit') || 3;
61
my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes');
62
my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes');
Lines 131-137 $template->param(do_it => 1, Link Here
131
                results_loop => \@results,
132
                results_loop => \@results,
132
                );
133
                );
133
134
134
$template->param( branchloop => GetBranchesLoop(C4::Context->userenv?C4::Context->userenv->{'branch'}:''));
135
# GetBranchesLoop without parameter will select user default branch
136
my $branchloop = $branch_input ? GetBranchesLoop($branch_input) : GetBranchesLoop();
137
$template->param( branchloop => $branchloop );
135
138
136
# the index parameter is different for item-level itemtypes
139
# the index parameter is different for item-level itemtypes
137
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
140
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
138
- 

Return to bug 10588