summaryrefslogtreecommitdiff
path: root/templates/card/card_list.twig
diff options
context:
space:
mode:
Diffstat (limited to 'templates/card/card_list.twig')
-rw-r--r--templates/card/card_list.twig38
1 files changed, 38 insertions, 0 deletions
diff --git a/templates/card/card_list.twig b/templates/card/card_list.twig
new file mode 100644
index 0000000..1714fc8
--- /dev/null
+++ b/templates/card/card_list.twig
@@ -0,0 +1,38 @@
+{% extends 'card/card.twig' %}
+
+{% block pagetitle %}
+List
+{% endblock %}
+{% block pagecontent %}
+ <table>
+ <thead>
+ <tr>
+ <th>ID</th>
+ {% for meta in cards[0].getAllMeta() %}
+ <th>{{ meta.key }}</th>
+ {% endfor %}
+ <th>Votes</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for card in cards %}
+ <tr>
+ <td>{{ card.id }}</td>
+ {% for meta in card.getAllMeta() %}
+ <td>{{ meta.value }}</td>
+ {% endfor %}
+ <td>
+ {{ card.getVotesTotal() }}
+ <button>Up</button>
+ <button>Down</button>
+ </td>
+ <td>
+ <button onclick="location.href='/card/{{ card.id }}'">Card</button>
+ <button onclick="location.href='/card/{{ card.id }}/artworks'">Artworks</button>
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+{% endblock %}