[Pkg-owncloud-commits] [owncloud] 10/134: make mail notification header color themable

David Prévot taffit at moszumanska.debian.org
Fri Apr 18 21:43:55 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit b3c5aaa1cac4edc07cc895fbc2772fa31bf97684
Author: Jan-Christoph Borchardt <hey at jancborchardt.net>
Date:   Mon Mar 3 12:43:22 2014 +0100

    make mail notification header color themable
---
 core/templates/mail.php  |  4 ++--
 lib/private/defaults.php | 14 ++++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/core/templates/mail.php b/core/templates/mail.php
index 80ea3b8..0770946 100644
--- a/core/templates/mail.php
+++ b/core/templates/mail.php
@@ -2,8 +2,8 @@
 <tr><td>
 <table cellspacing="0" cellpadding="0" border="0" width="600px">
 <tr>
-<td bgcolor="#1d2d44" width="20px"> </td>
-<td bgcolor="#1d2d44">
+<td bgcolor="<?php print_unescaped($theme->getMailHeaderColor());?>" width="20px"> </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>
diff --git a/lib/private/defaults.php b/lib/private/defaults.php
index f9e7ce5..a087e43 100644
--- a/lib/private/defaults.php
+++ b/lib/private/defaults.php
@@ -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();
@@ -178,4 +180,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;
+		}
+	}
+
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list