diff --git a/boards/templates/boards/thread.html b/boards/templates/boards/thread.html --- a/boards/templates/boards/thread.html +++ b/boards/templates/boards/thread.html @@ -4,7 +4,6 @@ {% load cache %} {% load static from staticfiles %} {% load board %} -{% load compress %} {% block head %} {{ opening_post.get_title|striptags|truncatewords:10 }} @@ -35,50 +34,43 @@ <div class="thread"> {% with can_bump=thread.can_bump %} {% for post in thread.get_replies %} - {% if forloop.first %} - {% post_view post moderator=moderator is_opening=True thread=thread can_bump=can_bump opening_post_id=opening_post.id %} - {% else %} - {% post_view post moderator=moderator is_opening=False thread=thread can_bump=can_bump opening_post_id=opening_post.id %} - {% endif %} + {% with is_opening=forloop.first %} + {% post_view post moderator=moderator is_opening=is_opening thread=thread can_bump=can_bump opening_post_id=opening_post.id %} + {% endwith %} {% endfor %} {% endwith %} </div> {% if not thread.archived %} - - <div class="post-form-w" id="form"> - <script src="{% static 'js/panel.js' %}"></script> - <div class="form-title">{% trans "Reply to thread" %} #{{ opening_post.id }}</div> - <div class="post-form" id="compact-form"> - <div class="swappable-form-full"> - <form enctype="multipart/form-data" method="post" - >{% csrf_token %} + <div class="post-form-w" id="form"> + <script src="{% static 'js/panel.js' %}"></script> + <div class="form-title">{% trans "Reply to thread" %} #{{ opening_post.id }}</div> + <div class="post-form" id="compact-form"> + <div class="swappable-form-full"> + <form enctype="multipart/form-data" method="post" + >{% csrf_token %} <div class="compact-form-text"></div> - {{ form.as_div }} - <div class="form-submit"> - <input type="submit" value="{% trans "Post" %}"/> - </div> - </form> + {{ form.as_div }} + <div class="form-submit"> + <input type="submit" value="{% trans "Post" %}"/> + </div> + </form> + </div> + <a onclick="swapForm(); return false;" href="#"> + {% trans 'Switch mode' %} + </a> + <div><a href="{% url "staticpage" name="help" %}"> + {% trans 'Text syntax' %}</a></div> </div> - <a onclick="swapForm(); return false;" href="#"> - {% trans 'Switch mode' %} - </a> - <div><a href="{% url "staticpage" name="help" %}"> - {% trans 'Text syntax' %}</a></div> </div> - </div> <script src="{% static 'js/jquery.form.min.js' %}"></script> - {% compress js %} - <script src="{% static 'js/thread_update.js' %}"></script> - <script src="{% static 'js/3party/centrifuge.js' %}"></script> - {% endcompress %} + <script src="{% static 'js/thread_update.js' %}"></script> + <script src="{% static 'js/3party/centrifuge.js' %}"></script> {% endif %} - {% compress js %} - <script src="{% static 'js/form.js' %}"></script> - <script src="{% static 'js/thread.js' %}"></script> - {% endcompress %} + <script src="{% static 'js/form.js' %}"></script> + <script src="{% static 'js/thread.js' %}"></script> {% endcache %}