Code

Ticket #2454: competition_list.html

File competition_list.html, 752 bytes (added by dummy@…, 8 years ago)

The used template-snippet (for explaination only)

Line 
1{% if object_list %}
2    {% regroup object_list by tournament as tournaments %}
3    <table>
4    {% for tournament in tournaments %}
5        <tr>
6        <td colspan="7">
7                <strong>
8                {{ tournament.grouper }}
9                </strong>
10        </td>
11        </tr>
12        {% for competition in tournament.list %}
13        <tr>
14                <td>{% ifchanged %}{{ competition.date_str }}{% endifchanged %}</td>
15                <td>{% firstof competition.call_time %}</td>
16                <td>{% firstof competition.start_time %}</td>
17                <td>{{ competition.get_weapon_display }}</td>
18                <td>{{ competition.get_gender_display }}</td>
19                <td>{{ competition.get_category_display }}</td>
20                <td>{{ competition.get_single_or_crew_display }}</td>
21        </tr>
22        {% endfor %}
23    {% endfor %}
24    </table>
25{% else %}
26    <p>No competitions are available.</p>
27{% endif %}