{% extends "bee_django_mission/custom_base.html" %}
{% load bee_django_mission_filter %}

{% block content %}
    <div class="btn-group" role="group" style="margin-top: 20px;">
        <a class="btn btn-success active">周任务</a>
        <a class="btn btn-default"
           href="{% url 'bee_django_mission:custom_user_line_unlimited' user_id=request.user.id %}">里程碑</a>
    </div>



    <div class="row">
        <div style="margin: 15px;padding: 10px;font-weight: 600;" class="bg-info">
            完成【{{ user_stage.name }}】后，最高获得{{ max_prize_coin }}{{ context_coin_name }}！
        </div>
        {% if top_prize_list %}
            <div style="margin: auto 10px;color: red">
                <marquee scrollamount="3">恭喜：
                    {% for user_stage in top_prize_list|slice:"10" %}
                        <span style="margin: auto 5px;">{{ user_stage.user_line.user }}获得{{ user_stage.prize_coin }}{{ context_coin_name }}</span>
                    {% endfor %}
                </marquee>
            </div>
        {% endif %}
        <div class="col-sm-8 col-xs-12">{% include 'bee_django_mission/user/mission/include/custom_list.html' %}</div>
        <div class="col-sm-4 col-xs-12" style="background-color: #efefef;min-height: 300px;position: relative">
            <div style="height: 40px;line-height: 40px;">周任务完成排行榜</div>
            {% if user_stage %}
                <div style="position: absolute;top: 10px;right: 10px" class="text-right">
                    <a href="{% url 'bee_django_mission:custom_user_stage_finish_rank_list' line_id=2 %}">全部</a>
                </div>
            {% endif %}

            <table class="table">
                {% for f in finish_rank_list %}
                    <tr>
                        <td>{{ f.user}}</td>
                        <td>{{ f.finish_count }}</td>
                    </tr>
                {% endfor %}
            </table>
        </div>
    </div>

{% endblock %}
{% block scripts %}

{% endblock %}