{include file='index@common/header' /}
<div class="row">
    {notempty name='tag'}
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading" style="overflow:hidden;">
                    标签: <span class="text-danger"><strong>{$tag.tag}</strong></span>
                </div>
                <div class="list-group">
                {php}
                    $lists = $tag -> contents() -> order('id desc') -> paginate(20);
                {/php}
                {foreach name='lists' item='vo'}
                    <a href="{$vo.url}" class="list-group-item"><span class="badge">{$vo.update_time|date='Y-m-d H:i',###}</span>{$vo.shorttitle}</a>
                {/foreach}
                </div>
            </div>
            {$lists -> render()}
        </div>
    {else /}
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading" style="overflow:hidden;">
                    所有标签
                </div>
                <div class="panel-body">
                    {php}
                        $lists = \app\content\model\Tag::order('recommend desc,count desc,id desc')->select();
                    {/php}
                    {foreach name='lists' item='vo'}
                        <a href="{$vo.url}">{$vo.tag}({$vo.count})</a>&nbsp;&nbsp;&nbsp;
                    {/foreach}
                </div>
            </div>
        </div>
    {/notempty}
    <div class="col-md-3">
        {include file='common/side' /}
    </div>
</div>
{include file='index@common/footer' /}