<div class="panel panel-default">
    <div class="panel-heading clearfix">
        <span style="float:right">
            排序:
            <div class="btn-group btn-group-xs" role="group">
                {% if request.args.get('orderby') == 'vote' %}
                <a href="{{ url_for('user.topic',orderby='publish')}}" class="btn btn-default">时间</a>
                <a href="{{ url_for('user.topic',orderby='vote')}}" class="btn btn-default active">投票</a>
                {% else %}
                <a href="" class="btn btn-default active">时间</a>
                <a href="{{ url_for('user.topic',orderby='vote')}}" class="btn btn-default">投票</a>
                {% endif %}
            </div>
        </span>
    </div>
    {% if topics.items %}
    {% if setting.topic_list == 1 or (setting.topic_list == 2 and g.user.is_authenticated) or (g.user.is_authenticated and g.user.username == g.user_url) %}
    {% for topic in topics.items %}
    <div class="panel-body" style="border-bottom:1px solid #eee;font-size:16px;">
        <span style="color:#666">{{ topic.board.board }}</span>
        {{ link_base.topic(topic) }}
        <div style="font-size:12px;color:#999;">
            创建日期:{{ topic.publish | timesince }}
            最后回复来自
            {{ link_base.user(topic.author.username) }}
        </div>
    </div>
    {% endfor  %}
    {{ p_footer(topics,'user.topic')}}
    {% else %}
    <div class="panel-body" style="border:1px dashed #337ab7;margin:5px;">
        <span class="text-center" style="display:block;width:100%;color:#999">
            <span class="glyphicon glyphicon-lock" aria-hidden="true" style="font-size:16px;"></span>
            根据用户设置,列表被隐藏
        </span>
    </div>
    {% endif %}
    {% else %}
    <div class="panel-body text-center">
        没有主题
    </div>
    {% endif %}
</div>
