show.php 2.1 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. <img src="http://gravatar.com/avatar/<?= $profile->gravatar_id ?>?s=230" alt="" class="img-rounded img-responsive" />
  23. </div>
  24. <div class="col-sm-6 col-md-8">
  25. <h4><?= $this->title ?></h4>
  26. <ul style="padding: 0; list-style: none outside none;">
  27. <?php if (!empty($profile->location)): ?>
  28. <li><i class="glyphicon glyphicon-map-marker text-muted"></i> <?= Html::encode($profile->location) ?></li>
  29. <?php endif; ?>
  30. <?php if (!empty($profile->website)): ?>
  31. <li><i class="glyphicon glyphicon-globe text-muted"></i> <?= Html::a(Html::encode($profile->website), Html::encode($profile->website)) ?></li>
  32. <?php endif; ?>
  33. <?php if (!empty($profile->public_email)): ?>
  34. <li><i class="glyphicon glyphicon-envelope text-muted"></i> <?= Html::a(Html::encode($profile->public_email), 'mailto:' . Html::encode($profile->public_email)) ?></li>
  35. <?php endif; ?>
  36. <li><i class="glyphicon glyphicon-time text-muted"></i> <?= Yii::t('user', 'Joined on {0, date}', $profile->user->created_at) ?></li>
  37. </ul>
  38. <?php if (!empty($profile->bio)): ?>
  39. <p><?= Html::encode($profile->bio) ?></p>
  40. <?php endif; ?>
  41. </div>
  42. </div>
  43. </div>
  44. </div>