{% extends "templates/web.html" %}

{% block page_content %}
	<h1>{{ applicant_name }}</h1>
	{% if frappe.user == owner %}
		<p><a class='btn btn-primary btn-sm' href="/my-grant?name={{ name }}">Edit Grant</a></p>
	{% endif %}
	<br>
	<table class='table table-bordered small' style='max-width: 400px; margin-bottom: 0px;'>
		<tr>
			<td style='width: 38.2%'>Organization/Indvidual</td>
			<td>{{ applicant_type }}</td>
		</tr>
		<tr>
			<td>Grant Applicant Name</td>
			<td>{{ applicant_name}}</td>
		</tr>
		<tr>
			<td>Date</td>
			<td>{{ frappe.format_date(creation) }}</td>
		</tr>
		<tr>
			<td>Status</td>
			<td>{{ status }}</td>
		</tr>
		<tr>
			<td>Email</td>
			<td>{{ email }}</td>
		</tr>
	</table>
	<h2>Q. Please outline your current situation and why you are applying for a grant?</h2>
	<p>	{{ grant_description }}</p>
	<h2>Q. Requested grant amount</h2>
	<p>{{ amount }}</p>
	<h2>Q. Have you recevied grant from us before?</h2>
	<p>{{ has_any_past_grant_record }}</p>
	<h3>Contact</h3>
	{% if frappe.user != 'Guest' %}
		<table class='table table-bordered small' style='max-width: 400px; margin-bottom: 0px;'>
			{% if contact_person %}
				<tr>
					<td style='width: 38.2%'>Contact Person</td>
					<td>{{ contact_person }}</td>
				</tr>
			{% endif %}
			<tr>
				<td style='width: 38.2%'>Email</td>
				<td>{{ email }}</td>
			</tr>
		</table>
	{% else %}
		<p><a href="/login">You must register and login to view contact details</a></p>
	{% endif %}
	<br>
	{% if frappe.session.user == assessment_manager %}
		{% if assessment_scale %}
			<p> Assessment Review done </p>
		{% endif %}
	{% else %}
	<p><br><a href="/my-grant?new=1" class='btn btn-primary'>Post a New Grant</a></p>
	{% endif %}
{% endblock %}
{% block style %}
<link type="text/css" rel="stylesheet" href="/assets/css/non-profits.css">
<style>
{% if style is defined %}{{ style }}{% endif %}
</style>
{% endblock %}
