phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/templates/simple head.inc.php


From: Sigurd Nes
Subject: [Phpgroupware-cvs] phpgwapi/templates/simple head.inc.php
Date: Tue, 02 Jan 2007 12:04:30 +0000

CVSROOT:        /sources/phpgwapi
Module name:    phpgwapi
Changes by:     Sigurd Nes <sigurdne>   07/01/02 12:04:30

Modified files:
        templates/simple: head.inc.php 

Log message:
        load multiple css

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/templates/simple/head.inc.php?cvsroot=phpgwapi&r1=1.7&r2=1.8

Patches:
Index: head.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/templates/simple/head.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- head.inc.php        17 Dec 2006 23:46:35 -0000      1.7
+++ head.inc.php        2 Jan 2007 12:04:29 -0000       1.8
@@ -5,7 +5,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgwapi
        * @subpackage gui
-       * @version $Id: head.inc.php,v 1.7 2006/12/17 23:46:35 skwashd Exp $
+       * @version $Id: head.inc.php,v 1.8 2007/01/02 12:04:29 sigurdne Exp $
        */
 
        if ( !isset($GLOBALS['phpgw_info']['server']['site_title']) )
@@ -17,11 +17,42 @@
        $tpl->set_unknowns('remove');
        $tpl->set_file(array('head' => 'head.tpl'));
        $tpl->set_block('head', 'theme_stylesheet', 'theme_stylesheets');
-       $style = 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/phpgwapi/templates/simple/css/simple.css";
+
+       $app = $GLOBALS['phpgw_info']['flags']['currentapp'];
+
+
+       $theme_styles[] = 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/phpgwapi/templates/simple/css/base.css";
+       if(file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/templates/simple/css/' . 
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] . '.css'))
+       {
+               $theme_styles[] = 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/phpgwapi/templates/simple/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
+       }
+       else
+       {
+               $theme_styles[] = 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/phpgwapi/templates/simple/css/simple.css";
+               
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = 'simple';
+       }
+
+       if(file_exists(PHPGW_SERVER_ROOT . 
"/{$app}/templates/base/css/base.css"))
+       {
+               $theme_styles[] = 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/{$app}/templates/base/css/base.css";
+       }
+
+       if(file_exists(PHPGW_SERVER_ROOT . 
"/{$app}/templates/simple/css/base.css"))
+       {
+               $theme_styles[] = 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/{$app}/templates/simple/css/base.css";
+       }
+
+       if(file_exists(PHPGW_SERVER_ROOT . 
"/{$app}/templates/simple/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css"))
+       {
+               $theme_styles[] = 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/{$app}/templates/simple/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
+       }
+
+       foreach ( $theme_styles as $style )
+       {
        $tpl->set_var('theme_style', $style);
        $tpl->parse('theme_stylesheets', 'theme_stylesheet', true);
+       }
 
-       $app = $GLOBALS['phpgw_info']['flags']['currentapp'];
        $app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? 
$GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
 
        $tpl->set_var(array




reply via email to

[Prev in Thread] Current Thread [Next in Thread]