fix views

This commit is contained in:
Antonio Ramirez
2016-12-11 00:56:05 +01:00
parent 005ab4f1b8
commit 1ebe58d2ce
25 changed files with 238 additions and 302 deletions

View File

@ -1,19 +1,10 @@
<?php
/*
* This file is part of the Dektrium project.
*
* (c) Dektrium project <http://github.com/dektrium>
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
use yii\helpers\Html;
/**
* @var \yii\web\View $this
* @var \dektrium\user\models\Profile $profile
* @var \Da\User\Model\Profile $profile
*/
$this->title = empty($profile->name) ? Html::encode($profile->user->username) : Html::encode($profile->name);
@ -32,15 +23,29 @@ $this->params['breadcrumbs'][] = $this->title;
<h4><?= $this->title ?></h4>
<ul style="padding: 0; list-style: none outside none;">
<?php if (!empty($profile->location)): ?>
<li><i class="glyphicon glyphicon-map-marker text-muted"></i> <?= Html::encode($profile->location) ?></li>
<li>
<i class="glyphicon glyphicon-map-marker text-muted"></i>
<?= Html::encode($profile->location) ?>
</li>
<?php endif; ?>
<?php if (!empty($profile->website)): ?>
<li><i class="glyphicon glyphicon-globe text-muted"></i> <?= Html::a(Html::encode($profile->website), Html::encode($profile->website)) ?></li>
<li>
<i class="glyphicon glyphicon-globe text-muted"></i>
<?= Html::a(Html::encode($profile->website), Html::encode($profile->website)) ?>
</li>
<?php endif; ?>
<?php if (!empty($profile->public_email)): ?>
<li><i class="glyphicon glyphicon-envelope text-muted"></i> <?= Html::a(Html::encode($profile->public_email), 'mailto:' . Html::encode($profile->public_email)) ?></li>
<li>
<i class="glyphicon glyphicon-envelope text-muted"></i>
<?= Html::a(Html::encode($profile->public_email), 'mailto:' .
Html::encode($profile->public_email))
?>
</li>
<?php endif; ?>
<li><i class="glyphicon glyphicon-time text-muted"></i> <?= Yii::t('user', 'Joined on {0, date}', $profile->user->created_at) ?></li>
<li>
<i class="glyphicon glyphicon-time text-muted"></i>
<?= Yii::t('user', 'Joined on {0, date}', $profile->user->created_at) ?>
</li>
</ul>
<?php if (!empty($profile->bio)): ?>
<p><?= Html::encode($profile->bio) ?></p>