Ejemplo n.º 1
0
 /**
  * Renders the header cell content.
  * This method will render a link that can trigger the sorting if the column is sortable.
  */
 protected function renderHeaderCellContent()
 {
     if ($this->grid->enableSorting && $this->sortable && $this->name !== null) {
         echo $this->grid->dataProvider->getSort()->link($this->name, $this->header);
     } else {
         parent::renderHeaderCellContent();
     }
 }
Ejemplo n.º 2
0
 /**
  * Renders the header cell content.
  * This method will render a link that can trigger the sorting if the column is sortable.
  */
 protected function renderHeaderCellContent()
 {
     if ($this->grid->enableSorting && $this->sortable && $this->name !== null) {
         echo $this->grid->dataProvider->getSort()->link($this->name, $this->header, array('class' => 'sort-link'));
     } elseif ($this->name !== null && $this->header === null) {
         if ($this->grid->dataProvider instanceof CActiveDataProvider) {
             echo CHtml::encode($this->grid->dataProvider->model->getAttributeLabel($this->name));
         } else {
             echo CHtml::encode($this->name);
         }
     } else {
         parent::renderHeaderCellContent();
     }
 }
Ejemplo n.º 3
0
 /**
  * Renders the header cell content.
  * This method will render a checkbox in the header when {@link CGridView::selectableRows} is greater than 1.
  */
 protected function renderHeaderCellContent()
 {
     if ($this->grid->selectableRows > 1) {
         echo CHtml::checkBox($this->id . '_all', false);
     } else {
         parent::renderHeaderCellContent();
     }
 }
 /**
  * Render header cell (can not be sortable)
  */
 protected function renderHeaderCellContent()
 {
     if ($this->name !== null && $this->header === null) {
         if ($this->grid->dataProvider instanceof CActiveDataProvider) {
             echo CHtml::encode($this->grid->dataProvider->model->getAttributeLabel($this->name));
         } else {
             echo CHtml::encode($this->name);
         }
     } else {
         parent::renderHeaderCellContent();
     }
 }
Ejemplo n.º 5
0
 /**
  * Renders the header cell content.
  * This method will render a checkbox in the header when {@link selectableRows} is greater than 1
  * or in case {@link selectableRows} is null when {@link CGridView::selectableRows} is greater than 1.
  */
 protected function renderHeaderCellContent()
 {
     if (trim($this->headerTemplate) === '') {
         echo $this->grid->blankDisplay;
         return;
     }
     $item = '';
     if ($this->selectableRows === null && $this->grid->selectableRows > 1) {
         $item = CHtml::checkBox($this->id . '_all', false, array('class' => 'select-on-check-all'));
     } elseif ($this->selectableRows > 1) {
         $item = CHtml::checkBox($this->id . '_all', false);
     } else {
         ob_start();
         parent::renderHeaderCellContent();
         $item = ob_get_clean();
     }
     echo strtr($this->headerTemplate, array('{item}' => $item));
 }
Ejemplo n.º 6
0
 /**
  * Renders the header cell content.
  * This method will render a checkbox in the header when {@link selectableRows} is greater than 1
  * or in case {@link selectableRows} is null when {@link CGridView::selectableRows} is greater than 1.
  */
 protected function renderHeaderCellContent()
 {
     if ($this->selectableRows === null && $this->grid->selectableRows > 1) {
         echo CHtml::checkBox($this->id . '_all', false, array('class' => 'select-on-check-all'));
     } else {
         if ($this->selectableRows > 1) {
             echo CHtml::checkBox($this->id . '_all', false);
         } else {
             parent::renderHeaderCellContent();
         }
     }
 }
Ejemplo n.º 7
0
 protected function renderHeaderCellContent()
 {
     CGridColumn::renderHeaderCellContent();
 }