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.

71 line
2.2KB

  1. <?php
  2. /* @var $panel yii\debug\panels\AssetPanel */
  3. use yii\helpers\Html;
  4. use yii\helpers\Inflector;
  5. ?>
  6. <h1>Asset Bundles</h1>
  7. <?php if (empty($panel->data)) {
  8. echo '<p>No asset bundle was used.</p>';
  9. return;
  10. } ?>
  11. <div class="table-responsive">
  12. <table class="table table-striped table-bordered">
  13. <caption>
  14. <p>Total <b><?= count($panel->data) ?></b> asset bundles were loaded.</p>
  15. </caption>
  16. <?php
  17. foreach ($panel->data as $name => $bundle) {
  18. ?>
  19. <thead>
  20. <tr>
  21. <td colspan="2"><h3 id="<?= Inflector::camel2id($name) ?>"><?= $name ?></h3></td>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. <tr>
  26. <th>sourcePath</th>
  27. <td><?= Html::encode($bundle['sourcePath'] !== null ? $bundle['sourcePath'] : $bundle['basePath']) ?></td>
  28. </tr>
  29. <?php if ($bundle['basePath'] !== null): ?>
  30. <tr>
  31. <th>basePath</th>
  32. <td><?= Html::encode($bundle['basePath']) ?></td>
  33. </tr>
  34. <?php endif; ?>
  35. <?php if ($bundle['baseUrl'] !== null): ?>
  36. <tr>
  37. <th>baseUrl</th>
  38. <td><?= Html::encode($bundle['baseUrl']) ?></td>
  39. </tr>
  40. <?php endif; ?>
  41. <?php if (!empty($bundle['css'])): ?>
  42. <tr>
  43. <th>css</th>
  44. <td><?= Html::ul($bundle['css'], ['class' => 'assets']) ?></td>
  45. </tr>
  46. <?php endif; ?>
  47. <?php if (!empty($bundle['js'])): ?>
  48. <tr>
  49. <th>js</th>
  50. <td><?= Html::ul($bundle['js'], ['class' => 'assets']) ?></td>
  51. </tr>
  52. <?php endif; ?>
  53. <?php if (!empty($bundle['depends'])): ?>
  54. <tr>
  55. <th>depends</th>
  56. <td><ul class="assets">
  57. <?php foreach ($bundle['depends'] as $depend): ?>
  58. <li><?= Html::a($depend, '#' . Inflector::camel2id($depend)) ?></li>
  59. <?php endforeach; ?>
  60. </ul></td>
  61. </tr>
  62. <?php endif; ?>
  63. </tbody>
  64. <?php
  65. }
  66. ?>
  67. </table>
  68. </div>