detail.php 2 KB
Newer Older
Mark committed
1
<?php
2 3 4
/* @var $panel yii\debug\panels\MailPanel */
/* @var $searchModel yii\debug\models\search\Mail */
/* @var $dataProvider yii\data\ArrayDataProvider */
5

Mark committed
6 7 8 9 10
use \yii\widgets\ListView;
use yii\widgets\ActiveForm;
use yii\helpers\Html;

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

<h1>Email messages</h1>

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

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

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

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

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

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

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

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

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

51 52 53 54
        <div class="form-group col-lg-12">
            <?= Html::submitButton('Filter', ['class' => 'btn btn-success']) ?>
        </div>
    </div>
Mark committed
55

56
    <?php ActiveForm::end(); ?>
Mark committed
57 58 59
</div>

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