make mail notification header color themable

This commit is contained in:
Jan-Christoph Borchardt 2014-03-03 12:43:22 +01:00
parent eac9eebfdb
commit b8d0fc9494
2 changed files with 16 additions and 2 deletions

View File

@ -2,8 +2,8 @@
<tr><td>
<table cellspacing="0" cellpadding="0" border="0" width="600px">
<tr>
<td bgcolor="#1d2d44" width="20px">&nbsp;</td>
<td bgcolor="#1d2d44">
<td bgcolor="<?php print_unescaped($theme->getMailHeaderColor());?>" width="20px">&nbsp;</td>
<td bgcolor="<?php print_unescaped($theme->getMailHeaderColor());?>">
<img src="<?php print_unescaped(OC_Helper::makeURLAbsolute(image_path('', 'logo-mail.gif'))); ?>" alt="<?php p($theme->getName()); ?>"/>
</td>
</tr>

View File

@ -21,6 +21,7 @@ class OC_Defaults {
private $defaultDocBaseUrl;
private $defaultSlogan;
private $defaultLogoClaim;
private $defaultMailHeaderColor;
function __construct() {
$this->l = OC_L10N::get('core');
@ -33,6 +34,7 @@ class OC_Defaults {
$this->defaultDocBaseUrl = "http://doc.owncloud.org";
$this->defaultSlogan = $this->l->t("web services under your control");
$this->defaultLogoClaim = "";
$this->defaultMailHeaderColor = "#1d2d44"; /* header color of mail notifications */
if (class_exists("OC_Theme")) {
$this->theme = new OC_Theme();
@ -181,4 +183,16 @@ class OC_Defaults {
return $this->getDocBaseUrl() . '/server/6.0/go.php?to=' . $key;
}
/**
* Returns mail header color
* @return mail header color
*/
public function getMailHeaderColor() {
if ($this->themeExist('getMailHeaderColor')) {
return $this->theme->getMailHeaderColor();
} else {
return $this->defaultMailHeaderColor;
}
}
}