{% init is_keyword_marked = False %}
{% init show_create_on_tag = True %}
{% init is_task_tag = False %}
{% init date = "" %}
{% init tag_id = 0 %}

{% include common/table/table_script.html %}

{% if keyword != "" %}
<div class="card btn-line-height">
    <span class="tag info">标签</span>
    <span class="keyword-span">{{keyword}}</span>
    {% if tag_id > 0 %}
        <a data-title="编辑"
            data-url="{{_server_home}}/note/tag_manage?action=edit&tag_id={{tag_id}}"
            onclick="xnote.table.handleEditForm(this)">编辑标签</a>
        <a href="/message/tag/list">全部标签</a>
    {% end %}
    
    <div class="float-right">
        {% if is_task_tag %}
        <button class="btn-default" 
            data-keyword="{{keyword}}"
            data-tag="task"
            data-title="创建待办"
            onclick="xnote.action.message.createMessageOnTag(this);">+待办</button>
        {% else %}
        <button class="btn-default" 
            data-keyword="{{keyword}}"
            data-tag="log"
            data-title="创建随手记"
            onclick="xnote.action.message.createMessageOnTag(this);">+随手记</button>
        {% end %}
    </div>
</div>
{% end %}


{% if date != "" %}
<div class="card btn-line-height">
    <span class="tag info">日期</span>
    <span>{{date}}</span>
</div>
{% end %}
