From 2c9a8b910f7e4f9d2ecbf4be1ea64d56797928db Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Tue, 10 Dec 2013 20:42:09 +0100 Subject: [PATCH] make null format look nice by default --- apps/advanced/backend/web/css/site.css | 5 +++++ apps/advanced/frontend/web/css/site.css | 5 +++++ apps/basic/web/css/site.css | 5 +++++ framework/yii/base/Formatter.php | 4 ++-- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/apps/advanced/backend/web/css/site.css b/apps/advanced/backend/web/css/site.css index 6a355bd..2d27436 100644 --- a/apps/advanced/backend/web/css/site.css +++ b/apps/advanced/backend/web/css/site.css @@ -18,6 +18,11 @@ body { padding: 14px 24px; } +.not-set { + color: #c55; + font-style: italic; +} + /* add sorting icons to gridview sort links */ a.asc:after, a.desc:after { position: relative; diff --git a/apps/advanced/frontend/web/css/site.css b/apps/advanced/frontend/web/css/site.css index 6a355bd..2d27436 100644 --- a/apps/advanced/frontend/web/css/site.css +++ b/apps/advanced/frontend/web/css/site.css @@ -18,6 +18,11 @@ body { padding: 14px 24px; } +.not-set { + color: #c55; + font-style: italic; +} + /* add sorting icons to gridview sort links */ a.asc:after, a.desc:after { position: relative; diff --git a/apps/basic/web/css/site.css b/apps/basic/web/css/site.css index 707c66d..d44558d 100644 --- a/apps/basic/web/css/site.css +++ b/apps/basic/web/css/site.css @@ -19,6 +19,11 @@ body { padding: 14px 24px; } +.not-set { + color: #c55; + font-style: italic; +} + /* add sorting icons to gridview sort links */ a.asc:after, a.desc:after { position: relative; diff --git a/framework/yii/base/Formatter.php b/framework/yii/base/Formatter.php index 33a6c16..bfc1e36 100644 --- a/framework/yii/base/Formatter.php +++ b/framework/yii/base/Formatter.php @@ -40,7 +40,7 @@ class Formatter extends Component */ public $datetimeFormat = 'Y/m/d h:i:s A'; /** - * @var string the text to be displayed when formatting a null. Defaults to '(not set)'. + * @var string the text to be displayed when formatting a null. Defaults to '(not set)'. */ public $nullDisplay; /** @@ -69,7 +69,7 @@ class Formatter extends Component $this->booleanFormat = [Yii::t('yii', 'No'), Yii::t('yii', 'Yes')]; } if ($this->nullDisplay === null) { - $this->nullDisplay = Yii::t('yii', '(not set)'); + $this->nullDisplay = '' . Yii::t('yii', '(not set)') . ''; } }