|
Lines 79-85
function Blur$function_name(subfield_managed) {
Link Here
|
| 79 |
|
79 |
|
| 80 |
function Clic$function_name(subfield_managed) { |
80 |
function Clic$function_name(subfield_managed) { |
| 81 |
defaultvalue=escape(document.getElementById(\"$field_number\").value); |
81 |
defaultvalue=escape(document.getElementById(\"$field_number\").value); |
| 82 |
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&index=\"+subfield_managed,\"unimarc 225a\",'width=500,height=600,toolbar=false,scrollbars=yes'); |
82 |
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&index=\"+subfield_managed,\"unimarc_225a\",'width=500,height=600,toolbar=false,scrollbars=yes'); |
| 83 |
} |
83 |
} |
| 84 |
</script> |
84 |
</script> |
| 85 |
"; |
85 |
"; |
|
Lines 101-112
my ($input) = @_;
Link Here
|
| 101 |
my $category = $query->param('category'); |
101 |
my $category = $query->param('category'); |
| 102 |
my $resultstring = $query->param('result'); |
102 |
my $resultstring = $query->param('result'); |
| 103 |
my $dbh = C4::Context->dbh; |
103 |
my $dbh = C4::Context->dbh; |
| 104 |
|
104 |
|
| 105 |
my $startfrom=$query->param('startfrom'); |
105 |
my $startfrom=$query->param('startfrom'); |
| 106 |
$startfrom=0 if(!defined $startfrom); |
106 |
$startfrom=0 if(!defined $startfrom); |
| 107 |
my ($template, $loggedinuser, $cookie); |
107 |
my ($template, $loggedinuser, $cookie); |
| 108 |
my $resultsperpage; |
108 |
my $resultsperpage; |
| 109 |
|
109 |
|
| 110 |
my $authtypes = getauthtypes; |
110 |
my $authtypes = getauthtypes; |
| 111 |
my @authtypesloop; |
111 |
my @authtypesloop; |
| 112 |
foreach my $thisauthtype (keys %$authtypes) { |
112 |
foreach my $thisauthtype (keys %$authtypes) { |
|
Lines 126-138
my ($input) = @_;
Link Here
|
| 126 |
my @operator = $query->param('operator'); |
126 |
my @operator = $query->param('operator'); |
| 127 |
my @value = $query->param('value'); |
127 |
my @value = $query->param('value'); |
| 128 |
my $orderby = $query->param('orderby'); |
128 |
my $orderby = $query->param('orderby'); |
| 129 |
|
129 |
|
| 130 |
$resultsperpage= $query->param('resultsperpage'); |
130 |
$resultsperpage= $query->param('resultsperpage'); |
| 131 |
$resultsperpage = 19 if(!defined $resultsperpage); |
131 |
$resultsperpage = 19 if(!defined $resultsperpage); |
| 132 |
|
132 |
|
| 133 |
# builds tag and subfield arrays |
133 |
# builds tag and subfield arrays |
| 134 |
my @tags; |
134 |
my @tags; |
| 135 |
|
135 |
|
| 136 |
my ($results,$total) = SearchAuthorities( \@tags,\@and_or, |
136 |
my ($results,$total) = SearchAuthorities( \@tags,\@and_or, |
| 137 |
\@excluding, \@operator, \@value, |
137 |
\@excluding, \@operator, \@value, |
| 138 |
$startfrom*$resultsperpage, $resultsperpage,$authtypecode, $orderby); |
138 |
$startfrom*$resultsperpage, $resultsperpage,$authtypecode, $orderby); |
|
Lines 153-168
my ($input) = @_;
Link Here
|
| 153 |
flagsrequired => {editcatalogue => '*'}, |
153 |
flagsrequired => {editcatalogue => '*'}, |
| 154 |
debug => 1, |
154 |
debug => 1, |
| 155 |
}); |
155 |
}); |
| 156 |
|
156 |
|
| 157 |
# multi page display gestion |
157 |
# multi page display gestion |
| 158 |
my $displaynext=0; |
158 |
my $displaynext=0; |
| 159 |
my $displayprev=$startfrom; |
159 |
my $displayprev=$startfrom; |
| 160 |
if(($total - (($startfrom+1)*($resultsperpage))) > 0 ) { |
160 |
if(($total - (($startfrom+1)*($resultsperpage))) > 0 ) { |
| 161 |
$displaynext = 1; |
161 |
$displaynext = 1; |
| 162 |
} |
162 |
} |
| 163 |
|
163 |
|
| 164 |
my @numbers = (); |
164 |
my @numbers = (); |
| 165 |
|
165 |
|
| 166 |
if ($total>$resultsperpage) { |
166 |
if ($total>$resultsperpage) { |
| 167 |
for (my $i=1; $i<$total/$resultsperpage+1; $i++) { |
167 |
for (my $i=1; $i<$total/$resultsperpage+1; $i++) { |
| 168 |
if ($i<16) { |
168 |
if ($i<16) { |
|
Lines 174-183
my ($input) = @_;
Link Here
|
| 174 |
} |
174 |
} |
| 175 |
} |
175 |
} |
| 176 |
} |
176 |
} |
| 177 |
|
177 |
|
| 178 |
my $from = $startfrom*$resultsperpage+1; |
178 |
my $from = $startfrom*$resultsperpage+1; |
| 179 |
my $to; |
179 |
my $to; |
| 180 |
|
180 |
|
| 181 |
if($total < (($startfrom+1)*$resultsperpage)) { |
181 |
if($total < (($startfrom+1)*$resultsperpage)) { |
| 182 |
$to = $total; |
182 |
$to = $total; |
| 183 |
} else { |
183 |
} else { |
|
Lines 215-229
my ($input) = @_;
Link Here
|
| 215 |
flagsrequired => {editcatalogue => '*'}, |
215 |
flagsrequired => {editcatalogue => '*'}, |
| 216 |
debug => 1, |
216 |
debug => 1, |
| 217 |
}); |
217 |
}); |
| 218 |
|
218 |
|
| 219 |
$template->param(index => $index, |
219 |
$template->param(index => $index, |
| 220 |
resultstring => $resultstring |
220 |
resultstring => $resultstring |
| 221 |
); |
221 |
); |
| 222 |
} |
222 |
} |
| 223 |
|
223 |
|
| 224 |
$template->param(authtypesloop => \@authtypesloop); |
224 |
$template->param(authtypesloop => \@authtypesloop); |
| 225 |
$template->param(category => $category); |
225 |
$template->param(category => $category); |
| 226 |
|
226 |
|
| 227 |
# Print the page |
227 |
# Print the page |
| 228 |
output_html_with_http_headers $query, $cookie, $template->output; |
228 |
output_html_with_http_headers $query, $cookie, $template->output; |
| 229 |
} |
229 |
} |