Exemple #1
0
<?php 
echo $comment->content;
if (!Yii::$app->user->isGuest && $comment->user->guid == Yii::$app->user->identity->guid) {
    ?>
    &nbsp;
    <?php 
    echo Html::a(Module::t('views/comment', 'Delete'), Url::to(['comment/delete', 'id' => $comment->article->id, 'cid' => $comment->id]), ['data-method' => 'post', 'class' => 'btn btn-danger btn-xs']);
}
if ($comment->children) {
    ?>
    <hr/>
    <div class="row">
        <div class="col-lg-offset-1">
            <?php 
    foreach ($comment->children as $sub) {
        echo ItemWidget::widget(['comment' => $sub]);
    }
    ?>
            <?php 
    if ($newComment) {
        ?>
                <?php 
        echo NewWidget::widget(['comment' => $newComment]);
        ?>
            <?php 
    }
    ?>
        </div>
    </div>
<?php 
}
Exemple #2
0
}
?>
        <hr/>

        <div class="entry-content">
            <p style="font-family: Noto-Serif; font-size: 19px; font-weight: 400"><?php 
echo Html::encode($article->content);
?>
</p>
        </div>
        <?php 
if ($comments = $article->childComments) {
    ?>
            <br/>
            <?php 
    foreach ($comments as $comment) {
        echo ItemWidget::widget(['comment' => $comment]);
    }
    ?>
        <?php 
}
?>
        <hr/>
        <?php 
if ($newComment) {
    ?>
        <?php 
    echo NewWidget::widget(['comment' => $newComment]);
    ?>
        <?php 
}