]> git.lizzy.rs Git - cheatdb.git/blobdiff - app/templates/macros/threads.html
Add ability for moderators to delete comments
[cheatdb.git] / app / templates / macros / threads.html
index f9f298a5f7e49b9e3d09771ede1b76f152f87320..32acbc4c7625b7356ea8bc16ab3632ddcb4ff043 100644 (file)
                                </div>
 
                                <div class="card-body">
+                                       {% if r != thread.replies[0] and thread.checkPerm(current_user, "DELETE_REPLY") %}
+                                               <a class="float-right btn btn-secondary btn-sm"
+                                                               href="{{ url_for('threads.delete_reply', id=thread.id, reply=r.id) }}">
+                                                       <i class="fas fa-trash"></i>
+                                               </a>
+                                       {% endif %}
+
                                        {{ r.comment | markdown }}
                                </div>
                        </div>