{% extends '../template.html' %}
{% block title %}Pasien{% endblock %}
{% block subcontent %}
	<h2>Data Pasien > List Pasien</h2>
	<form method="get">
		<b>Cari: <input type="text" id="find" name="find" value="{{find}}"/></b>
		<input type="submit" value="Go"/>
	</form>
	<br/>
	
	<a href="{% nav admin_pasien_new %}" class="big_btn">Tambah</a>

	<br/>
	<br/>
	{% if data.length > 0 %}
	<table class="data">
		<tr>
			<th>No. RekMed</th>
			<th>No. Identitas</th>
			<th>Nama</th>
			<th>Nama Kel.</th>
			<th>Tgl. Lahir</th>
			<th>Jns Kel</th>
			<th>Alamat</th>
			<th>Telepon</th>
			<th>Golongan</th>
			<th></th>
		</tr>
		{% for row in data %}
			<tr>
				<td>{{row.no_rekmed}}</td>
				<td>{{row.no_nik}}</td>
				<td>{{row.nama}}</td>
				<td>{{row.namakel}}</td>
				<td>{{row.tgl_lahir}}</td>
				<td>{{row.sex}}</td>
				<td style="max-width:300px;">{{row.alamat}}</td>
				<td>{{row.tlp}}</td>
				<td>{{row.gol}}</td>
				<td>
					<a href="{% nav admin_pasien_edit %}/{{ row.id }}" style="padding-right:10px;">Edit</a>
					<a onclick="return confirm('Apakah Anda Yakin ?');" href="{% nav admin_pasien_del %}/{{ row.id }}">Hapus</a>
				</td>
			</tr>
		{% endfor %}
	</table>
	{% else %}
		Data kosong, klik tombol <b>Tambah Pasien</b> untuk menambahkan data pasien baru.<br/>
	{% endif %}
	
	{% for p in page %}
	<a href="{{ p.link }}" class="{% if p.active == 'yes' %}active{% endif %} page">{{ p.number }}</a>
	{% endfor %}
	
{% endblock %}
