|
Lines 1-5
Link Here
|
| 1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
| 2 |
|
2 |
|
|
|
3 |
# Parts Copyright Biblibre 2010 |
| 3 |
# This file is part of Koha. |
4 |
# This file is part of Koha. |
| 4 |
# |
5 |
# |
| 5 |
# Koha is free software; you can redistribute it and/or modify it under the |
6 |
# Koha is free software; you can redistribute it and/or modify it under the |
|
Lines 27-33
use C4::Branch;
Link Here
|
| 27 |
use C4::Category; |
28 |
use C4::Category; |
| 28 |
|
29 |
|
| 29 |
my $query = new CGI; |
30 |
my $query = new CGI; |
| 30 |
my $quicksearch = $query->param('quicksearch'); |
|
|
| 31 |
my $branch = $query->param('branchcode'); |
31 |
my $branch = $query->param('branchcode'); |
| 32 |
my $template_name; |
32 |
my $template_name; |
| 33 |
|
33 |
|
|
Lines 39-45
my ($template, $loggedinuser, $cookie)
Link Here
|
| 39 |
flagsrequired => {borrowers => 1}, |
39 |
flagsrequired => {borrowers => 1}, |
| 40 |
debug => 1, |
40 |
debug => 1, |
| 41 |
}); |
41 |
}); |
| 42 |
} |
|
|
| 43 |
|
42 |
|
| 44 |
my $branches = GetBranches; |
43 |
my $branches = GetBranches; |
| 45 |
my @branchloop; |
44 |
my @branchloop; |
|
Lines 59-74
my $branchloop = (defined $branch?GetBranchesLoop($branch):GetBranchesLoop());
Link Here
|
| 59 |
if(scalar(@$branchloop) < 1){ |
58 |
if(scalar(@$branchloop) < 1){ |
| 60 |
$no_add = 1; |
59 |
$no_add = 1; |
| 61 |
$template->param(no_branches => 1); |
60 |
$template->param(no_branches => 1); |
| 62 |
} else { |
61 |
} |
|
|
62 |
else { |
| 63 |
$template->param(branchloop=>\@$branchloop); |
63 |
$template->param(branchloop=>\@$branchloop); |
| 64 |
} |
64 |
} |
| 65 |
|
65 |
|
| 66 |
@categories=C4::Category->all; |
66 |
@categories=C4::Category->all; |
| 67 |
if(scalar(@categories) < 1){ $no_categories = 1; } |
67 |
if(scalar(@categories) < 1){ |
|
|
68 |
$no_categories = 1; |
| 69 |
} |
| 70 |
|
| 68 |
if($no_categories && C4::Context->preference("AddPatronLists")=~/code/){ |
71 |
if($no_categories && C4::Context->preference("AddPatronLists")=~/code/){ |
| 69 |
$no_add = 1; |
72 |
$no_add = 1; |
| 70 |
$template->param(no_categories => 1); |
73 |
$template->param(no_categories => 1); |
| 71 |
} else { |
74 |
} |
|
|
75 |
else { |
| 72 |
$template->param(categories=>\@categories); |
76 |
$template->param(categories=>\@categories); |
| 73 |
} |
77 |
} |
| 74 |
|
78 |
|