{% extends "pos_informaform.html" %}
{% load i18n %}

{% block id_main_div %}
    {% if request.user|HasPerm:"contenttypes.can_PosFormPage" %}
        {% if request.user|HasPerm:"contenttypes.can_SplitTimePage" %}
        <div><li id="id_model_export" style="display:none"><a class="action_Model_Export" href="javascript:void(0)" alt="export"></a></li></div>
        <div style="display:none">   
            <li>
            <div id="id_log_url">   
            <a id="id_log_dialog" href="javascript:void(0);" ref="/{{request.surl}}worktable/get_search_form/base/LogEntry/" query="{{ log_search }}" class=""><span class="action_log"></span>{% trans "日志记录" %}</a>							   
            </div>
            </li>
        </div>		

        <div id="id_datalist" class="div_box h280"><h1>{% trans "分段定值" %}</h1>
        </div>
        {% endif %} 
    {% endif %} 
{% endblock %}

{% block acc_reportform %}
    {% if request.user|HasPerm:"contenttypes.can_PosFormPage" %}
        {% if request.user|HasPerm:"contenttypes.can_SplitTimePage" %}
            $("#id_datalist").model_grid({
                "model_url": "{{ dbapp_url }}pos/SplitTime/",
                "model_actions": true,
                "object_actions": false,
                "record_per_page": 15,
                "max_no_page": 20,        
                "disabled_actions": ["OpClearAbnormityLogs","_delete","_clear","_change","_add"],
                "multiple_select": null,
                "action_onclick_continue": false,
                "row_operations": true,
                "init_after_get_jdata": function(){
                    $("#id_datalist div.action").append('<li id="id_log"> <a id="id_log_dialogsss"   href="javascript:void(0);" >'+gettext("日志记录")+'</a></li>')
                    
                    $("#id_log").click(function(){
                        $("#id_log_dialog").click();
                    });
                }
            });
        {% endif %} 
    {% else %}
        $("#id_search").remove();
        alert(gettext("对不起，您没有访问该页面的权限，不能浏览更多信息！"));
        window.location.href = "/{{ request.surl }}accounts/login/";
    {% endif %} 
{% endblock %}
