<?php

/**
 * Index
 *
 * @author Arkadiusz Rychlik <a.rychlik at eppe.com.pl>
 */
class Main_Faq_Jqgrid_Admin_Index extends Rtn_JqGrid {

	public $beanName = 'viewfaqqa';
	
	public $actions = array(
		'add' => null,
		'remove' => null,
		'edit' => null,
		'active' => null,
	);
	
	protected function _renderColmodel() {
		if(Faq_Module_Module::getInstance()->groupsEnabled()){
			$columns[] = [
				'name' => 'groupname',
				'label' => __('Group'),
				'stype' => 'select',
				'searchoptions' => [
					'defaultValue' => '',
					'value' => Rtn_Model::getValuesToSelect('faqgroup', 'name', 'name')
				]
			];			
		}
		$columns[] = [
			'name' => 'question',
			'label' => __('Question'),
		];
		$columns[] = [
			'name' => 'answer',
			'label' => __('Answer'),
		];
		return $columns;
	}
	
}
