Skip to content

Instantly share code, notes, and snippets.

@vitorfs
Created September 30, 2017 20:03
Show Gist options
  • Save vitorfs/cb4b7c9ff382ddeafb4114d0c84b3869 to your computer and use it in GitHub Desktop.
Save vitorfs/cb4b7c9ff382ddeafb4114d0c84b3869 to your computer and use it in GitHub Desktop.
{% extends 'base.html' %}
{% block title %}
{{ board.name }} - {{ block.super }}
{% endblock %}
{% block breadcrumb %}
<li class="breadcrumb-item"><a href="{% url 'home' %}">Boards</a></li>
<li class="breadcrumb-item active">{{ board.name }}</li>
{% endblock %}
{% block content %}
<div class="mb-4">
<a href="{% url 'new_topic' board.pk %}" class="btn btn-primary">New topic</a>
</div>
<table class="table">
<thead class="thead-inverse">
<tr>
<th>Topic</th>
<th>Starter</th>
<th>Replies</th>
<th>Views</th>
<th>Last Update</th>
</tr>
</thead>
<tbody>
{% for topic in board.topics.all %}
<tr>
<td><a href="{% url 'topic_posts' board.pk topic.pk %}">{{ topic.subject }}</a></td>
<td>{{ topic.starter.username }}</td>
<td>0</td>
<td>0</td>
<td>{{ topic.last_updated }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment