{% extends "base.html" %}
{% load meta_extras %}
+{% load url from future %}
{% 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"/>
+ <input type="url" name="url" class="form-control input-lg" id="ponyheadURL" placeholder="PonyHead URL"/>
<button type="submit" class="btn btn-lg btn-default btn-primary">Tell me!</button>
</div>
</form>
<td>
<ul class="list-inline">
{% for d in decks %}
- <li><a href="{{ d.ponyhead_link }}">{{ d.name }}</a></li>
+ <li><a href="{{ d.ponyhead_link }}">{{ d|deckicon }}</a></li>
{% endfor %}
</ul>
</td>
{% for t in tournaments %}
<tr>
<td>{{ t.tournament.date }}</td>
- <td><a href="/meta/tournaments/{{ t.tournament.id }}">{{ t.tournament.name }}</a></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>
{% endblock %}
{% block jumbotron_end %}
+<!--
<div class="jumbotron">
<div class="container">
- <h2>Is your deck not in the list?</h2>
+ <h1>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="/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"/>
+ <input type="url" name="url" class="form-control input-lg" id="ponyheadURL" placeholder="PonyHead URL"/>
+ <label class="sr-only" for="decklistName">decklist name</label>
+ <input type="text" name="text" class="form-control input-lg" id="decklistName" placeholder="Deck name (optional)"/>
<button type="submit" class="btn btn-lg btn-default btn-primary">Add me!</button>
</div>
</form>
</p>
</div>
</div>
+-->
{% endblock %}