Example #1
0
<?php

use yii\helpers\Html;
use yii\helpers\Url;
use app\modules\job\helpers\ImageHelper;
?>

<div class="media">
    <a href="<?php 
echo Url::to(['/job/frontend/account/public-profile', 'display_name' => $model->user->display_name]);
?>
" class="pull-left">
        <?php 
echo ImageHelper::getAvatar($model->user->primaryKey, ImageHelper::IMAGE, false, 48, ['class' => 'media-object']);
?>
    </a>
    <div class="media-body">
        <h5 class="media-heading">
            <?php 
echo Html::a($model->user->display_name, ['/job/frontend/account/public-profile', 'display_name' => $model->user->display_name]);
?>
 <small><?php 
echo Yii::$app->formatter->asDatetime($model->created_at->sec);
?>
</small>
        </h5>
        <p><?php 
echo $model->content;
?>
</p>
    </div>
Example #2
0
use yii\helpers\Html;
use yii\helpers\Url;
use yii\bootstrap\ActiveForm;
use app\modules\job\helpers\ImageHelper;
?>

<?php 
$form = ActiveForm::begin(['id' => 'message-form']);
?>
<div class="media">
    <a href="<?php 
echo Url::to(['/job/frontend/account/public-profile', 'display_name' => Yii::$app->user->identity->display_name]);
?>
" class="pull-left">
        <?php 
echo ImageHelper::getAvatar(Yii::$app->user->id, ImageHelper::IMAGE, false, 48, ['class' => 'media-object']);
?>
    </a>
    <div class="media-body">
        <?php 
echo $form->field($modelReply, 'content')->widget(letyii\tinymce\Tinymce::className(), ['options' => ['style' => 'height: 400px;'], 'configs' => ['setup' => new \yii\web\JsExpression('function(editor) { editor.on("change", function() { tinymce.triggerSave(); }); }'), 'height' => 150, 'plugins' => 'moxiemanager advlist autolink lists link image charmap print preview hr anchor pagebreak ' . 'searchreplace wordcount visualblocks visualchars code fullscreen ' . 'insertdatetime media nonbreaking save table contextmenu directionality ' . 'emoticons template paste textcolor colorpicker textpattern', 'toolbar1' => 'insertfile undo redo | styleselect | fontselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image', 'toolbar2' => 'print preview media | forecolor backcolor emoticons', 'moxiemanager_image_settings' => ['moxiemanager_title' => 'Images', 'moxiemanager_extensions' => 'jpg,png,gif', 'moxiemanager_rootpath' => '/uploads/files', 'moxiemanager_view' => 'thumbs'], 'external_plugins' => ['moxiemanager' => Url::base() . '/plugins/moxiemanager/plugin.min.js']]])->label(false);
?>
    </div>
</div>

<button id="message-form-submit" type="submit" class="button button-primary button-lg"><?php 
echo Yii::t('common', 'Send');
?>
</button>

<?php