Beispiel #1
0
    ?>
                    <button type="button" class="transparent setAnswer" data-dismiss="alert" aria-label="Close"  data-id="<?php 
    echo $message->id;
    ?>
" data-type="message" data-type="message" data-toggle="tooltip" data-placement="top" title="Ответить">&nbsp;<span class="fa fa-share-square-o" aria-hidden="true"></span></button>
                    <button type="button" class="transparent setQuote" data-dismiss="alert" aria-label="Close"  data-id="<?php 
    echo $message->id;
    ?>
" data-type="message" data-type="message" data-toggle="tooltip" data-placement="top" title="Цитировать"><span class="fa fa-quote-left" aria-hidden="true"></span></button>
                </div>
                <div class="panel-body"><?php 
    echo $message->message;
    ?>
</div>
                <?php 
    PrettyPhoto::widget(['target' => ".pretty", 'pluginOptions' => ['opacity' => 0.6, 'theme' => PrettyPhoto::THEME_DARK_SQUARE, 'social_tools' => true, 'autoplay_slideshow' => false, 'modal' => true]]);
    ?>
            </div>
        <?php 
    $answers = \app\models\ForumMessage::find()->where(['status' => 1, 'post_id' => $post->id, 'answer' => $message->id])->orderBy('id asc')->all();
    foreach ($answers as $answer) {
        $userNameAnswer = app\models\Users::findOne($answer->author)->login;
        ?>
        <div class="media answer" id='message-<?php 
        echo $answer->id;
        ?>
'>
          <div class="media-left">
            <!--<a href="#">-->
              <!--<img class="media-object" data-src="holder.js/64x64" alt="64x64" style="width: 64px; height: 64px;" src="/img/avatars/<?php 
        echo $answer->author;
Beispiel #2
0
    <p>
        <?php 
echo Html::a('Добавить книгу', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['id', 'name', ['attribute' => 'preview', 'format' => 'raw', 'value' => function ($data) {
    return Html::a(Html::img('@web/previews/' . $data['preview'], ['width' => '80px']), '@web/previews/' . $data['preview'], ['rel' => 'prettyPhoto']);
}], ['attribute' => 'author', 'value' => function ($data) {
    $author = $data->author;
    return $author->firstname . ' ' . $author->lastname;
}], 'date:date', 'date_create:date', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update} {delete}', 'headerOptions' => ['class' => 'activity-view-link'], 'contentOptions' => ['class' => 'padding-left-5px'], 'buttons' => ['view' => function ($url, $model, $key) {
    return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', '#', ['class' => 'activity-view-link', 'title' => Yii::t('yii', 'View'), 'data-toggle' => 'modal', 'data-target' => '#activity-modal', 'data-id' => $key, 'data-pjax' => '0']);
}]]]]);
\nirvana\prettyphoto\PrettyPhoto::widget(['target' => "a[rel^='prettyPhoto']", 'pluginOptions' => ['opacity' => 0.6, 'theme' => \nirvana\prettyphoto\PrettyPhoto::THEME_DARK_SQUARE, 'social_tools' => false, 'autoplay_slideshow' => false, 'modal' => true]]);
?>
    <?php 
\yii\bootstrap\Modal::begin(['id' => 'activity-modal', 'header' => '<h4 class="modal-title">Просмотр книги</h4>', 'footer' => '<a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>']);
?>

    <div class="well">


    </div>


    <?php 
\yii\bootstrap\Modal::end();
?>