show.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /*
  3. * This file is part of the Dektrium project.
  4. *
  5. * (c) Dektrium project <http://github.com/dektrium>
  6. *
  7. * For the full copyright and license information, please view the LICENSE.md
  8. * file that was distributed with this source code.
  9. */
  10. use yii\helpers\Html;
  11. /**
  12. * @var \yii\web\View $this
  13. * @var \dektrium\user\models\Profile $profile
  14. */
  15. $this->title = empty($profile->name) ? Html::encode($profile->user->username) : Html::encode($profile->name);
  16. $this->params['breadcrumbs'][] = $this->title;
  17. ?>
  18. <div class="row">
  19. <div class="col-xs-12 col-sm-6 col-md-6">
  20. <div class="row">
  21. <div class="col-sm-6 col-md-4">
  22. </div>
  23. <div class="col-sm-6 col-md-8">
  24. <h4><?= $this->title ?></h4>
  25. <ul style="padding: 0; list-style: none outside none;">
  26. <?php if (!empty($profile->location)): ?>
  27. <li><i class="glyphicon glyphicon-map-marker text-muted"></i> <?= Html::encode($profile->location) ?></li>
  28. <?php endif; ?>
  29. <?php if (!empty($profile->website)): ?>
  30. <li><i class="glyphicon glyphicon-globe text-muted"></i> <?= Html::a(Html::encode($profile->website), Html::encode($profile->website)) ?></li>
  31. <?php endif; ?>
  32. <?php if (!empty($profile->public_email)): ?>
  33. <li><i class="glyphicon glyphicon-envelope text-muted"></i> <?= Html::a(Html::encode($profile->public_email), 'mailto:' . Html::encode($profile->public_email)) ?></li>
  34. <?php endif; ?>
  35. <li><i class="glyphicon glyphicon-time text-muted"></i> <?= Yii::t('user', 'Joined on {0, date}', $profile->user->created_at) ?></li>
  36. </ul>
  37. <?php if (!empty($profile->bio)): ?>
  38. <p><?= Html::encode($profile->bio) ?></p>
  39. <?php endif; ?>
  40. </div>
  41. </div>
  42. </div>
  43. </div>