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.

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /* @var $caption string */
  3. /* @var $values array */
  4. use yii\helpers\Html;
  5. use yii\helpers\VarDumper;
  6. ?>
  7. <h3><?= $caption ?></h3>
  8. <?php if (empty($values)): ?>
  9. <p>Empty.</p>
  10. <?php else: ?>
  11. <div class="table-responsive">
  12. <table class="table table-condensed table-bordered table-striped table-hover request-table" style="table-layout: fixed;">
  13. <thead>
  14. <tr>
  15. <th>Name</th>
  16. <th>Value</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. <?php foreach ($values as $name => $value): ?>
  21. <tr>
  22. <th><?= Html::encode($name) ?></th>
  23. <td><?= htmlspecialchars(VarDumper::dumpAsString($value), ENT_QUOTES|ENT_SUBSTITUTE, \Yii::$app->charset, true) ?></td>
  24. </tr>
  25. <?php endforeach; ?>
  26. </tbody>
  27. </table>
  28. </div>
  29. <?php endif; ?>