search for app/template specific css.file

put your app specific css in appname/template/default(or templatename)/app.css
This commit is contained in:
Lars Kneschke 2003-10-11 07:58:40 +00:00
parent 03f9118fcb
commit 5fb17b08f6
7 changed files with 28 additions and 0 deletions

View File

@ -1167,6 +1167,28 @@
}
$tpl->set_var('app_css', $app_css);
// search for app specific css file
if(@isset($GLOBALS['phpgw_info']['flags']['currentapp']))
{
$appname = $GLOBALS['phpgw_info']['flags']['currentapp'];
if(file_exists(PHPGW_SERVER_ROOT . SEP . $appname . SEP .
'templates' . SEP . $GLOBALS['phpgw_info']['server']['template_set'] .
SEP . 'app.css'))
{
$tpl->set_var('css_file', '<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url']
."/$appname/templates/".$GLOBALS['phpgw_info']['server']['template_set']
."/app.css".'" type=text/css rel=StyleSheet>');
}
elseif(file_exists(PHPGW_SERVER_ROOT . SEP . $appname . SEP .
'templates' . SEP . 'default' .
SEP . 'app.css'))
{
$tpl->set_var('css_file', '<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url']
."/$appname/templates/default/app.css".'" type=text/css rel=StyleSheet>');
}
}
return $tpl->subst('css');
}
/**

View File

@ -12,3 +12,4 @@
{app_css}
-->
</style>
{css_file}

View File

@ -6,3 +6,4 @@
{app_css}
-->
</style>
{css_file}

View File

@ -12,3 +12,4 @@
{app_css}
-->
</style>
{css_file}

View File

@ -12,3 +12,4 @@
{app_css}
-->
</style>
{css_file}

View File

@ -183,3 +183,4 @@
{app_css}
-->
</style>
{css_file}

View File

@ -12,3 +12,4 @@
{app_css}
-->
</style>
{css_file}