summaryrefslogtreecommitdiff
path: root/templates/card/card_list.twig
blob: 1714fc809ca44606215c4d520e970f377d462baf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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 %}