11 Yii::import(
'zii.widgets.grid.CButtonColumn');
46 if ($this->viewButtonIcon !==
false && !isset($this->buttons[
'view'][
'icon'])) {
49 if ($this->updateButtonIcon !==
false && !isset($this->buttons[
'update'][
'icon'])) {
52 if ($this->deleteButtonIcon !==
false && !isset($this->buttons[
'delete'][
'icon'])) {
69 if (isset($button[
'visible']) && !$this->evaluateExpression(
71 array(
'row' => $row,
'data' =>
$data)
77 $label = isset($button[
'label']) ? $button[
'label'] : $id;
78 $url = isset($button[
'url']) ? $this->evaluateExpression($button[
'url'], array(
'data' =>
$data,
'row' => $row))
80 $options = isset($button[
'options']) ? $button[
'options'] : array();
82 if (!isset($options[
'title'])) {
83 $options[
'title'] =
$label;
86 if (!isset($options[
'data-toggle'])) {
87 $options[
'data-toggle'] =
'tooltip';
90 if (isset($button[
'icon']) && $button[
'icon']) {
91 if (strpos($button[
'icon'],
'icon') ===
false && strpos($button[
'icon'],
'fa') ===
false) {
92 $button[
'icon'] =
'glyphicon glyphicon-' . implode(
'glyphicon-', explode(
' ', $button[
'icon']));
95 echo CHtml::link(
'<i class="' . $button[
'icon'] .
'"></i>',
$url, $options);
96 }
else if (isset($button[
'imageUrl']) && is_string($button[
'imageUrl'])) {
97 echo CHtml::link(CHtml::image($button[
'imageUrl'],
$label),
$url, $options);