about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--templates/index.html10
-rw-r--r--templates/thread.html6
2 files changed, 15 insertions, 1 deletions
diff --git a/templates/index.html b/templates/index.html
index 7151c3390c54..20932b27622b 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -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">
diff --git a/templates/thread.html b/templates/thread.html
index 28ccd79d252c..295cf8fcdc1d 100644
--- a/templates/thread.html
+++ b/templates/thread.html
@@ -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>