Blame view

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