<commit_before><?php
/**
 * @link    http://hiqdev.com/hipanel
 * @license http://hiqdev.com/hipanel/license
 * @copyright Copyright (c) 2015 HiQDev
 */

namespace hipanel\grid;

use hipanel\helpers\ArrayHelper;
use hiqdev\assets\icheck\iCheckAsset;
use hiqdev\assets\datatables\DataTablesAsset;
use Yii;

/**
 * Class GridView.
 * HiPanel specific GridView.
 */
class GridView extends \hiqdev\higrid\GridView
{
    public $sorter = [
        'class' => '\hipanel\widgets\LinkSorter',
    ];

    /**
     * @inheritdoc
     */
    public $resizableColumns = [
        'resizeFromBody' => false
    ];

    /**
     * @inheritdoc
     */
//    public $tableOptions = [
//        'class' => 'table table-bordered table-hover dataTable'
//    ];

    /**
     * @inheritdoc
     */
    public $options = [
        'class' => 'dataTables_wrapper form-inline',
        'role' => 'grid'
    ];

    /**
     * @inheritdoc
     */
    public $layout = "<div class='row'><div class='col-xs-12'>{sorter}</div></div>{items}\n<div class='row'><div class='col-xs-6'><div class='dataTables_info'>{summary}</div></div>\n<div class='col-xs-6'><div class='dataTables_paginate paging_bootstrap'>{pager}</div></div></div>";

    /**
     * @inheritdoc
     */
    static protected function defaultColumns()
    {
        return [
            'seller_id' => ['class' => 'hipanel\modules\client\grid\SellerColumn'],
            'client_id' => ['class' => 'hipanel\modules\client\grid\ClientColumn'],
            'checkbox' => ['class' => 'hipanel\grid\CheckboxColumn'],
            'seller' => [
                'class' => 'hipanel\modules\client\grid\SellerColumn',
                'attribute' => 'seller_id'
            ],
            'client' => [
                'class' => 'hipanel\modules\client\grid\ClientColumn',
                'attribute' => 'client_id'<commit_msg>Add responsive layout to GridView<commit_after><?php
/**
 * @link    http://hiqdev.com/hipanel
 * @license http://hiqdev.com/hipanel/license
 * @copyright Copyright (c) 2015 HiQDev
 */

namespace hipanel\grid;

use hipanel\helpers\ArrayHelper;
use hiqdev\assets\icheck\iCheckAsset;
use hiqdev\assets\datatables\DataTablesAsset;
use Yii;

/**
 * Class GridView.
 * HiPanel specific GridView.
 */
class GridView extends \hiqdev\higrid\GridView
{
    public $sorter = [
        'class' => '\hipanel\widgets\LinkSorter',
    ];

    /**
     * @inheritdoc
     */
    public $resizableColumns = [
        'resizeFromBody' => false
    ];

    /**
     * @inheritdoc
     */
//    public $tableOptions = [
//        'class' => 'table table-bordered table-hover dataTable'
//    ];

    /**
     * @inheritdoc
     */
    public $options = [
        'class' => 'dataTables_wrapper form-inline',
        'role' => 'grid'
    ];

    /**
     * @inheritdoc
     */
    public $layout = "<div class='row'><div class='col-xs-12'>{sorter}</div></div><div class=\"table-responsive\">{items}</div>\n<div class='row'><div class='col-xs-6'><div class='dataTables_info'>{summary}</div></div>\n<div class='col-xs-6'><div class='dataTables_paginate paging_bootstrap'>{pager}</div></div></div>";

    /**
     * @inheritdoc
     */
    static protected function defaultColumns()
    {
        return [
            'seller_id' => ['class' => 'hipanel\modules\client\grid\SellerColumn'],
            'client_id' => ['class' => 'hipanel\modules\client\grid\ClientColumn'],
            'checkbox' => ['class' => 'hipanel\grid\CheckboxColumn'],
            'seller' => [
                'class' => 'hipanel\modules\client\grid\SellerColumn',
                'attribute' => 'seller_id'
            ],
            'client' => [
                'class' => 'hipanel\modules\client\grid\ClientColumn',
                'attribute' => 'client_id'
{'fraction_non_alphanumeric': 0.1773594909862142, 'fraction_numerical': 0.0042417815482502655, 'mean_word_length': 2.411392405063291, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2843785', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1210, 'n_words': 186}