<?php

$this->widget('ext.PlGrid.PlGridView', array(
    'id' => 'queue-addressbook-grid',
    'itemsCssClass' => 'plTable items',
    'dataProvider' => $model->queueAddressbookProvider(),
    'showNavbar' => false,
    'filter' => $model,
    'enableSorting' => true,
    'columns' => array(
        array(
            'id' => 'addressbook',
            'type' => 'raw',
            'header' => __('CALL_GROUP_ADDRESSBOOK'),
            'headerHtmlOptions' => array('data-translation-id' => 'CALL_GROUP_ADDRESSBOOK'),
            'value' => array($this, 'renderAddressbookName')
        ),
        array(
            'id' => 'addressbook_type',
            'type' => 'raw',
            'header' => __('CALL_GROUP_ADDRESSBOOK_TYPE'),
            'headerHtmlOptions' => array('data-translation-id' => 'CALL_GROUP_ADDRESSBOOK_TYPE'),
            'value' => array($this, 'renderAddressbookType')
        ),
        array(
            'id' => 'read',
            'type' => 'raw',
            'value' => array($this, 'renderAddressbookPermissions'),
            'header' => __('CALL_GROUP_USE_ADDRESSBOOK'),
            'headerHtmlOptions' => array('data-translation-id' => 'CALL_GROUP_USE_ADDRESSBOOK'),
            'htmlOptions' => array(
                'data-custom-contexthelp-key' => 'CALLGROUP_ADDRESSBOOK_CONTEXT_HELP'
            )
        )
    ),
        )
);
