add new theme
[mlpccg-meta.git] / meta / templates / rate.html
index c9627a5..2482df4 100644 (file)
@@ -1,7 +1,58 @@
 {% extends "base.html" %}
+{% load humanize %}
 
 {% block content %}
 
-{{ label }}
+<div class="row">
+  <div class="col-xs-12">
+    <h2><a href="{{ deck.ponyhead_link }}">{{ deck.description }}</a></h2>
+    <p>Decks similiar to yours and their placement in past tournaments:</p>
+    <form class="form" action="{% url 'meta.views.rate' %}" method="post" role="form">
+    <table class="table">
+      <tr>
+        <th>Deck</th>
+        <th>Placement</th>
+        <th>Tournament</th>
+        <th colspan="2">Date</th>
+      </tr>
+    {% for deck, record in similiar reversed %}
+      <tr class="{% if not record.verified %}warning{% endif %}">
+        <td><a href="{{ deck.ponyhead_link }}">{{ deck.name }}</a></td>
+        <td>{{ record.placement|ordinal }}</td>
+        <td><a href="{% url 'meta.views.tournaments_detail' record.tournament.id %}">{{ record.tournament.name }}</a></td>
+        <td>{{ record.tournament.date }}</td>
+        <td>{% if not record.verified %}user-submitted{% endif %}</td>
+      </tr>
+    {% endfor %}
+      <tr>
+        <td colspan="5">
+          <strong>Played this deck in a tournament? Add your result here!</strong>
+          <p class="help-block">This contibutes towards a better overview over the meta-game.</p>
+        </td>
+      </tr>
+        {% csrf_token %}
+        <input type="hidden" name="url" value="{{ deck.ponyhead_link }}"/>
+        <tr class="info">
+          <td><input type="text" name="d_name" class="form-control" placeholder="Deck name"/></td>
+          <td>
+            <select name="t_placement" class="form-control">
+              <option value="1">1st</option>
+              <option value="2">2nd</option>
+              <option value="3">3rd</option>
+              <option value="4">4th</option>
+              <option value="5">5th</option>
+              <option value="6">6th</option>
+              <option value="7">7th</option>
+              <option value="8">8th</option>
+            </select>
+          </td>
+          <td><input type="text" name="t_name" class="form-control typeahead-tournaments"  placeholder="Tournament name"/></td>
+          <td><input type="date" name="t_date" class="form-control"/></td>
+          <td><button type="submit" class="btn btn-primary">Submit</button></td>
+        </tr>
+    </table>
+    </form>
+  </div>
+</div>
 
 {% endblock %}