use C4::Debug;
use YAML;
use URI::Escape;
+use C4::Charset;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG);
# not an index scan
else {
$record = $results[ $i - 1 ]->record($j)->raw();
+ warn $results[$i-1]->record($j)->render() ;
# warn "RECORD $j:".$record;
$results_hash->{'RECORDS'}[$j] = $record;
'holdingbranch',
'homebranch',
'issues',
+ 'item',
'itemnumber',
'itype',
'Local-classification',
# loop through all of the records we've retrieved
for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) {
my $marcrecord = MARC::File::USMARC::decode( $marcresults[$i] );
+ SetUTF8Flag($marcrecord);
my $biblionumber;
if(not $scan){
}
# XSLT processing of some stuff
- # FIXME : This needs some work in order to be more flexible : Can not use a result list for intranet different from OPAC
if (C4::Context->preference("XSLTResultsDisplay") && !$scan) {
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display(
$oldbiblio->{biblionumber}, $marcrecord, C4::Context->preference("XSLTResultsDisplay") );
);
}
+=head2 enabled_opac_search_views
+
+%hash = enabled_opac_search_views()
+
+This function returns a hash that contains two flags obtained from the system
+preferences, used to determine whether a particular opac search results view
+is enabled.
+
+=over 2
+
+=item C<Output arg:>
+
+ * $hash{can_view_MARC} is true only if the MARC view is enabled
+ * $hash{can_view_ISBD} is true only if the ISBD view is enabled
+
+=item C<usage in the script:>
+
+=back
+
+$template->param ( C4::Search::enabled_opac_search_views );
+
+=cut
+
+sub enabled_opac_search_views
+{
+ return (
+ can_opac_view_MARC => C4::Context->preference('OPACviewMARC'), # 1 if the opac search allows the MARC view
+ can_opac_view_ISBD => C4::Context->preference('OPACviewISBD'), # 1 if the opac search allows the ISBD view
+ );
+}
+
=head2 z3950_search_args