Exemplo n.º 1
0
                    <?php 
    $i = 1;
    foreach ((array) $post_tags as $ptag) {
        ?>
                        <span class="label label-default"><i class="glyphicon glyphicon-tag"></i> <?php 
        echo Html::encode($ptag);
        ?>
</span>
                        <?php 
        if ($i < $tags_len) {
            ?>
&nbsp;&nbsp;<?php 
        }
        ?>
                        <?php 
        $i++;
        ?>
                    <?php 
    }
    ?>
                </p>
            <?php 
}
?>
        </div>
    </articel>
</div>

<?php 
echo Comment::widget(['tableId' => $model->id, 'tableName' => $model->tableName()]);
Exemplo n.º 2
0
if (!empty($model['origin'])) {
    echo " - 来源:" . Html::encode($model['origin']);
}
?>
            -
            <?php 
if (!empty($post['author'])) {
    echo Html::a('<span class="glyphicon glyphicon-user"></span> ' . Html::encode($model['author']), ['/user/view', 'id' => $model['author']]);
} else {
    echo '<span class="glyphicon glyphicon-user"></span> ' . Html::encode($model['username']);
}
?>
            -
            <span title="<?php 
echo Yii::t('app', 'View Count');
?>
"><span class="glyphicon glyphicon-eye-open"></span> <?php 
echo $model['view_count'];
?>
</span>
        </address>
    </header>
    <div class="content-text">
        <?php 
echo HtmlPurifier::process($model['content']);
?>
    </div>
</article>
<?php 
echo \app\widgets\comment\Comment::widget(['tableId' => $model['id'], 'tableName' => '{{%explore_recommend}}']);