{% extends 'usercenter/base.html' %}
{% load staticfiles %}
{% block extra_css %}
    <link href="{% static 'global/plugins/morris/morris.css' %}" rel="stylesheet" type="text/css"/>
    <link href="{% static 'pages/css/profile.css' %}" rel="stylesheet" type="text/css"/>
{% endblock %}
{% block extra_css_page %}
    <style>
        .page-container-bg-solid .page-content {
            background: #eef1f5;
        }
    </style>
{% endblock %}
{% block extra_js_plugins %}
    <script src="{% static 'global/plugins/morris/morris.min.js' %}" type="text/javascript"></script>
    <script src="{% static 'global/plugins/morris/raphael-min.js' %}" type="text/javascript"></script>
{% endblock %}
{% block extra_js_page %}
    <script src="{% static 'pages/scripts/dashboard.min.js' %}?v={{ version }}" type="text/javascript"></script>
    <script src="{% static 'layouts/layout/scripts/demo.min.js' %}?v={{ version }}" type="text/javascript"></script>
    <script src="{% static 'layouts/global/scripts/quick-sidebar.min.js' %}?v={{ version }}"
            type="text/javascript"></script>
    {#    <script src="{% static 'pages/scripts/profile.js' %}?v={{ version }}" type="text/javascript"></script>#}
{% endblock %}
{% block main_content %}
    <div class="row">
        <div class="col-lg-6">
            <div class="portlet light profile-sidebar-portlet ">
                <!-- SIDEBAR USERPIC -->
                <div class="profile-userpic">
                    <img src="{{ MEDIA_URL }}{{ request.user.qtuser.avatar }}" class="img-responsive" alt=""></div>
                <!-- END SIDEBAR USERPIC -->
                <!-- SIDEBAR USER TITLE -->
                <div class="profile-usertitle">
                    <div class="profile-usertitle-name"> {% firstof request.user.qtuser.nickname request.user.qtuser.phone %}</div>
                    <div class="profile-usertitle-job"> {% firstof groups.name '新入山门' %}</div>
                </div>
                <!-- END SIDEBAR USER TITLE -->
                <!-- SIDEBAR BUTTONS -->
                <div class="profile-userbuttons">
                    余额：
                    <button class="button btn-circle red btn-sm">{{ wallet.money }}</button>
                    会期：
                    <button class="button btn-circle red btn-sm">{{ request.user.qtuser.vip_expire|date:'Y-m-d' }}</button>
                </div>
                <!-- END SIDEBAR BUTTONS -->
                <!-- SIDEBAR MENU -->
                <div class="profile-usermenu">
                    <ul class="nav">
                        <li>
                            <a href="{% url 'uc:change_profile' %}">
                                <i class="icon-settings"></i> 修改资料 </a>
                        </li>
                        <li>
                            <a href="{% url 'uc:wallet_log' %}">
                                <i class="icon-info"></i> 消费记录 </a>
                        </li>
                    </ul>
                </div>
                <!-- END MENU -->
            </div>
        </div>
        <div class="col-md-6">
            <!-- BEGIN PORTLET -->
            <div class="portlet light ">
                <div class="portlet-title tabbable-line">
                    <div class="caption caption-md">
                        <i class="icon-globe theme-font hide"></i>
                        <span class="caption-subject font-blue-madison bold uppercase">公告</span>
                    </div>

                </div>
                <div class="portlet-body">
                    <div class="scroller" style="height:337px" data-rail-visible="1" data-rail-color="yellow" data-handle-color="#a1b2bd">
                        <ul class="feeds">
                            {% for item in notify %}
                            <li>
                                <div class="col1">
                                    <div class="cont">
                                        <div class="cont-col1">
                                            <div class="label label-sm label-success">
                                                <i class="fa fa-bell-o"></i>
                                            </div>
                                        </div>
                                        <div class="cont-col2">
                                            <div class="desc">
                                                {{ item.title }}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col2">
                                    <div class="date">{{ item.created|timesince }}前</div>
                                </div>
                            </li>
                            {% endfor %}
                        </ul>
                    </div>
                </div>
            </div>
            <!-- END PORTLET -->
        </div>
    </div>
{% endblock %}