remove all useless .pyc files
[mlpccg-meta.git] / meta / templates / index.html
index e4f9e6f..c307f26 100644 (file)
@@ -1,4 +1,5 @@
 {% extends "base.html" %}
+{% load meta_extras %}
 
 {% block jumbotron %}
 <div class="jumbotron">
@@ -11,7 +12,7 @@
         {% 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>
@@ -61,7 +62,7 @@
       {% for t in tournaments %}
       <tr>
         <td>{{ t.tournament.date }}</td>
-        <td>{{ t.tournament.name }}</td>
+        <td><a href="/meta/tournaments/{{ 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/>
   </div>
 </div>
 {% endblock %}
+
+{% block jumbotron_end %}
+<div class="jumbotron">
+  <div class="container">
+    <h2>Is your deck not in the list?</h2>
+    <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">
+        {% 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 %}