toolbar.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /* @var $this \yii\web\View */
  3. /* @var $panels \yii\debug\Panel[] */
  4. /* @var $tag string */
  5. /* @var $position string */
  6. use yii\helpers\Url;
  7. use yii\helpers\Html;
  8. $firstPanel = reset($panels);
  9. $url = $firstPanel->getUrl();
  10. ?>
  11. <div id="yii-debug-toolbar" class="yii-debug-toolbar yii-debug-toolbar_position_<?= $position ?>">
  12. <div class="yii-debug-toolbar__bar">
  13. <div class="yii-debug-toolbar__block yii-debug-toolbar__title">
  14. <a href="<?= Url::to(['index']) ?>">
  15. <img width="30" height="30" alt="" src="<?= \yii\debug\Module::getYiiLogo() ?>">
  16. </a>
  17. </div>
  18. <div class="yii-debug-toolbar__block yii-debug-toolbar__ajax" style="display: none">
  19. AJAX <span class="yii-debug-toolbar__label yii-debug-toolbar__ajax_counter">0</span>
  20. <div class="yii-debug-toolbar__ajax_info">
  21. <table>
  22. <thead>
  23. <tr>
  24. <th>Method</th>
  25. <th>Status</th>
  26. <th>URL</th>
  27. <th>Time</th>
  28. <th>Profile</th>
  29. </tr>
  30. </thead>
  31. <tbody class="yii-debug-toolbar__ajax_requests"></tbody>
  32. </table>
  33. </div>
  34. </div>
  35. <?php foreach ($panels as $panel): ?>
  36. <?php if ($panel->hasError()): ?>
  37. <div class="yii-debug-toolbar__block">
  38. <a href="<?= $panel->getUrl() ?>" title="<?= Html::encode($panel->getError()->getMessage()); ?>"><?=Html::encode($panel->getName())?> <span class="yii-debug-toolbar__label yii-debug-toolbar__label_error">error</span></a>
  39. </div>
  40. <?php else: ?>
  41. <?= $panel->getSummary() ?>
  42. <?php endif; ?>
  43. <?php endforeach; ?>
  44. <div class="yii-debug-toolbar__block_last">
  45. </div>
  46. <a class="yii-debug-toolbar__external" href="#" target="_blank">
  47. <span class="yii-debug-toolbar__external-icon"></span>
  48. </a>
  49. <span class="yii-debug-toolbar__toggle">
  50. <span class="yii-debug-toolbar__toggle-icon"></span>
  51. </span>
  52. </div>
  53. <div class="yii-debug-toolbar__view">
  54. <iframe src="about:blank" frameborder="0"></iframe>
  55. </div>
  56. </div>