{% extends base %}

{% block head %}

<link rel="stylesheet" type="text/css" href="{{_server_home}}/_static/lib/webuploader/webuploader.css">
<script type="text/javascript" src="{{_server_home}}/_static/lib/webuploader/webuploader.nolog.min.js"></script>
<script type="text/javascript" src="{{_server_home}}/_static/js/message/message.js?ts={{_ts}}"></script>

{% end %}

{% block body_left %}
    {% init tag_list = [] %}

    {% include message/component/message_title.html %}
    <!-- Tab页 -->
    {% include message/component/message_tab_log.html %}

    <!-- 月份选择器 -->
    {% include common/date/month_picker.html %}

    <!-- 二级目录 -->
    {% include message/component/message_sub_link.html %}

    <!-- 当月的标签 -->
    <div class="card">
        {% raw filter_tab.render() %}
    </div>

    
    <!-- 文字区域 -->
    {% include message/page/message_list_content.html %}

    <!-- 编辑 -->
    {% include message/component/message_edit.html %}

    <script type="text/javascript">
        $(function (e) {
            MessageState.messageTag = "date";
            var date = "{{date}}";

            function getPage() {
                var page = getUrlParam("page");
                if (page == undefined) {
                    return 1;
                } else {
                    return parseInt(page);
                }
            }

            function onMonthSelected(event) {
                var date = event.target;
                window.location.href = "?date=" + date;
            }

            xnote.on("date.month.selected", onMonthSelected);

            refreshMessageList(date);
        })
    </script>

{% end %}
  
{% block body_right %}
    {% include message/component/message_date_right.html %}
{% end %}
