
{% extends "base.html" %}
{% block nav-home %}<li><a href="/">Home</a></li>{% endblock %}
          
{% block nav-subjects %}<li ><a href="/subjects">My Subjects</a></li>{% endblock %}
{% block nav-available-subjects %}<li ><a href="/available_subjects">Available Subjects</a></li>{% endblock %}
{% block nav-pending-subjects %}<li class="active"><a href="/pending_subjects">Pending Requests</a></li>{% endblock %}
{% block body%}
<div class="container" style="margin-top:50px;">
	<div >
		<h2>Pending Course Requests</h2>
		
			<table style="width:100%;border: solid grey 1px;box-shadow: 2px 2px;" class="table table-hover">
				<thead>  
				    <tr>  
				        <th style="text-align: center;">Course ID</th>  
				        <th style="text-align: center;">Course Name</th>  
				        <th style="text-align: center;">Professor</th>
				        <th style="text-align: center;">Action</th>  
				    </tr>  
			    </thead>
			    <tbody>  
			{% for sub_stud in sub_studs %}
				{% if sub_stud.is_accepted == False %} 
				    <tr>  
				        <td style="text-align: center;">{{ sub_stud.subject.sub_code }}</td>
				        <td style="text-align: center;">{{ sub_stud.subject.sub_name }}</td>
				        <td style="text-align: center;">{{ sub_stud.subject.prof.fname }} {{ sub_stud.subject.prof.lname }}</td>
				        <td style="text-align: center;">
				        	<a href="/reject_subject/{{sub_stud.subject.sub_code}}">
				        		<button class="btn btn-danger">Cancel
				        		</button>
				        	</a>
				    	</td>
				    </tr>
			    {% endif %}
			{% endfor %}  
			    </tbody>  
				
			</table>
		
	</div>
	
</div>
{% endblock %}
