Пример #1
0
 /**
  * Get the meta data and merge with standard CGridView column elements
  * to create a column array that fits the CGridView columns API
  */
 protected function getCGridViewColumns()
 {
     $columns = parent::getCGridViewColumns();
     if ($this->rowsAreSelectable) {
         $firstColumn = array_shift($columns);
     }
     array_unshift($columns, $this->getCGridViewStarColumn());
     if ($this->rowsAreSelectable) {
         array_unshift($columns, $firstColumn);
     }
     return $columns;
 }
 /**
  * Process input column information to fetch column data
  */
 protected function processColumnInfoToFetchColumnData($columnInformation)
 {
     $columnClassName = Yii::app()->custom->resolveColumnAdapterClassNameForView(get_class($this), $columnInformation);
     if (@class_exists($columnClassName)) {
         $columnAdapter = new $columnClassName($columnInformation['attributeName'], $this, array_slice($columnInformation, 1));
         $column = $columnAdapter->renderGridViewData();
         if (!isset($column['class'])) {
             $column['class'] = 'DataColumn';
         }
     } else {
         $column = parent::processColumnInfoToFetchColumnData($columnInformation);
     }
     return $column;
 }
Пример #3
0
 /**
  * Override to set rowsAreSelectable to false
  * @see ListView::__construct
  */
 public function __construct($controllerId, $moduleId, $modelClassName, $dataProvider, $selectedIds, $gridIdSuffix = null, $gridViewPagerParams = array(), $listAttributesSelector = null)
 {
     parent::__construct($controllerId, $moduleId, $modelClassName, $dataProvider, $selectedIds, $gridIdSuffix, $gridViewPagerParams, $listAttributesSelector);
     $this->rowsAreSelectable = false;
 }
 protected function getCGridViewParams()
 {
     return array_merge(parent::getCGridViewParams(), array('renderSpanOnEmptyText' => false));
 }
Пример #5
0
 protected function getCGridViewParams()
 {
     $gridViewParams = parent::getCGridViewParams();
     $gridViewParams['rowCssClassExpression'] = 'ConversationsListView::resolveRowCssClasses($this, $row, $data)';
     return $gridViewParams;
 }
 protected function getCGridViewLastColumn()
 {
     $cGridViewLastColumn = parent::getCGridViewLastColumn();
     $cGridViewLastColumn['buttons']['update']['url'] = 'Yii::app()->createUrl("' . $this->getGridViewActionRoute('edit') . '", array("id" => $data->id, "type" => $data->type))';
     return $cGridViewLastColumn;
 }
Пример #7
0
 /**
  * Register the additional script for task detail modal
  */
 protected function renderScripts()
 {
     parent::renderScripts();
     TasksUtil::registerTaskModalDetailsScript($this->getGridViewId());
 }
 /**
  * Override to set rows as not being selectable.
  */
 public function __construct($controllerId, $moduleId, $modelClassName, $dataProvider)
 {
     parent::__construct($controllerId, $moduleId, $modelClassName, $dataProvider, array());
     $this->rowsAreSelectable = false;
 }
 /**
  * Get grid params
  * @return array
  */
 protected function getCGridViewParams()
 {
     return array_merge(parent::getCGridViewParams(), array('hideHeader' => true, 'itemsCssClass' => 'items stacked-list', 'renderSpanOnEmptyText' => false));
 }