<?php

use app\models\Contacts;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\grid\ActionColumn;
use yii\grid\GridView;

/** @var yii\web\View $this */
/** @var app\models\ContactsSearch $searchModel */
/** @var yii\data\ActiveDataProvider $dataProvider */

$this->title = 'Contacts';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="contacts-index">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('Create Contacts', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            //'id',
            //'deleted',
            //'date_entered',
            //'date_modified',
            //'modified_user_id',
            //'assigned_user_id',
            //'created_by',
            //'salutation',
            'first_name',
            'last_name',
            //'first_name_furigana',
            //'last_name_furigana',
            //'lead_source',
            //'lead_source_description',
            //'title',
            //'department',
            //'reports_to_id',
            //'commission_company_id',
            //'birthdate',
            //'do_not_call',
            //'phone_home',
            //'phone_mobile',
            //'phone_work',
            //'phone_other',
            //'phone_fax',
            //'email1:email',
            //'email2:email',
            //'assistant',
            //'assistant_phone',
            //'email_opt_out:email',
            //'primary_address_street',
            //'primary_address_city',
            //'primary_address_state',
            //'primary_address_postalcode',
            //'primary_address_country',
            //'primary_address_kana',
            //'alt_address_street',
            //'alt_address_city',
            //'alt_address_state',
            //'alt_address_postalcode',
            //'alt_address_country',
            //'alt_address_kana',
            //'description:ntext',
            //'portal_name',
            //'portal_active',
            //'portal_app',
            //'invalid_email:email',
            //'smsgroup',
            //'contact_status',
            //'picture_filename',
            //'picture_file_mime_type',
            //'school_id',
            //'vacation_total',
            //'vacation_used',
            //'is_available_strict',
            //'major',
            //'send_document_home',
            //'send_document_work',
            //'company_name',
            //'idnumber',
            //'nationality',
            //'gender',
            //'work_school',
            //'last_school_name',
            //'last_school_dept',
            //'study_aim',
            //'transport_fee_type',
            //'transportfee',
            //'incometax_rate',
            //'leave_date',
            //'enroll_date',
            //'grade',
            //'grade_entered',
            //'grade_entrance_date',
            //'application_date',
            //'extra_date',
            //'id_card_field1:ntext',
            //'id_card_field2',
            //'id_card_field3',
            //'id_card_field4:ntext',
            //'renmei_label:ntext',
            //'card_id',
            //'nyutai_mail_notice',
            //'account_id',
            //'phone_mobile_cleaned',
            //'phone_home_cleaned',
            //'phone_work_cleaned',
            //'phone_other_cleaned',
            //'bank_payment_type',
            //'bank_code',
            //'bank_branch_code',
            //'bank_name',
            //'bank_branch_name',
            //'bank_account_type',
            //'bank_account_no',
            //'bank_account_name',
            //'zaigaku1',
            //'zaigaku2',
            //'zaigaku3',
            //'shiboukou1',
            //'shiboukou2',
            //'shiboukou3',
            //'eiken',
            //'bank_customer_no',
            //'age_range',
            //'hogosha_name',
            //'hogosha_relation',
            //'member_status',
            //'original_school_id',
            //'transfer_date',
            //'transferred_school_id',
            //'application_type',
            //'application_info',
            //'newspaper',
            //'occupation',
            //'transportation',
            //'target_device',
            //'own_device_pc',
            //'own_device_tablet',
            //'own_device_phone',
            //'internet',
            //'skill_level',
            //'trial_date',
            //'reply_due_date',
            //'not_enroll_reason',
            //'enroll_type',
            //'campaign',
            //'pair_enroll',
            //'gold_member',
            //'ipad_rental',
            //'bank_type',
            //'bank_registration_type',
            //'bank_registration_date',
            //'leave_reason',
            //'payment_type',
            //'registration_date',
            //'planned_date',
            //'monthly_total_time',
            //'daily_total_time',
            //'bank_account_name_kanji',
            //'premium_id',
            //'cancel_date',
            //'actual_start_date',
            //'continue_date',
            //'return_date',
            //'restart_date',
            //'single_date',
            //'honnin',
            //'salary_type',
            //'salary_amount',
            //'contract_days',
            //'contract_hours',
            //'social_insurance',
            //'benefit_amount',
            //'bank_transfer_start',
            //'member_type',
            //'restart_registration_date',
            [
                'class' => ActionColumn::className(),
                'urlCreator' => function ($action, Contacts $model, $key, $index, $column) {
                    return Url::toRoute([$action, 'id' => $model->id]);
                 }
            ],
        ],
    ]); ?>


</div>
