<!--written by: Aakash Patel, Pintu Patel
# tested by: Aakash Patel, Pintu Patel
# debugged by: Aakash Patel, Pintu Patel-->

{% extends "base.html" %}

{% block title %}Virtual Stock Market - Dashboard{% endblock %}
{% block dashboardNav %}class="selectMenu"{% endblock %}

{% block content %}

	<br />
	<h2>League Ranking</h2>
	<p>The following is Ranking for League Players in the {{ leaguename }}:</p>
	<br />

	{% if ranking %}
	
	<table style="margin-left: auto; margin-right: auto;">
		<thead>
			<tr>
				<th>User Name:&nbsp;</th>
				<th>League Name:&nbsp;</th>
				<th>Net Worth:&nbsp;</th>
				<th>Percent Gain:&nbsp;</th>
			</tr>
		</thead>
				
		{% for item in newlist %}
			<tr>
				<td>{{ item.username }}</td>
				<td>{{ item.leaguename }}</td>
				<td>${{ item.currentvalue|floatformat:2 }}</td>
				<td>{{ item.percentgain|floatformat:2  }} %</td>
			</tr>
		{% endfor %}
	</table>
	

	{% else %}
	<span>You have no ranking</span>
	{% endif %}


	<br />
{% endblock %}
