Changeset 2383 for branches/2.0
- Timestamp:
- 03/30/10 12:02:44 (14 years ago)
- Location:
- branches/2.0/phpgwapi
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/phpgwapi/inc/class.common.inc.php
r1414 r2383 1243 1243 * @author Dave Hall (*based* on verdilak? css inclusion code) 1244 1244 */ 1245 function get_css( )1245 function get_css( ) 1246 1246 { 1247 1247 $tpl = createObject('phpgwapi.Template', $this->get_tpl_dir('phpgwapi')); … … 1265 1265 1266 1266 // search for app specific css file 1267 if(@isset($GLOBALS['phpgw_info']['flags']['currentapp'])) 1268 { 1269 $appname = $GLOBALS['phpgw_info']['flags']['currentapp']; 1270 1271 if(file_exists(PHPGW_SERVER_ROOT . SEP . $appname . SEP 1272 . 'templates' . SEP . $GLOBALS['phpgw_info']['server']['template_set'] 1273 . SEP . 'app.css') 1274 ) 1275 { 1276 $tpl->set_var('css_file', '<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'] 1277 . "/$appname/templates/".$GLOBALS['phpgw_info']['server']['template_set'] 1278 . "/app.css".'" type=text/css rel=StyleSheet>'); 1279 } 1280 elseif(file_exists(PHPGW_SERVER_ROOT . SEP . $appname . SEP 1281 . 'templates' . SEP . 'default' 1282 . SEP . 'app.css') 1283 ) 1284 { 1285 $tpl->set_var('css_file', '<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'] 1286 ."/$appname/templates/default/app.css".'" type=text/css rel=StyleSheet>'); 1287 } 1288 } 1289 1290 return $tpl->subst('css'); 1267 if ( @ isset( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ] ) ) 1268 { 1269 $css = "/%s/templates/%s/%s.css"; 1270 1271 global $path, $link, $template; 1272 1273 $path = PHPGW_SERVER_ROOT . str_replace( '/', SEP, $css ); 1274 1275 $link = '<LINK href="%s" type="text/css" rel="StyleSheet">'; 1276 $link = sprintf( $link, 1277 "{$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ]}{$css}" 1278 ); 1279 1280 $template = $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ]; 1281 1282 function _css( $module, $css ) 1283 { 1284 global $link, $path, $template; 1285 1286 if ( file_exists( sprintf( $path, $module, $template, str_replace( '/', SEP, $css ) ) ) ) 1287 return sprintf( $link, $module, $template, $css ); 1288 1289 if ( file_exists( sprintf( $path, $module, 'default', str_replace( '/', SEP, $css ) ) ) ) 1290 return sprintf( $link, $module, 'default', $css ); 1291 1292 return ''; 1293 } 1294 1295 $css = _css( 'phpgwapi', 'css/base' ); 1296 $css .= _css( 'phpgwapi', "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" ); 1297 $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" ); 1298 $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], 'app' ); 1299 1300 if ( $css ) 1301 $tpl -> set_var( 'css_file', $css ); 1302 } 1303 1304 return $tpl -> subst('css'); 1291 1305 } 1292 1306 -
branches/2.0/phpgwapi/templates/classic/head.tpl
r1151 r2383 13 13 <link rel="icon" href="{img_icon}" type="image/x-ico" /> 14 14 <link rel="shortcut icon" href="{img_shortcut}" /> 15 <link href="{theme_css}" title="eGroupWareStyle" type="text/css" rel="StyleSheet"/>16 15 <META http-equiv="Default-Style" content="eGroupWareStyle"> 17 16 {slider_effects} -
branches/2.0/phpgwapi/templates/default/head.inc.php
r890 r2383 33 33 34 34 #_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']); 35 $theme_css = ".".$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';36 if(!file_exists($theme_css))37 {38 $theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';39 }40 35 41 36 //pngfix defaults to yes … … 94 89 'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app, 95 90 'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(), 96 'theme_css' => $theme_css,97 91 'css' => $GLOBALS['phpgw']->common->get_css(), 98 92 'java_script' => $GLOBALS['phpgw']->common->get_java_script(), -
branches/2.0/phpgwapi/templates/default/head.tpl
r1247 r2383 13 13 <link rel="icon" href="{img_icon}" type="image/x-ico" /> 14 14 <link rel="shortcut icon" href="{img_shortcut}" /> 15 <link href="{theme_css}" title="eGroupWareStyle" type="text/css" rel="StyleSheet"/>16 15 <META http-equiv="Default-Style" content="eGroupWareStyle"> 17 16 {slider_effects}
Note: See TracChangeset
for help on using the changeset viewer.