This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
Episodes.Community/Discussions/templates/boards.html

94 lines
3.0 KiB
HTML
Raw Normal View History

2018-02-27 22:06:41 +00:00
{% extends "base.html" %}
{% block title %}
{{show.name}} Discussions - Episodes.Community
{% endblock %}
{% block content %}
<div class="container mb-5 mt-5">
2018-02-28 16:34:10 +00:00
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/show/{{show.abbr}}">{{show.name}}</a></li>
<li class="breadcrumb-item active" aria-current="page">Discussions</li>
</ol>
</nav>
2018-02-27 22:06:41 +00:00
<h1>{{show.name}} Discussion Boards</h1>
2018-02-28 16:34:10 +00:00
<p>Discuss {{show.name}} with your fellow community members!</p>
2018-02-27 22:06:41 +00:00
<div class="d-flex flex-row-reverse mb-4">
{% if user.is_authenticated %}
<a href="/show/{{show.abbr}}/discuss/board/new" class="btn btn-primary"><i class="fa fa-fw fa-pencil"></i>&nbsp;Create New Board</a>
{% else %}
2018-02-28 16:34:10 +00:00
<p><a href="/login">Log in</a> to create boards</p>
2018-02-27 22:06:41 +00:00
{% endif %}
</div>
<div class="bg-light rounded p-2 row">
<div class="col">Board Name</div>
<div class="col-2">Latest Reply</div>
</div>
{% for board in boards %}
<div class="board border-bottom">
<div class="row">
<div class="col">
<h2><a href="/show/{{show.abbr}}/discuss/board/{{board.pk}}-{{board.title|slugify}}">{{board.title}}</a></h2>
<span class="text-muted font-weight-light">Submitted {{board.timestamp}} by
{% if board.user.is_staff %}
<span class="mod"><i class="fa fa-fw fa-shield"></i></span>
{% endif %}
<span class="display_name">{{board.user.display_name}}</span>
</span>
</div>
<div class="col-2">
2018-02-28 16:34:10 +00:00
{% if board.num_replies > 0 %}
<div class="reply mt-2">
<div class="user">
<small class="text-muted font-weight-light">by </small>
{{board.latest_reply.user.display_name}}
</div>
<small class="timestamp text-muted font-weight-light">{{board.latest_reply.timestamp}}</small>
</div>
{% else %}
2018-02-27 22:06:41 +00:00
<span class="text-muted font-weight-light">No replies</span>
2018-02-28 16:34:10 +00:00
{% endif %}
2018-02-27 22:06:41 +00:00
</div>
</div>
</div>
{% empty %}
<h3>Nobody has started any discussions for this show!</h3>
{% endfor %}
{% if boards.has_other_pages %}
<nav aria-label="Boards navigation">
<ul class="pagination">
{% if boards.has_previous %}
<li class="page-item">
<a href="?page={{ boards.previous_page_number }}" class="page-link">Previous</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Previous</a>
</li>
{% endif %}
{% for i in boards.paginator.page_range %}
{% if boards.number == i %}
<li class="page-item active">
<span class="page-link">{{ i }} <span class="sr-only">(current)</span></span>
</li>
{% else %}
<li class="page-item">
2018-02-28 16:34:10 +00:00
<a class="page-link" href="?page={{ i }}">{{ i }}</a>
2018-02-27 22:06:41 +00:00
</li>
{% endif %}
{% endfor %}
2018-02-28 16:34:10 +00:00
{% if boards.has_next %}
2018-02-27 22:06:41 +00:00
<li class="page-item">
<a href="?page={{ boards.next_page_number }}" class="page-link">Next</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Next</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
</div>
{% endblock %}