Merge pull request #880 from djfm/bootstrap
// use automatic path for css in mail template header
This commit is contained in:
+26
-2
@@ -1,11 +1,35 @@
|
|||||||
<?php
|
<?php
|
||||||
if(!function_exists('t'))
|
if(!function_exists('t'))
|
||||||
{
|
{
|
||||||
function t($str)
|
function t($str)
|
||||||
{
|
{
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!function_exists('findRelativePathToAdminDir'))
|
||||||
|
{
|
||||||
|
function findRelativePathToAdminDir($maxDepth=5)
|
||||||
|
{
|
||||||
|
$path = '';
|
||||||
|
for($i=0; $i<$maxDepth; $i++)
|
||||||
|
{
|
||||||
|
foreach(scandir(dirname(__FILE__).'/'.$path) as $dir)
|
||||||
|
{
|
||||||
|
$candidate = $path.$dir.'/';
|
||||||
|
if(is_dir(dirname(__FILE__).'/'.$candidate.'tabs'))
|
||||||
|
{
|
||||||
|
return $candidate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$path .= '../';
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$admin = findRelativePathToAdminDir();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||||
@@ -13,7 +37,7 @@ if(!function_exists('t'))
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<title><?php echo t('Message from {shop_name}'); ?></title>
|
<title><?php echo t('Message from {shop_name}'); ?></title>
|
||||||
<link rel="stylesheet" type="text/css" href="../../../admin-dev/themes/default/css/admin-theme/email.css">
|
<link rel="stylesheet" type="text/css" href="<?php echo $admin ?>themes/default/css/admin-theme/email.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table class="table table-mail">
|
<table class="table table-mail">
|
||||||
|
|||||||
Reference in New Issue
Block a user