Bug 9585 - Fix spelling mistake in default tab conditional for opac-detail
[koha.git] / opac / opac-detail.pl
index c4760c0..cc22acc 100755 (executable)
@@ -49,6 +49,7 @@ use MARC::Field;
 use List::MoreUtils qw/any none/;
 use C4::Images;
 use Koha::DateUtils;
+use C4::HTML5Media;
 
 BEGIN {
        if (C4::Context->preference('BakerTaylorEnabled')) {
@@ -528,11 +529,6 @@ for my $itm (@items) {
                 && (not $itemtypes->{$itm->{'itype'}}->{notforloan} )
          && ($itm->{'itemnumber'} ) );
 
-    if ( defined $itm->{'publictype'} ) {
-        # I can't actually find any case in which this is defined. --amoore 2008-12-09
-        $itm->{ $itm->{'publictype'} } = 1;
-    }
-
     # get collection code description, too
     my $ccode = $itm->{'ccode'};
     $itm->{'ccode'} = $collections->{$ccode} if ( defined($collections) && exists( $collections->{$ccode} ) );
@@ -776,6 +772,11 @@ if (C4::Context->preference("OPACLocalCoverImages")){
                $template->param(OPACLocalCoverImages => 1);
 }
 
+# HTML5 Media
+if ( (C4::Context->preference("HTML5MediaEnabled") eq 'both') or (C4::Context->preference("HTML5MediaEnabled") eq 'opac') ) {
+    $template->param( C4::HTML5Media->gethtml5media($record));
+}
+
 my $syndetics_elements;
 
 if ( C4::Context->preference("SyndeticsEnabled") ) {
@@ -989,7 +990,7 @@ my $defaulttab =
     $subscriptionsnumber
         ? 'subscriptions' :
     @serialcollections > 0 
-        ? 'serialcollection' : 'subscription';
+        ? 'serialcollection' : 'subscriptions';
 $template->param('defaulttab' => $defaulttab);
 
 if (C4::Context->preference('OPACLocalCoverImages') == 1) {
@@ -997,6 +998,10 @@ if (C4::Context->preference('OPACLocalCoverImages') == 1) {
     $template->{VARS}->{localimages} = \@images;
 }
 
+$template->{VARS}->{IDreamBooksReviews} = C4::Context->preference('IDreamBooksReviews');
+$template->{VARS}->{IDreamBooksReadometer} = C4::Context->preference('IDreamBooksReadometer');
+$template->{VARS}->{IDreamBooksResults} = C4::Context->preference('IDreamBooksResults');
+
 if (C4::Context->preference('OpacHighlightedWords')) {
     $template->{VARS}->{query_desc} = $query->param('query_desc');
 }