{% extends "base.html" %}
+{% load meta_extras %}
{% block jumbotron %}
<div class="jumbotron">
<p>Curious how decks like yours have performed in tournaments?<br/>
Paste your <a href="http://ponyhead.com/deckbuilder">ponyhead.com</a> URL here and find out!</p>
<p>
- <form action="/meta/rate" method="post" class="form-inline" role="form">
+ <form action="{% url 'meta.views.rate' %}" method="post" class="form-inline" role="form">
{% csrf_token %}
<div class="form-group">
<label class="sr-only" for="ponyheadURL">ponyhead decklist url</label>
- <input type="url" name="url" class="form-control input-lg" id="ponyheadURL" placeholder="Deck URL, e.g.: http://ponyhead.com/deckbuilder?v1code=..."/>
+ <input type="url" name="url" class="form-control input-lg" id="ponyheadURL" placeholder="Deck URL"/>
<button type="submit" class="btn btn-lg btn-default btn-primary">Tell me!</button>
</div>
</form>
<p>Very fuzzy data, based on past tournaments. The more the deck was played in tournaments, the more accurate this is.</p>
<table class="table">
<tr>
- <th>Archetype ID</th>
+ <!-- <th>Archetype ID</th> -->
<th>Average placement</th>
<th>Example decks</th>
</tr>
{% load humanize %}
{% for avg, label, decks in ranking %}
<tr>
- <td>{{ label }}</td>
+ <!-- <td>{{ label }}</td> -->
<td>{{ avg|ordinal }}</td>
<td>
<ul class="list-inline">
{% for d in decks %}
- <li><a href="{{ d.ponyhead_link }}">{{ d.description }}</a></li>
+ <li><a href="{{ d.ponyhead_link }}">{{ d.name }}</a></li>
{% endfor %}
</ul>
</td>
{% for t in tournaments %}
<tr>
<td>{{ t.tournament.date }}</td>
- <td>{{ t.tournament.name }}</td>
+ <td><a href="{% url 'meta.views.tournaments_detail' t.tournament.id %}">{{ t.tournament.name }}</a></td>
<td>
- {% for d in t.decklists|slice:":8" %}
- <a href="{{ d.ponyhead_link }}">{{ d.name }} ({{ d.description }})</a><br/>
+ {% for placement, d in t.decklists|slice:":8" %}
+ {{ placement|ordinal }} <a href="{{ d.ponyhead_link }}">{{ d.name }} ({{ d.description }})</a><br/>
{% endfor %}
</td>
</tr>
</div>
</div>
{% endblock %}
+
+{% block jumbotron_end %}
+<div class="jumbotron">
+ <div class="container">
+ <h1>Is your deck not on the list?</h1>
+ <p> Paste your <a href="http://ponyhead.com/deckbuilder">ponyhead.com</a> URL here and help make this site better!</p>
+ <p>
+ <form action="{% url 'meta.views.rate' %}" method="post" class="form-inline" role="form">
+ {% csrf_token %}
+ <div class="form-group">
+ <label class="sr-only" for="ponyheadURL">ponyhead decklist url</label>
+ <input type="url" name="url" class="form-control input-lg" id="ponyheadURL" placeholder="Deck URL"/>
+ <button type="submit" class="btn btn-lg btn-default btn-primary">Add me!</button>
+ </div>
+ </form>
+ </p>
+ </div>
+</div>
+{% endblock %}