You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.0KB

  1. <?php
  2. /* @var $panel yii\debug\panels\MailPanel */
  3. /* @var $searchModel yii\debug\models\search\Mail */
  4. /* @var $dataProvider yii\data\ArrayDataProvider */
  5. use \yii\widgets\ListView;
  6. use yii\widgets\ActiveForm;
  7. use yii\helpers\Html;
  8. $listView = new ListView([
  9. 'dataProvider' => $dataProvider,
  10. 'itemView' => '_item',
  11. 'layout' => "{summary}\n{items}\n{pager}\n",
  12. ]);
  13. $listView->sorter = ['options' => ['class' => 'mail-sorter']];
  14. ?>
  15. <h1>Email messages</h1>
  16. <div class="row">
  17. <div class="col-lg-2">
  18. <?= Html::button('Form filtering', ['class' => 'btn btn-default', 'onclick' => 'jQuery("#email-form").toggle();']) ?>
  19. </div>
  20. <div class="row col-lg-10">
  21. <?= $listView->renderSorter() ?>
  22. </div>
  23. </div>
  24. <div id="email-form" style="display: none;">
  25. <?php $form = ActiveForm::begin([
  26. 'method' => 'get',
  27. 'action' => ['/debug/default/view', 'tag' => Yii::$app->request->get('tag'), 'panel' => 'mail'],
  28. ]); ?>
  29. <div class="row">
  30. <?= $form->field($searchModel, 'from', ['options' => ['class' => 'col-lg-6']])->textInput() ?>
  31. <?= $form->field($searchModel, 'to', ['options' => ['class' => 'col-lg-6']])->textInput() ?>
  32. <?= $form->field($searchModel, 'reply', ['options' => ['class' => 'col-lg-6']])->textInput() ?>
  33. <?= $form->field($searchModel, 'cc', ['options' => ['class' => 'col-lg-6']])->textInput() ?>
  34. <?= $form->field($searchModel, 'bcc', ['options' => ['class' => 'col-lg-6']])->textInput() ?>
  35. <?= $form->field($searchModel, 'charset', ['options' => ['class' => 'col-lg-6']])->textInput() ?>
  36. <?= $form->field($searchModel, 'subject', ['options' => ['class' => 'col-lg-6']])->textInput() ?>
  37. <?= $form->field($searchModel, 'body', ['options' => ['class' => 'col-lg-6']])->textInput() ?>
  38. <div class="form-group col-lg-12">
  39. <?= Html::submitButton('Filter', ['class' => 'btn btn-success']) ?>
  40. </div>
  41. </div>
  42. <?php ActiveForm::end(); ?>
  43. </div>
  44. <?= $listView->run() ?>