{% extends "base.html" %}

{% block head %}
	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jeditable.js/1.7.3/jeditable.min.js"></script>
	<script type="text/javascript">
		$(function () {
	      	$("#monthpicker").datepicker( {
	    		format: "mm/yyyy",
	    		viewMode: "months", 
	    		minViewMode: "months"
			});
      	});
	</script>
{% endblock %}
    
{% block logo %}
	<h1><a href="#">{{month}} {{specialty}} 手術病例統計</a></h1>
{% endblock %}

{% block search %}
<form name="input" action="." method="post">{% csrf_token %}
	Month: <input type="text" id="monthpicker" name="month" size="1"> 
	<input type="submit" value="Go" />
</form>
{% endblock %}


{% block content %}
<a href = '.?month={{month}}&xls=1'>匯出 Excel 97-2003 XLS 工作簿</a>
<table class="table table-condensed">
	{% for row in data %}
	<tr>
		{% for c in row %}
		<td>
			{% if forloop.first %}
				<pre class="noborder">{{c|linebreaksbr}}</pre>
			{% else %}
				{{c|linebreaksbr}}
			{% endif %}        
		</td>
		{% endfor %}
    </tr>
	{% endfor %}
</table>
{% endblock %}
