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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-2 / +3 lines)
Lines 114-121 YAHOO.util.Event.onContentReady("header_search", function() { Link Here
114
</div>
114
</div>
115
<script type="text/javascript">//<![CDATA[
115
<script type="text/javascript">//<![CDATA[
116
$(document).ready(function() {
116
$(document).ready(function() {
117
	$("#filters").toggle();
117
    <!-- TMPL_IF NAME="advsearch" -->$("#filteraction_on").toggle();
118
	$("#filteraction_off").toggle();
118
    <!-- TMPL_ELSE -->$("#filters").toggle();
119
    $("#filteraction_off").toggle();<!-- /TMPL_IF -->
119
});
120
});
120
//]]>
121
//]]>
121
</script>
122
</script>
(-)a/members/member.pl (-17 / +17 lines)
Lines 49-59 my $theme = $input->param('theme') || "default"; Link Here
49
49
50
my $patron = $input->Vars;
50
my $patron = $input->Vars;
51
foreach (keys %$patron){
51
foreach (keys %$patron){
52
	delete $$patron{$_} unless($$patron{$_}); 
52
	delete $$patron{$_} unless($$patron{$_});
53
}
53
}
54
55
my @categories=C4::Category->all;
54
my @categories=C4::Category->all;
56
my $branches=(defined $$patron{branchcode}?GetBranchesLoop($$patron{branchcode}):GetBranchesLoop());
55
56
my $branches = GetBranches;
57
my @branchloop;
58
59
foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
60
  my $selected = 1 if $branches->{$_}->{branchcode} eq $$patron{branchcode};
61
  my %row = ( value => $_,
62
        selected => $selected,
63
        branchname => $branches->{$_}->{branchname},
64
      );
65
  push @branchloop, \%row;
66
}
57
67
58
my %categories_dislay;
68
my %categories_dislay;
59
69
Lines 119-129 foreach my $borrower(@$results[$from..$to-1]){ Link Here
119
  push(@resultsdata, \%row);
129
  push(@resultsdata, \%row);
120
}
130
}
121
131
122
if ($$patron{branchcode}){
123
	foreach my $branch (grep{$_->{value} eq $$patron{branchcode}}@$branches){
124
		$$branch{selected}=1;
125
	}
126
}
127
if ($$patron{categorycode}){
132
if ($$patron{categorycode}){
128
	foreach my $category (grep{$_->{categorycode} eq $$patron{categorycode}}@categories){
133
	foreach my $category (grep{$_->{categorycode} eq $$patron{categorycode}}@categories){
129
		$$category{selected}=1;
134
		$$category{selected}=1;
Lines 142-150 my $base_url = Link Here
142
  );
147
  );
143
148
144
my @letters = map { {letter => $_} } ( 'A' .. 'Z');
149
my @letters = map { {letter => $_} } ( 'A' .. 'Z');
145
$template->param( letters => \@letters );
146
150
147
$template->param(
151
$template->param(
152
    letters => \@letters,
148
    paginationbar => pagination_bar(
153
    paginationbar => pagination_bar(
149
        $base_url,
154
        $base_url,
150
        int( $count / $resultsperpage ) + ($count % $resultsperpage ? 1 : 0),
155
        int( $count / $resultsperpage ) + ($count % $resultsperpage ? 1 : 0),
Lines 154-168 $template->param( Link Here
154
    from      => ($startfrom-1)*$resultsperpage+1,  
159
    from      => ($startfrom-1)*$resultsperpage+1,  
155
    to        => $to,
160
    to        => $to,
156
    multipage => ($count != $to+1 || $startfrom!=1),
161
    multipage => ($count != $to+1 || $startfrom!=1),
157
);
162
    advsearch => ($$patron{categorycode} || $$patron{branchcode}),
158
$template->param(
163
    branchloop=>\@branchloop,
159
    branchloop=>$branches,
160
    categories=>\@categories,
164
    categories=>\@categories,
161
);
165
    searching       => "1",
162
163
164
$template->param( 
165
        searching       => "1",
166
		actionname		=>basename($0),
166
		actionname		=>basename($0),
167
		%$patron,
167
		%$patron,
168
        numresults      => $count,
168
        numresults      => $count,
(-)a/members/members-home.pl (-2 / +13 lines)
Lines 51-59 if($quicksearch){ Link Here
51
                 debug => 1,
51
                 debug => 1,
52
                 });
52
                 });
53
}
53
}
54
55
my $branches = GetBranches;
56
my @branchloop;
57
foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
58
  my $selected = 1 if $branches->{$_}->{branchcode} eq $branch;
59
  my %row = ( value => $_,
60
        selected => $selected,
61
        branchname => $branches->{$_}->{branchname},
62
      );
63
  push @branchloop, \%row;
64
}
65
54
my @categories=C4::Category->all;
66
my @categories=C4::Category->all;
55
$template->param(
67
$template->param(
56
    branchloop=>(defined $branch?GetBranchesLoop($branch):GetBranchesLoop()),
68
    branchloop=>\@branchloop,
57
	categories=>\@categories,
69
	categories=>\@categories,
58
);
70
);
59
$template->param( 
71
$template->param( 
60
- 

Return to bug 4945