Blame view

vendor/yiisoft/yii2-debug/views/default/toolbar.php 1.49 KB
abf1649b   andryeyev   Чистая установка ...
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
  <?php
  /* @var $this \yii\web\View */
  /* @var $panels \yii\debug\Panel[] */
  /* @var $tag string */
  /* @var $position string */
  
  use yii\helpers\Url;
  
  $minJs = <<<EOD
  document.getElementById('yii-debug-toolbar').style.display = 'none';
  document.getElementById('yii-debug-toolbar-min').style.display = 'block';
  if (window.localStorage) {
      localStorage.setItem('yii-debug-toolbar', 'minimized');
  }
  EOD;
  
  $maxJs = <<<EOD
  document.getElementById('yii-debug-toolbar-min').style.display = 'none';
  document.getElementById('yii-debug-toolbar').style.display = 'block';
  if (window.localStorage) {
      localStorage.setItem('yii-debug-toolbar', 'maximized');
  }
  EOD;
  
  $firstPanel = reset($panels);
  $url = $firstPanel->getUrl();
  ?>
  <div id="yii-debug-toolbar" class="yii-debug-toolbar-<?= $position ?> hidden-print">
      <div class="yii-debug-toolbar-block title">
          <a href="<?= Url::to(['index']) ?>">
              <img width="29" height="30" alt="" src="<?= \yii\debug\Module::getYiiLogo() ?>">
          </a>
      </div>
  
      <?php foreach ($panels as $panel): ?>
          <?= $panel->getSummary() ?>
      <?php endforeach; ?>
      <span class="yii-debug-toolbar-toggler" onclick="<?= $minJs ?>"></span>
  </div>
  <div id="yii-debug-toolbar-min" class="hidden-print">
      <a href="<?= $url ?>" title="Open Yii Debugger" id="yii-debug-toolbar-logo">
          <img width="29" height="30" alt="" src="<?= \yii\debug\Module::getYiiLogo() ?>">
      </a>
      <span class="yii-debug-toolbar-toggler" onclick="<?= $maxJs ?>"></span>
  </div>