summary.php 1.0 KB

12345678910111213141516171819202122232425
  1. <?php
  2. /* @var $this \yii\web\View */
  3. /* @var $panel yii\debug\panels\UserPanel */
  4. ?>
  5. <div class="yii-debug-toolbar__block">
  6. <a href="<?= $panel->getUrl() ?>">
  7. <?php if (!isset($panel->data['id'])): ?>
  8. <span class="yii-debug-toolbar__label">Guest</span>
  9. <?php else: ?>
  10. <?php if (Yii::$app->getUser()->isGuest || $panel->userSwitch->isMainUser()): ?>
  11. User <span
  12. class="yii-debug-toolbar__label yii-debug-toolbar__label_info"><?= $panel->data['id'] ?></span>
  13. <?php else: ?>
  14. User switching <span
  15. class="yii-debug-toolbar__label yii-debug-toolbar__label_warning"><?= $panel->data['id'] ?></span>
  16. <?php endif; ?>
  17. <?php if ($panel->canSwitchUser()): ?>
  18. <span class="yii-debug-toolbar__switch-icon yii-debug-toolbar__userswitch"
  19. id="yii-debug-toolbar__switch-users">
  20. </span>
  21. <?php endif; ?>
  22. <?php endif; ?>
  23. </a>
  24. </div>