Merge pull request #7500 from owncloud/theme-mailtemplate
Enable theming of the mail template header
This commit is contained in:
commit
7983c90fdc
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.2 KiB |
|
@ -2,15 +2,15 @@
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="600px">
|
<table cellspacing="0" cellpadding="0" border="0" width="600px">
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#1d2d44" width="20px"> </td>
|
<td bgcolor="<?php print_unescaped($theme->getMailHeaderColor());?>" width="20px"> </td>
|
||||||
<td bgcolor="#1d2d44">
|
<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()); ?>"/>
|
<img src="<?php print_unescaped(OC_Helper::makeURLAbsolute(image_path('', 'logo-mail.gif'))); ?>" alt="<?php p($theme->getName()); ?>"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td bgcolor="#f8f8f8" colspan="2"> </td></tr>
|
<tr><td colspan="2"> </td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#f8f8f8" width="20px"> </td>
|
<td width="20px"> </td>
|
||||||
<td bgcolor="#f8f8f8" style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">
|
<td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">
|
||||||
<?php
|
<?php
|
||||||
print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared <strong>%s</strong> with you.<br><a href="%s">View it!</a><br><br>', array($_['user_displayname'], $_['filename'], $_['link'])));
|
print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared <strong>%s</strong> with you.<br><a href="%s">View it!</a><br><br>', array($_['user_displayname'], $_['filename'], $_['link'])));
|
||||||
if ( isset($_['expiration']) ) {
|
if ( isset($_['expiration']) ) {
|
||||||
|
@ -21,17 +21,17 @@ p($l->t('Cheers!'));
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td bgcolor="#f8f8f8" colspan="2"> </td></tr>
|
<tr><td colspan="2"> </td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#f8f8f8" width="20px"> </td>
|
<td width="20px"> </td>
|
||||||
<td bgcolor="#f8f8f8" style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br>
|
<td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br>
|
||||||
<?php p($theme->getName()); ?> -
|
<?php p($theme->getName()); ?> -
|
||||||
<?php p($theme->getSlogan()); ?>
|
<?php p($theme->getSlogan()); ?>
|
||||||
<br><a href="<?php print_unescaped($theme->getBaseUrl()); ?>"><?php print_unescaped($theme->getBaseUrl());?></a>
|
<br><a href="<?php print_unescaped($theme->getBaseUrl()); ?>"><?php print_unescaped($theme->getBaseUrl());?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#f8f8f8" colspan="2"> </td>
|
<td colspan="2"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
|
@ -21,6 +21,7 @@ class OC_Defaults {
|
||||||
private $defaultDocBaseUrl;
|
private $defaultDocBaseUrl;
|
||||||
private $defaultSlogan;
|
private $defaultSlogan;
|
||||||
private $defaultLogoClaim;
|
private $defaultLogoClaim;
|
||||||
|
private $defaultMailHeaderColor;
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
$this->l = OC_L10N::get('core');
|
$this->l = OC_L10N::get('core');
|
||||||
|
@ -33,6 +34,7 @@ class OC_Defaults {
|
||||||
$this->defaultDocBaseUrl = "http://doc.owncloud.org";
|
$this->defaultDocBaseUrl = "http://doc.owncloud.org";
|
||||||
$this->defaultSlogan = $this->l->t("web services under your control");
|
$this->defaultSlogan = $this->l->t("web services under your control");
|
||||||
$this->defaultLogoClaim = "";
|
$this->defaultLogoClaim = "";
|
||||||
|
$this->defaultMailHeaderColor = "#1d2d44"; /* header color of mail notifications */
|
||||||
|
|
||||||
if (class_exists("OC_Theme")) {
|
if (class_exists("OC_Theme")) {
|
||||||
$this->theme = new OC_Theme();
|
$this->theme = new OC_Theme();
|
||||||
|
@ -181,4 +183,16 @@ class OC_Defaults {
|
||||||
return $this->getDocBaseUrl() . '/server/6.0/go.php?to=' . $key;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue