##// END OF EJS Templates
Refactored thread template. Removed JS compression from it.
neko259 -
r898:6c3fa27a default
parent child Browse files
Show More
@@ -4,7 +4,6 b''
4 {% load cache %}
4 {% load cache %}
5 {% load static from staticfiles %}
5 {% load static from staticfiles %}
6 {% load board %}
6 {% load board %}
7 {% load compress %}
8
7
9 {% block head %}
8 {% block head %}
10 <title>{{ opening_post.get_title|striptags|truncatewords:10 }}
9 <title>{{ opening_post.get_title|striptags|truncatewords:10 }}
@@ -35,50 +34,43 b''
35 <div class="thread">
34 <div class="thread">
36 {% with can_bump=thread.can_bump %}
35 {% with can_bump=thread.can_bump %}
37 {% for post in thread.get_replies %}
36 {% for post in thread.get_replies %}
38 {% if forloop.first %}
37 {% with is_opening=forloop.first %}
39 {% post_view post moderator=moderator is_opening=True thread=thread can_bump=can_bump opening_post_id=opening_post.id %}
38 {% post_view post moderator=moderator is_opening=is_opening thread=thread can_bump=can_bump opening_post_id=opening_post.id %}
40 {% else %}
39 {% endwith %}
41 {% post_view post moderator=moderator is_opening=False thread=thread can_bump=can_bump opening_post_id=opening_post.id %}
42 {% endif %}
43 {% endfor %}
40 {% endfor %}
44 {% endwith %}
41 {% endwith %}
45 </div>
42 </div>
46
43
47 {% if not thread.archived %}
44 {% if not thread.archived %}
48
45 <div class="post-form-w" id="form">
49 <div class="post-form-w" id="form">
46 <script src="{% static 'js/panel.js' %}"></script>
50 <script src="{% static 'js/panel.js' %}"></script>
47 <div class="form-title">{% trans "Reply to thread" %} #{{ opening_post.id }}</div>
51 <div class="form-title">{% trans "Reply to thread" %} #{{ opening_post.id }}</div>
48 <div class="post-form" id="compact-form">
52 <div class="post-form" id="compact-form">
49 <div class="swappable-form-full">
53 <div class="swappable-form-full">
50 <form enctype="multipart/form-data" method="post"
54 <form enctype="multipart/form-data" method="post"
51 >{% csrf_token %}
55 >{% csrf_token %}
56 <div class="compact-form-text"></div>
52 <div class="compact-form-text"></div>
57 {{ form.as_div }}
53 {{ form.as_div }}
58 <div class="form-submit">
54 <div class="form-submit">
59 <input type="submit" value="{% trans "Post" %}"/>
55 <input type="submit" value="{% trans "Post" %}"/>
60 </div>
56 </div>
61 </form>
57 </form>
58 </div>
59 <a onclick="swapForm(); return false;" href="#">
60 {% trans 'Switch mode' %}
61 </a>
62 <div><a href="{% url "staticpage" name="help" %}">
63 {% trans 'Text syntax' %}</a></div>
62 </div>
64 </div>
63 <a onclick="swapForm(); return false;" href="#">
64 {% trans 'Switch mode' %}
65 </a>
66 <div><a href="{% url "staticpage" name="help" %}">
67 {% trans 'Text syntax' %}</a></div>
68 </div>
65 </div>
69 </div>
70
66
71 <script src="{% static 'js/jquery.form.min.js' %}"></script>
67 <script src="{% static 'js/jquery.form.min.js' %}"></script>
72 {% compress js %}
68 <script src="{% static 'js/thread_update.js' %}"></script>
73 <script src="{% static 'js/thread_update.js' %}"></script>
69 <script src="{% static 'js/3party/centrifuge.js' %}"></script>
74 <script src="{% static 'js/3party/centrifuge.js' %}"></script>
75 {% endcompress %}
76 {% endif %}
70 {% endif %}
77
71
78 {% compress js %}
72 <script src="{% static 'js/form.js' %}"></script>
79 <script src="{% static 'js/form.js' %}"></script>
73 <script src="{% static 'js/thread.js' %}"></script>
80 <script src="{% static 'js/thread.js' %}"></script>
81 {% endcompress %}
82
74
83 {% endcache %}
75 {% endcache %}
84
76
General Comments 0
You need to be logged in to leave comments. Login now