<?php

Yii::import('zii.widgets.grid.CGridView');

class CrmGridView extends CGridView
{

	/**
	 * Renders the table body.
	 */
	public function renderTableBody()
	{
		$data = $this->dataProvider->getData();
		$n = count($data);

		if($n > 0) {
			echo "<tbody>\n";
			for($row = 0; $row < $n; ++$row) {
				$this->renderTableRow($row);
			}
			echo "</tbody>\n";
		} else {
			echo "<tbody class='no-results'>\n";
			echo '<tr class="empty-table"><td colspan="'.count($this->columns).'" class="empty">';
			$this->renderEmptyText();
			echo "</td></tr>\n";
			echo "</tbody>\n";
		}
	}
}