<div class="panel panel-default">
    <div class="panel-heading clearfix">
        <span style="float:right">
            {{_('Sort:')}}
            <div class="btn-group btn-group-xs" role="group">
                {% if request.args.get('orderby') == 'vote' %}
                <a href="{{ url_for('mine.topiclist',orderby='publish')}}" class="btn btn-default">{{_('time')}}</a>
                <a href="{{ url_for('mine.topiclist',orderby='vote')}}" class="btn btn-default active">{{_('vote')}}</a>
                {% else %}
                <a href="" class="btn btn-default active">{{_('time')}}</a>
                <a href="{{ url_for('mine.topiclist',orderby='vote')}}" class="btn btn-default">{{_('vote')}}</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;">
            {{_('create time:')}}{{ topic.publish | timesince }}
            · {{ _('the last reply published by %(author)s',author=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>
            {{_("Due to user's setting,the list have been hidden.")}}
        </span>
    </div>
    {% endif %}
    {% else %}
    <div class="panel-body text-center">
        {{_('No Topic')}}
    </div>
    {% endif %}
</div>
