feat(templates): Add indicators for closed threads
This commit is contained in:
parent
871093a973
commit
1ec31e8c45
2 changed files with 15 additions and 1 deletions
|
@ -46,7 +46,15 @@
|
|||
<a class="thread-link mdl-color-text--grey-800" href="/thread/{{ thread.id }}">
|
||||
<span class="mdl-list__item-primary-content {% if loop.index < threads.len() %}thread-divider{% endif %}">
|
||||
<button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored mdl-list__item-icon">
|
||||
<i class="material-icons">{% if thread.sticky %}announcement{% else %}library_books{% endif %}</i>
|
||||
<i class="material-icons">
|
||||
{% if thread.sticky %}
|
||||
announcement
|
||||
{% else if thread.closed %}
|
||||
lock
|
||||
{% else %}
|
||||
library_books
|
||||
{% endif %}
|
||||
</i>
|
||||
</button>
|
||||
<span class="thread-title">{{ thread.title }}<span class="thread-author"> by {{ thread.author_name }}</span></span>
|
||||
<span class="mdl-list__item-text-body">
|
||||
|
|
|
@ -78,6 +78,11 @@
|
|||
<!-- section for writing a response on the same page -->
|
||||
<section id="post-reply" class="section--center mdl-grid mdl-grid--no-spacing reply-box">
|
||||
<div class="mdl-card mdl-shadow--2dp mdl-cell--12-col">
|
||||
{% if closed %}
|
||||
<div class="mdl-card__supporting-text">
|
||||
This thread is <b>closed</b> and can no longer be responded to.
|
||||
</div>
|
||||
{% else %}
|
||||
<form id="reply-form" action="/thread/reply" method="post">
|
||||
<input type="hidden" id="thread_id" name="thread_id" value="{{ id }}">
|
||||
|
||||
|
@ -91,6 +96,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
|
Loading…
Add table
Reference in a new issue