From ffd52356843cd3b7d5375a28e758a53ae6c67f17 Mon Sep 17 00:00:00 2001 From: Luciano Baraglia Date: Wed, 16 Oct 2013 00:01:44 -0300 Subject: [PATCH 1/3] GII create object button style [skip ci] --- framework/yii/gii/generators/crud/templates/views/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/gii/generators/crud/templates/views/index.php b/framework/yii/gii/generators/crud/templates/views/index.php index 1de548a..96f8390 100644 --- a/framework/yii/gii/generators/crud/templates/views/index.php +++ b/framework/yii/gii/generators/crud/templates/views/index.php @@ -33,7 +33,7 @@ $this->params['breadcrumbs'][] = $this->title; indexWidgetType === 'grid' ? ' //' : ''); ?> echo $this->render('_search', array('model' => $searchModel)); ?>

- echo Html::a('Create modelClass); ?>', array('create'), array('class' => 'btn btn-danger')); ?> + echo Html::a('Create modelClass); ?>', array('create'), array('class' => 'btn btn-success')); ?>

indexWidgetType === 'grid'): ?> From 4308e610007295216a8a020d11ed75e822a28c0d Mon Sep 17 00:00:00 2001 From: Luciano Baraglia Date: Wed, 16 Oct 2013 00:06:35 -0300 Subject: [PATCH 2/3] GII update button style --- framework/yii/gii/generators/crud/templates/views/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/gii/generators/crud/templates/views/view.php b/framework/yii/gii/generators/crud/templates/views/view.php index d25a851..4f302ed 100644 --- a/framework/yii/gii/generators/crud/templates/views/view.php +++ b/framework/yii/gii/generators/crud/templates/views/view.php @@ -30,7 +30,7 @@ $this->params['breadcrumbs'][] = $this->title;

echo Html::encode($this->title); ?>

- echo Html::a('Update', array('update', ), array('class' => 'btn btn-danger')); ?> + echo Html::a('Update', array('update', ), array('class' => 'btn btn-primary')); ?> echo Html::a('Delete', array('delete', ), array( 'class' => 'btn btn-danger', 'data-confirm' => Yii::t('app', 'Are you sure to delete this item?'), From af966d529a7d7b869ac7b99303c60376a6bf3167 Mon Sep 17 00:00:00 2001 From: egorpromo Date: Wed, 16 Oct 2013 22:09:03 +0700 Subject: [PATCH 3/3] I add new line in methods that render code in the head and for body --- framework/yii/base/View.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/yii/base/View.php b/framework/yii/base/View.php index df0b2b2..b3f2bfa 100644 --- a/framework/yii/base/View.php +++ b/framework/yii/base/View.php @@ -730,7 +730,7 @@ class View extends Component if (!empty($this->js[self::POS_HEAD])) { $lines[] = Html::script(implode("\n", $this->js[self::POS_HEAD]), array('type' => 'text/javascript')); } - return empty($lines) ? '' : implode("\n", $lines) . "\n"; + return empty($lines) ? '' : "\n" . implode("\n", $lines) . "\n"; } /** @@ -747,7 +747,7 @@ class View extends Component if (!empty($this->js[self::POS_BEGIN])) { $lines[] = Html::script(implode("\n", $this->js[self::POS_BEGIN]), array('type' => 'text/javascript')); } - return empty($lines) ? '' : implode("\n", $lines) . "\n"; + return empty($lines) ? '' : "\n" . implode("\n", $lines) . "\n"; } /** @@ -768,6 +768,6 @@ class View extends Component $js = "jQuery(document).ready(function(){\n" . implode("\n", $this->js[self::POS_READY]) . "\n});"; $lines[] = Html::script($js, array('type' => 'text/javascript')); } - return empty($lines) ? '' : implode("\n", $lines) . "\n"; + return empty($lines) ? '' : "\n" . implode("\n", $lines) . "\n"; } }