detail.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /* @var $model yii\debug\models\Router */
  3. use \yii\helpers\Html;
  4. ?>
  5. <h1>
  6. Router
  7. <small>
  8. <?= Yii::$app->i18n->format('{rulesTested, plural, =0{} =1{tested # rule} other{tested # rules}} {hasMatch, plural, =0{} other{before match}}', [
  9. 'rulesTested' => $model->count,
  10. 'hasMatch' => (int)$model->hasMatch,
  11. ], 'en_US'); ?>
  12. </small>
  13. </h1>
  14. <?php if ($model->message !== null): ?>
  15. <div class="alert alert-info">
  16. <?= Html::encode($model->message); ?>
  17. </div>
  18. <?php endif; ?>
  19. <?php if ($model->logs !== []): ?>
  20. <table class="table table-striped table-bordered">
  21. <thead>
  22. <tr>
  23. <th>#</th>
  24. <th>Rule</th>
  25. <th>Parent</th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. <?php foreach ($model->logs as $i => $log): ?>
  30. <tr<?= $log['match'] ? ' class="success"' : '' ?>>
  31. <td><?= $i + 1; ?></td>
  32. <td><?= Html::encode($log['rule']); ?></td>
  33. <td><?= Html::encode($log['parent']); ?></td>
  34. </tr>
  35. <?php endforeach; ?>
  36. </tbody>
  37. </table>
  38. <?php endif; ?>