{% extends "allocation/admin1.html" %}
{% load i18n admin_urls static admin_list %}
{% block breadcrumbs %}
    <div class="breadcrumbs">
    <a href="{% url 'allocation:admin1' %}">{% trans 'Home' %}</a>
    &rsaquo; Applicants
    </div>
{% endblock %}
{% block content %}
<h1>Applicants</h1>

{% if applicant_list %}
<ul>
  <li style="float:right; vertical-align: top;">
	<h3 style="margin-top: -50px"> For uploading Applicant</h3>
	<form method="POST" action="/allocation/applicant_make" enctype="multipart/form-data">
    {% csrf_token %}
    <input type="file" name="myfile" title='Please upload file in .csv format only'>
    <button type="submit">Upload</button>
    </form>
  </li>
  {% for applicant in applicant_list %}
  <li>
    <a href="{% url 'allocation:applicant-detail' applicant.pk %}">{{ applicant.name }}</a> 
  </li>
  {% endfor %}

</ul>
{% else %}
<li style="float:right; vertical-align: top;">
	<h3 style="margin-top: -50px"> For uploading Applicant</h3>
	<form method="POST" action="/allocation/applicant_make" enctype="multipart/form-data">
    {% csrf_token %}
    <input type="file" name="myfile" title='Please upload file in .csv format only'>
    <button type="submit">Upload</button>
    </form>
</li>
<p>There are no applicants.</p>
{% endif %} 
{% endblock %}
