adding "opacstylesheet" systempreference.
authortipaul <tipaul>
Mon, 3 Jan 2005 10:58:46 +0000 (10:58 +0000)
committertipaul <tipaul>
Mon, 3 Jan 2005 10:58:46 +0000 (10:58 +0000)
if this parameter is defined, the url is used instead of the default one.
So, you can have your own stylesheet somewhere, and use it instead of the official Koha one.

C4/Output.pm
koha-tmpl/opac-tmpl/css/en/includes/opac-top.inc

index 8b6ab14..60d34ff 100644 (file)
@@ -73,7 +73,7 @@ if (!$query){
        }
 
        my ($theme, $lang) = themelanguage($htdocs, $tmplbase, $opac, $query);
-
+       my $opacstylesheet = C4::Context->preference('opacstylesheet');
        my $template = HTML::Template->new(filename      => "$htdocs/$theme/$lang/$tmplbase",
                                   die_on_bad_params => 0,
                                   global_vars       => 1,
@@ -82,6 +82,7 @@ if (!$query){
        $template->param(themelang => ($opac ne 'intranet'? '/opac-tmpl': '/intranet-tmpl') . "/$theme/$lang",
                                                        interface => ($opac ne 'intranet'? '/opac-tmpl': '/intranet-tmpl'),
                                                        theme => $theme,
+                                                       opacstylesheet => $opacstylesheet,
                                                        lang => $lang);
 
         
index 4aec3ba..ab49a48 100644 (file)
@@ -3,7 +3,11 @@
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-       <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang"-->/includes/opac.css" />
+       <!-- TMPL_IF name="opacstylesheet" -->
+               <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="opacstylesheet"-->" />
+       <!-- TMPL_ELSE -->
+               <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang"-->/includes/opac.css" />
+       <!-- /TMPL_IF -->
        <title><!--TMPL_VAR name="LibraryName"--></title>
        <script type="text/javascript" language="javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/basket.js"></script>
        <script language="JavaScript" type="text/javascript">
@@ -19,7 +23,7 @@
        var MSG_NO_RECORD_SELECTED = _("No biblio selected");
        var MSG_NO_RECORD_ADDED = _("No biblio added");
        function Dopop(link) {
-               newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
+               newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
        }
        </script>
 </head>