
{% load i18n %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<script src="/media/jslib/jquery.js"></script>
		<script src="{{ MEDIA_URL }}/jslib/jw.min.js"></script>
		{% include "site_medias_css.html" %}
		{% include "flex_medias_js.html" %}
        <script src="{{ MEDIA_URL }}/jslib/dwz.util.date.js"></script>
		<script src="{{ MEDIA_URL }}/jslib/dwz.datepicker.js"></script>
		<link rel="stylesheet" type="text/css" href="/media/css/flexigrid.pack.css" />	
		<link href="{{ MEDIA_URL }}/css/jw.css" rel="stylesheet" />
		<link href="{{ MEDIA_URL }}/flexigrid/css/css.css" rel="stylesheet" />
	</head>
<body style=" background:#f3f5f0;overflow-x: hidden;">
{% block content %}
		<div id="id_tab" >
            <div class="portlet-header sfActive">
                {% block position %}
                {%if not is_full %}
                	<ul><li class="floatL"><span class='icon_SiteMap'>&nbsp;</span>{% trans "当前位置：" %}{% if position %} {{ position }} {% else %}<span id="id_rel_log">{{ current_app|translate_str }}</span> -> {% if title|translate_str %}{{ title|translate_str|cap }} {% else %}{% endif %}{% endif %}{% block title_extra %} {% endblock %}</li></ul>
                {%else%}
                	<ul><li class="floatL" ><span style='margin-left:113px; ' class='icon_SiteMap'>&nbsp;</span>{% trans "当前位置：" %}{% if position %} {{ position }} {% else %}<span id="id_rel_log">{{ current_app|translate_str }}</span> -> {% if title|translate_str %}{{ title|translate_str|cap }} {% else %}{% endif %}{% endif %}</li></ul>
                {% endif %}
                {% endblock %}
                <!--<ul><li  class="floatR"><a href="{{ request.dbapp_url }}system/help/?p=/file/{{ LANGUAGE_CODE }}/help/{% if help_model_name %}{{ help_model_name|lower }}{% else %}{{ model_name|lower }}{% endif %}.html" target="_blank" title="{% trans '当前页帮助' %}" class="icon_help_current"></a></li></ul>-->
                <ul class="floatR set_index Link_blue1">
                </ul>
            </div>
        </div>
        {%  block search_div  %}
				{% if search_form %}
				<div id="id_search" class="news_topsearch" onkeydown="javasceipt:if(event.keyCode == 13){do_search();}  ">
				<input type="hidden" name="UserIDs" value="{{request.session.employee.pk}}" >
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				<td width="50"><div class="news_topsearch1">{% trans "查询" %}</div></td>
				<td>
					<div class="news_topsearch2"><table width="99%" >
					<tr>
						<td>
							<div>
							   <table STYLE="word-wrap:break-word"; class="tbl_form_search" >
							   			<tr class="header_div_left">
							              {% autoescape off %}
								              {% for field in search_form %}
								                       <td align="right">{{ field|field_as_label_tag_no_asterisk }}</td> <td>{{ field.as_widget }}</td>
								              {% endfor %}    
							              {% endautoescape %}
							              <td  align="right">  
												<div align="right" style="width:260px;" class="topSearchBtn floatR"><!--height:20px;-->
												   
													<span class="Link_blue1">
														<span class="action_topSearch floatL">&nbsp;&nbsp;&nbsp;</span><a href="javascript:void(0)" id="id_header_search" class="floatL">{% trans "查询" %}</a>
													</span>
													{%if calculable %}
													<span class="Link_blue1" >
														<span class="action_calculate floatL">&nbsp;&nbsp;</span><a href="javascript:void(0)" id="id_header_calculate" class="floatL">{% trans "统计" %}</a>
													</span>
													{%endif%}
													<span class="Link_blue1">
														<span class="action_topClear floatL"></span><a href="javascript:void(0)" id="id_header_clear" class="floatL">{% trans "清除" %}</a>
													</span>
													
												</div>
										   </td>
							             </tr>
								</table> 
							</div> 
						</td>
						
						
					</tr>
				
					</table></div></td>
					</tr>
					</table>
				</div>
				{% endif %}
			{%  endblock  %}
        
		<!-- 搜索表单结束 -->
		<div id="id_main_div" style="margin:3px 3px 3px 10px;">
				<table class="m_grid" id="flex" ></table>
				<input type="hidden" id="data_model_url" value="{{app_label}}/{{model_url}}">
				<input type="hidden" id="app_label" value="{{app_label}}">
				<input type="hidden" id="is_audit" value="{{request.session.is_audit}}">
				<input type="hidden" id="verbose_name" value="{{verbose_name}}">
		</div>
		<div id="id_attexcept_desc">
		</div>
{% endblock %}

</body>
</html>
<script language="JavaScript">
	$("body input.date").each(function(){
		var $this = $(this);
		var opts = {};
		if ($this.attr("format")) opts.pattern = $this.attr("format");
		if ($this.attr("yearstart")) opts.yearstart = $this.attr("yearstart");
		if ($this.attr("yearend")) opts.yearend = $this.attr("yearend");
		$this.datepicker(opts);
	});
	
	app_model = "{{app_label}}/{{model_name}}"
	if (app_model == "selfatt/EmpSum" || app_model == "selfatt/AttShifts"){
		load_description();
	}
</script>
{% block extend_js %}
<script>
//---------------------grid-setting---------------------------
	var urlparams = {{urlparams|safe}};
	var hide_list = {{hide_list}};
	var bg_params = "/{{app_label}}/grid/{{app_label}}/{{model_name}}/?export";
	var $p = $(document);
	var m_util = new gridUtil($p,bg_params,hide_list);
	m_util.m_params = urlparams
	var m_option ={{grid_option|safe}}
	m_option["params"] = urlparams;
	$(".m_grid",$p).flexigrid(m_option);
//------------------------------------------------------------
</script>
{% endblock %}
