detail.php 1.83 KB
Newer Older
Mark committed
1 2 3 4 5 6
<?php
use \yii\widgets\ListView;
use yii\widgets\ActiveForm;
use yii\helpers\Html;

$listView = new ListView([
7
        'dataProvider' => $dataProvider,
8
        'itemView' => '_item',
9 10
        'layout' => "{summary}\n{items}\n{pager}\n",
    ]);
Mark committed
11 12 13 14 15 16
$listView->sorter = ['options' => ['class'=>'mail-sorter']];
?>

<h1>Email messages</h1>

<div class="row">
17 18 19 20 21 22
    <div class="col-lg-2">
        <?= Html::button('Form filtering', ['class' => 'btn btn-default', 'onclick'=>'$("#email-form").toggle();']) ?>
    </div>
    <div class="row col-lg-10">
        <?= $listView->renderSorter() ?>
    </div>
Mark committed
23 24 25
</div>

<div id="email-form" style="display: none;">
26 27 28 29 30 31
    <?php $form = ActiveForm::begin([
            'method' => 'get',
            'action' => ['/debug/default/view', 'tag'=>\Yii::$app->request->get('tag'), 'panel'=>'mail'],
    ]); ?>
    <div class="row">
        <?= $form->field($searchModel, 'from', ['options'=>['class'=>'col-lg-6']])->textInput() ?>
Mark committed
32

33
        <?= $form->field($searchModel, 'to', ['options'=>['class'=>'col-lg-6']])->textInput() ?>
Mark committed
34

35
        <?= $form->field($searchModel, 'reply', ['options'=>['class'=>'col-lg-6']])->textInput() ?>
Mark committed
36

37
        <?= $form->field($searchModel, 'cc', ['options'=>['class'=>'col-lg-6']])->textInput() ?>
Mark committed
38

39
        <?= $form->field($searchModel, 'bcc', ['options'=>['class'=>'col-lg-6']])->textInput() ?>
Mark committed
40

41
        <?= $form->field($searchModel, 'charset', ['options'=>['class'=>'col-lg-6']])->textInput() ?>
Mark committed
42

43
        <?= $form->field($searchModel, 'subject', ['options'=>['class'=>'col-lg-6']])->textInput()	?>
Mark committed
44

45
        <?= $form->field($searchModel, 'body', ['options'=>['class'=>'col-lg-6']])->textInput()	?>
Mark committed
46

47 48 49 50
        <div class="form-group col-lg-12">
            <?= Html::submitButton('Filter', ['class' => 'btn btn-success']) ?>
        </div>
    </div>
Mark committed
51

52
    <?php ActiveForm::end(); ?>
Mark committed
53 54 55
</div>

<?= $listView->run() ?>