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

{% extends "base.html" %}

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

{% block content %}

	<br />
	<h2>Portfolios</h2>
	<p>The following are your portfolios from each of your leagues:</p>
	<br />

	{% if portfolios %}
	<table style="margin-left: auto; margin-right: auto;">
		<thead>
			<tr>
				<th>League Name:&nbsp;</th>
				<th>Current Portfolio Value:&nbsp;</th>
				<th>End Date:&nbsp;</th>
			</tr>
		</thead>
		{% for item in portfolios %}
			<tr>
				<td><a href="/vsm/portfolio/{{ item.id }}/detail" >{{ item.name }}</a></td>
				<td>${{ item.value|floatformat:2 }}</td>
				<td>{{ item.enddate|date:"m/d/Y" }}</td>
			</tr>
		{% endfor %}
	</table>
	{% else %}
	<span>You have no portfolios</span>
	{% endif %}


	<br />
{% endblock %}
