mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-06 16:16:53 +01:00
'summaryTagName' and 'emptyCssClass' options added to CBaseListView
This commit is contained in:
@@ -81,9 +81,10 @@ Version 1.1.15 under development
|
||||
- Enh #3182: Added namespace support for controllers in subdirectories (Ekstazi, samdark)
|
||||
- Enh #3202: Adding support for the `X-HTTP-Method-Override` header in CHttpRequest (pawzar)
|
||||
- Enh #3211: Added support for PHPUnit 3.8+ in the bootstrap (JoelMarcey, samdark)
|
||||
- Enh #3307: Adding attribute localeClass to CApplication (pawzar)
|
||||
- Enh #3222: 'summaryTagName' and 'emptyCssClass' options added to CBaseListView (klimov-paul)
|
||||
- Enh #3228: Added an ability to migrate to the certain time (gorcer, resurtm)
|
||||
- Enh #3277: CHtml::checkBoxList and radioButtonList to take into account closeSingleTag for <br> (hwmaier)
|
||||
- Enh #3307: Adding attribute localeClass to CApplication (pawzar)
|
||||
- Enh #3314: Removed async from special attribute list enabling async=false for scripts (wilwade)
|
||||
- Enh #3324: Added syslog log route (miramir, resurtm)
|
||||
- Chg #3137: Upgraded HTMLPurifier to 4.6.0 (samdark)
|
||||
|
||||
@@ -72,6 +72,11 @@ abstract class CBaseListView extends CWidget
|
||||
* </ul>
|
||||
*/
|
||||
public $summaryText;
|
||||
/**
|
||||
* @var string the HTML tag name for the container of the {@link summaryText} property.
|
||||
* @since 1.1.15
|
||||
*/
|
||||
public $summaryTagName='div';
|
||||
/**
|
||||
* @var string the message to be displayed when {@link dataProvider} does not have any data.
|
||||
*/
|
||||
@@ -80,6 +85,11 @@ abstract class CBaseListView extends CWidget
|
||||
* @var string the HTML tag name for the container of the {@link emptyText} property.
|
||||
*/
|
||||
public $emptyTagName='span';
|
||||
/**
|
||||
* @var string the CSS class name for the container of the {@link emptyText} property. Defaults to 'empty'.
|
||||
* @since 1.1.15
|
||||
*/
|
||||
public $emptyCssClass='empty';
|
||||
/**
|
||||
* @var string the CSS class name for the container of all data item display. Defaults to 'items'.
|
||||
* Note, this property must not contain false, null or empty string values. Otherwise such values may
|
||||
@@ -183,7 +193,7 @@ abstract class CBaseListView extends CWidget
|
||||
public function renderEmptyText()
|
||||
{
|
||||
$emptyText=$this->emptyText===null ? Yii::t('zii','No results found.') : $this->emptyText;
|
||||
echo CHtml::tag($this->emptyTagName, array('class'=>'empty'), $emptyText);
|
||||
echo CHtml::tag($this->emptyTagName, array('class'=>$this->emptyCssClass), $emptyText);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,7 +219,7 @@ abstract class CBaseListView extends CWidget
|
||||
if(($count=$this->dataProvider->getItemCount())<=0)
|
||||
return;
|
||||
|
||||
echo '<div class="'.$this->summaryCssClass.'">';
|
||||
echo CHtml::openTag($this->summaryTagName, array('class'=>$this->summaryCssClass));
|
||||
if($this->enablePagination)
|
||||
{
|
||||
$pagination=$this->dataProvider->getPagination();
|
||||
@@ -243,7 +253,7 @@ abstract class CBaseListView extends CWidget
|
||||
'{pages}'=>1,
|
||||
));
|
||||
}
|
||||
echo '</div>';
|
||||
echo CHtml::closeTag($this->summaryTagName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user