{% extends "global/Page.html" %}
{% load otree static %}

{% block title %}
{% endblock %}

{% block content %}
	<!--<p>
		You started with an endowment of {{ player.endowment }},
		of which you contributed {{ player.contribution }}.
		Your group contributed {{ group.total_contribution }},
		with a multiplier of {{ Constants.multiplier }}
		resulting in an individual share of {{ group.individual_share }}.
		Your profit is therefore {{ player.payout }}.
	</p>-->
	<h1>Results Summary</h1>
	<div style="padding-top:15px;"></div>

	<table class="table">
		<tr>
			<th>Your Contribution</th>
			<th> + </th>
			<th>Your Group's Contribution</th>
			<th> = </th>
			<th>Total Contribution</th>
		</tr>
		<tr>
			<td> {{ player.contribution }} </td>
			<td></td>
			<td> {{ player.get_team_contribution }} </td>
			<td></td>
			<td> {{ group.total_contribution }} </td>
		</tr>
	</table>
	<div style="padding-top:15px"></div>

	<table class="table">
		<tr>
			<th>Total Contribution post multiplier ({{ group.get_multiplier_value }}x)</th>
			<th>/</th>
			<th>Number of players in group</th>
			<th>=</th>
			<th>Individual Share</th>
		</tr>
		<tr>
			<td> {{ group.get_total_contribution_with_multiplier }} </td>
			<td></td>
			<td> {{ player.get_team_size }} </td>
			<td></td>
			<td> {{ group.individual_share }} </td>
		</tr>
	</table>
	<div style="padding-top:15px"></div>

	<table class="table">
		<tr>
			<th>Endowment</th>
			<th> - </th>
			<th>Your Contribution</th>
			<th> + </th>
			<th>Individual Share</th>
			<th> = </th>
			<th>New Total</th>
		</tr>
		<tr>
			<td> {{ player.endowment }} </td>
			<td></td>
			<td> {{ player.contribution }} </td>
			<td></td>
			<td> {{ group.individual_share }} </td>
			<td></td>
			<td> <i><b>{{ player.payout }}</b></i> </td>
		</tr>
	</table>
	<div style="padding-top:15px"></div>


  {% next_button %}
{% endblock %}
