show.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. ?>111111111111111111111
  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. <?= Html::img($profile->getAvatarUrl(230), [
  23. 'class' => 'img-rounded img-responsive',
  24. 'alt' => $profile->user->username,
  25. ]) ?>
  26. </div>
  27. <div class="col-sm-6 col-md-8">
  28. <h4><?= $this->title ?></h4>
  29. <ul style="padding: 0; list-style: none outside none;">
  30. <?php if (!empty($profile->location)): ?>
  31. <li>
  32. <i class="glyphicon glyphicon-map-marker text-muted"></i> <?= Html::encode($profile->location) ?>
  33. </li>
  34. <?php endif; ?>
  35. <?php if (!empty($profile->website)): ?>
  36. <li>
  37. <i class="glyphicon glyphicon-globe text-muted"></i> <?= Html::a(Html::encode($profile->website), Html::encode($profile->website)) ?>
  38. </li>
  39. <?php endif; ?>
  40. <?php if (!empty($profile->public_email)): ?>
  41. <li>
  42. <i class="glyphicon glyphicon-envelope text-muted"></i> <?= Html::a(Html::encode($profile->public_email), 'mailto:' . Html::encode($profile->public_email)) ?>
  43. </li>
  44. <?php endif; ?>
  45. <li>
  46. <i class="glyphicon glyphicon-time text-muted"></i> <?= Yii::t('user', 'Joined on {0, date}', $profile->user->created_at) ?>
  47. </li>
  48. </ul>
  49. <?php if (!empty($profile->bio)): ?>
  50. <p><?= Html::encode($profile->bio) ?></p>
  51. <?php endif; ?>
  52. </div>
  53. </div>
  54. </div>
  55. </div>