Skip to content

Commit

Permalink
Merge pull request #86 from EarthSchlange/patch_member_page_columns
Browse files Browse the repository at this point in the history
Added columns for member information and rating graph.
  • Loading branch information
Michael Hiiva authored Jun 9, 2020
2 parents f15012c + 4576152 commit 9578c82
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 13 deletions.
7 changes: 5 additions & 2 deletions agagd/static/css/agagd.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ a:hover {
font-style: italic;
}

#ratings_graph {
/*#ratings_graph {
float: right;
}
}*/

.axis path,
.axis line {
Expand Down Expand Up @@ -203,6 +203,9 @@ div.ui-datepicker{
font-size:10px;
}

.left-column {
float: left;
}

.flex-row {
display: flex
Expand Down
42 changes: 31 additions & 11 deletions agagd/templates/agagd_core/member.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,38 @@
{% block content %}
{{ block.super }}
<h2> Player card for <b>{{player.full_name}}</b>, ID #{{player.member_id}}.</h2>
{% include "agagd_core/ratings_graph.html" %}
<ps> AGA member since: {{ player.join_date }} </ps><br>
<ps>Expiration Date: {{ player.renewal_due }} </ps><br>
<ps>Membership type: {{ player.type }} </ps><br>
<dl>
<dt style="font-size: 24px"> Rating: </dt> <dd style="font-size: 24px"> {{ rating.rating }} </dd>
<dt> Sigma: </dt> <dd> {{ rating.sigma }} </dd>
<dt> Last Rated At: </dt> <dd> {{ rating.elab_date }} </dd>
<dt> Last Tournament: </dt> <dd> {{ rating.tournament }} </dd>
<dt> Highest Rating: </dt> <dd> {{ max_rating }} </dd>
</dl>

<div class="clearboth"></div>

<div class="member_content_wrapper">
<div class="left-column member_information">
<dl>
<dt> AGA member since: </dt>
<dd> {{ player.join_date }} </dd>
<dt> Expiration Date: </dt>
<dd> {{ player.renewal_due }} </dd>
<dt> Membership type: </dt>
<dd> {{ player.type }} </dd>
<dt style="font-size: 24px"> Rating: </dt>
<dd style="font-size: 24px"> {{ rating.rating }} </dd>
<dt> Highest Rating: </dt>
<dd> {{ max_rating }} </dd>
<dt> Sigma: </dt>
<dd> {{ rating.sigma }} </dd>
<dt> Last Rated At: </dt>
<dd> {{ rating.elab_date }} </dd>
<dt> Last Tournament: </dt>
<dd> {{ rating.tournament }} </dd>
</dl>
</div>

<div class="left-column member_rating_graph">
{% include "agagd_core/ratings_graph.html" %}
</div>
</div>

<div style="clear: both;"></div>

<form method="post" action="{% url "find_member_vs" player.member_id %}">
{% csrf_token %}
<p> Find matchups of {{player.full_name}} against AGA ID# <input name="opponent_id" type="text"/>
Expand Down

0 comments on commit 9578c82

Please sign in to comment.