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

(-)a/koha-tmpl/opac-tmpl/prog/en/includes/opac-topissues.inc (-1 / +1 lines)
Lines 17-23 Link Here
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="">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/opac/opac-topissues.pl (-2 / +5 lines)
Lines 59-68 my ($template, $borrowernumber, $cookie) Link Here
59
				});
59
				});
60
my $dbh = C4::Context->dbh;
60
my $dbh = C4::Context->dbh;
61
# Displaying results
61
# Displaying results
62
my $do_it = $input->param('do_it') || 0; # as form been posted
62
my $limit = $input->param('limit');
63
my $limit = $input->param('limit');
63
$limit = 10 unless ($limit && $limit =~ /^\d+$/); # control user input for SQL query
64
$limit = 10 unless ($limit && $limit =~ /^\d+$/); # control user input for SQL query
64
$limit = 100 if $limit > 100;
65
$limit = 100 if $limit > 100;
65
my $branch = $input->param('branch') || '';
66
my $branch = $input->param('branch') || '';
67
if (!$do_it && C4::Context->userenv && C4::Context->userenv->{'branch'} ) {
68
    $branch = C4::Context->userenv->{'branch'}; # select user branch by default
69
}
66
my $itemtype = $input->param('itemtype') || '';
70
my $itemtype = $input->param('itemtype') || '';
67
my $timeLimit = $input->param('timeLimit') || 3;
71
my $timeLimit = $input->param('timeLimit') || 3;
68
my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes');
72
my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes');
Lines 138-144 $template->param(do_it => 1, Link Here
138
                results_loop => \@results,
142
                results_loop => \@results,
139
                );
143
                );
140
144
141
$template->param( branchloop => GetBranchesLoop(C4::Context->userenv?C4::Context->userenv->{'branch'}:''));
145
$template->param( branchloop => GetBranchesLoop($branch));
142
146
143
# the index parameter is different for item-level itemtypes
147
# the index parameter is different for item-level itemtypes
144
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
148
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype';
145
- 

Return to bug 10588