<?php
return array
(
    'list' => array
    (
        'field'      => array
        (
            'name',
            'parent_id',
            'icon_id' => array
            (
                //'show' => '"{icon}" ? "<img src=\'{icon}\' width=\'50\' \/>" : ""',
                'show' => 'Dever::call("cate/icon.show", "{icon_id}")',
            ),
            'sort' => array
            (
                'type' => 'input',
                'tips' => '双击修改排序',
            ),
            'status' => array
            (
                'type' => 'switch',
                'show'  => '{status}',
                'active_value' => 1,
                'inactive_value' => 2,
            ),
            'cdate',
        ),
        'button' => array
        (
            '新增' => 'fastadd',
        ),
        'data_button' => array
        (
            '编辑' => 'fastedit',
        ),
        'search'    => array
        (
            'name' => 'like',
            'parent_id',
            'status',
        ),
    ),
    'update' => array
    (
        'field'    => array
        (
            'name' => array
            (
                'rules' => true,
            ),
            'parent_id' => array
            (
                'type' => 'select',
            ),
            'icon_id' => array
            (
                'type' => 'selector',
                'option'    => 'Dever::url("cate/icon.getList", array("id" => "{icon_id}", "name" => "{name}"))',
                'search' => 'icon_name',
            ),
            'icon_name' => 'hidden',
            #'desc' => 'textarea',
        ),
    ),
);