{notempty name='forum'}
<a href="{:url('forum/thread/add',['id'=>$forum['id']])}" class="btn btn-lg btn-block btn-danger">发帖</a>
<br>
{/notempty}
<div class="panel panel-default">
{php}
$forums = \app\forum\model\Forum::where(['status'=>1]) -> order('sort desc') -> select();
$forums = \ebcms\Tree::group($forums);
{/php}
	{foreach name='forums' item='group'}
	<div class="panel-body">
		<h3 class="text-primary">{$key}</h3>
	</div>
	<div class="list-group">
		{foreach name='group' item='vo'}
		<a href="{$vo.url}" class="list-group-item {if condition="isset($forum) && $vo['id'] == $forum['id']"}active{/if}"><span class="badge">{$vo.count}</span>{$vo.title}</a>
		{/foreach}
	</div>
	{/foreach}
</div>