<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ChapterController
 *
 * @author yzxh24
 */
class ChaptersController extends BackendController
{
    /**
     * 面包屑导航
     * @var array
     */
    public $breadcrumbs = array('小说列表'=>array('/admin/book/list'));
    
    /**
     * action路径前缀
     */
	protected $actionPrefix = 'admin.controllers.Chapters.';

    /**
     * action对应表
     */
    protected $actionMap = array(
        'list' => 'ListAction',
        'alist' => 'AlistAction',
        'update' => 'UpdateAction',
        'delete' => 'DeleteAction',
        'delall' => 'DelallAction',
        'create' => 'CreateAction',
        'sort' => 'SortAction',
        'html' => 'HtmlAction',
        'createbytime' => 'CreateByTimeAction',
        'createbyid' => 'CreateByIdAction',
    );
    
	/**
	 * Performs the AJAX validation.
	 * @param CModel the model to be validated
	 */
	public function performAjaxValidation($model)
	{
		if(isset($_POST['ajax']) && $_POST['ajax'] === 'nav-page-form')
		{
			echo CActiveForm::validate($model);
			Yii::app()->end();
		}
	}
}
