##// END OF EJS Templates
Show link to required tags list in the thread creation form
neko259 -
r1070:d6e7cfd5 default
parent child Browse files
Show More
@@ -1,191 +1,195 b''
1 {% extends "boards/base.html" %}
1 {% extends "boards/base.html" %}
2
2
3 {% load i18n %}
3 {% load i18n %}
4 {% load cache %}
4 {% load cache %}
5 {% load board %}
5 {% load board %}
6 {% load static %}
6 {% load static %}
7 {% load tz %}
7 {% load tz %}
8
8
9 {% block head %}
9 {% block head %}
10 <meta name="robots" content="noindex">
10 <meta name="robots" content="noindex">
11
11
12 {% if tag %}
12 {% if tag %}
13 <title>{{ tag.name }} - {{ site_name }}</title>
13 <title>{{ tag.name }} - {{ site_name }}</title>
14 {% else %}
14 {% else %}
15 <title>{{ site_name }}</title>
15 <title>{{ site_name }}</title>
16 {% endif %}
16 {% endif %}
17
17
18 {% if current_page.has_previous %}
18 {% if current_page.has_previous %}
19 <link rel="prev" href="
19 <link rel="prev" href="
20 {% if tag %}
20 {% if tag %}
21 {% url "tag" tag_name=tag.name page=current_page.previous_page_number %}
21 {% url "tag" tag_name=tag.name page=current_page.previous_page_number %}
22 {% else %}
22 {% else %}
23 {% url "index" page=current_page.previous_page_number %}
23 {% url "index" page=current_page.previous_page_number %}
24 {% endif %}
24 {% endif %}
25 " />
25 " />
26 {% endif %}
26 {% endif %}
27 {% if current_page.has_next %}
27 {% if current_page.has_next %}
28 <link rel="next" href="
28 <link rel="next" href="
29 {% if tag %}
29 {% if tag %}
30 {% url "tag" tag_name=tag.name page=current_page.next_page_number %}
30 {% url "tag" tag_name=tag.name page=current_page.next_page_number %}
31 {% else %}
31 {% else %}
32 {% url "index" page=current_page.next_page_number %}
32 {% url "index" page=current_page.next_page_number %}
33 {% endif %}
33 {% endif %}
34 " />
34 " />
35 {% endif %}
35 {% endif %}
36
36
37 {% endblock %}
37 {% endblock %}
38
38
39 {% block content %}
39 {% block content %}
40
40
41 {% get_current_language as LANGUAGE_CODE %}
41 {% get_current_language as LANGUAGE_CODE %}
42 {% get_current_timezone as TIME_ZONE %}
42 {% get_current_timezone as TIME_ZONE %}
43
43
44 {% if tag %}
44 {% if tag %}
45 <div class="tag_info">
45 <div class="tag_info">
46 <h2>
46 <h2>
47 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
47 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
48 {% if is_favorite %}
48 {% if is_favorite %}
49 <button name="method" value="unsubscribe" class="fav">β˜…</button>
49 <button name="method" value="unsubscribe" class="fav">β˜…</button>
50 {% else %}
50 {% else %}
51 <button name="method" value="subscribe" class="not_fav">β˜…</button>
51 <button name="method" value="subscribe" class="not_fav">β˜…</button>
52 {% endif %}
52 {% endif %}
53 </form>
53 </form>
54 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
54 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
55 {% if is_hidden %}
55 {% if is_hidden %}
56 <button name="method" value="unhide" class="fav">H</button>
56 <button name="method" value="unhide" class="fav">H</button>
57 {% else %}
57 {% else %}
58 <button name="method" value="hide" class="not_fav">H</button>
58 <button name="method" value="hide" class="not_fav">H</button>
59 {% endif %}
59 {% endif %}
60 </form>
60 </form>
61 {% autoescape off %}
61 {% autoescape off %}
62 {{ tag.get_view }}
62 {{ tag.get_view }}
63 {% endautoescape %}
63 {% endautoescape %}
64 {% if moderator %}
64 {% if moderator %}
65 <span class="moderator_info">[<a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a>]</span>
65 <span class="moderator_info">[<a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a>]</span>
66 {% endif %}
66 {% endif %}
67 </h2>
67 </h2>
68 <p>{% blocktrans with thread_count=tag.get_thread_count post_count=tag.get_post_count %}This tag has {{ thread_count }} threads and {{ post_count }} posts.{% endblocktrans %}</p>
68 <p>{% blocktrans with thread_count=tag.get_thread_count post_count=tag.get_post_count %}This tag has {{ thread_count }} threads and {{ post_count }} posts.{% endblocktrans %}</p>
69 </div>
69 </div>
70 {% endif %}
70 {% endif %}
71
71
72 {% if threads %}
72 {% if threads %}
73 {% if current_page.has_previous %}
73 {% if current_page.has_previous %}
74 <div class="page_link">
74 <div class="page_link">
75 <a href="
75 <a href="
76 {% if tag %}
76 {% if tag %}
77 {% url "tag" tag_name=tag.name page=current_page.previous_page_number %}
77 {% url "tag" tag_name=tag.name page=current_page.previous_page_number %}
78 {% else %}
78 {% else %}
79 {% url "index" page=current_page.previous_page_number %}
79 {% url "index" page=current_page.previous_page_number %}
80 {% endif %}
80 {% endif %}
81 ">{% trans "Previous page" %}</a>
81 ">{% trans "Previous page" %}</a>
82 </div>
82 </div>
83 {% endif %}
83 {% endif %}
84
84
85 {% for thread in threads %}
85 {% for thread in threads %}
86 {% cache 600 thread_short thread.id thread.last_edit_time moderator LANGUAGE_CODE TIME_ZONE %}
86 {% cache 600 thread_short thread.id thread.last_edit_time moderator LANGUAGE_CODE TIME_ZONE %}
87 <div class="thread">
87 <div class="thread">
88 {% post_view thread.get_opening_post moderator is_opening=True thread=thread truncated=True need_open_link=True %}
88 {% post_view thread.get_opening_post moderator is_opening=True thread=thread truncated=True need_open_link=True %}
89 {% if not thread.archived %}
89 {% if not thread.archived %}
90 {% with last_replies=thread.get_last_replies %}
90 {% with last_replies=thread.get_last_replies %}
91 {% if last_replies %}
91 {% if last_replies %}
92 {% with skipped_replies_count=thread.get_skipped_replies_count %}
92 {% with skipped_replies_count=thread.get_skipped_replies_count %}
93 {% if skipped_replies_count %}
93 {% if skipped_replies_count %}
94 <div class="skipped_replies">
94 <div class="skipped_replies">
95 <a href="{% url 'thread' thread.get_opening_post_id %}">
95 <a href="{% url 'thread' thread.get_opening_post_id %}">
96 {% blocktrans with count=skipped_replies_count %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
96 {% blocktrans with count=skipped_replies_count %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
97 </a>
97 </a>
98 </div>
98 </div>
99 {% endif %}
99 {% endif %}
100 {% endwith %}
100 {% endwith %}
101 <div class="last-replies">
101 <div class="last-replies">
102 {% for post in last_replies %}
102 {% for post in last_replies %}
103 {% post_view post is_opening=False moderator=moderator truncated=True %}
103 {% post_view post is_opening=False moderator=moderator truncated=True %}
104 {% endfor %}
104 {% endfor %}
105 </div>
105 </div>
106 {% endif %}
106 {% endif %}
107 {% endwith %}
107 {% endwith %}
108 {% endif %}
108 {% endif %}
109 </div>
109 </div>
110 {% endcache %}
110 {% endcache %}
111 {% endfor %}
111 {% endfor %}
112
112
113 {% if current_page.has_next %}
113 {% if current_page.has_next %}
114 <div class="page_link">
114 <div class="page_link">
115 <a href="
115 <a href="
116 {% if tag %}
116 {% if tag %}
117 {% url "tag" tag_name=tag.name page=current_page.next_page_number %}
117 {% url "tag" tag_name=tag.name page=current_page.next_page_number %}
118 {% else %}
118 {% else %}
119 {% url "index" page=current_page.next_page_number %}
119 {% url "index" page=current_page.next_page_number %}
120 {% endif %}
120 {% endif %}
121 ">{% trans "Next page" %}</a>
121 ">{% trans "Next page" %}</a>
122 </div>
122 </div>
123 {% endif %}
123 {% endif %}
124 {% else %}
124 {% else %}
125 <div class="post">
125 <div class="post">
126 {% trans 'No threads exist. Create the first one!' %}</div>
126 {% trans 'No threads exist. Create the first one!' %}</div>
127 {% endif %}
127 {% endif %}
128
128
129 <div class="post-form-w">
129 <div class="post-form-w">
130 <script src="{% static 'js/panel.js' %}"></script>
130 <script src="{% static 'js/panel.js' %}"></script>
131 <div class="post-form">
131 <div class="post-form">
132 <div class="form-title">{% trans "Create new thread" %}</div>
132 <div class="form-title">{% trans "Create new thread" %}</div>
133 <div class="swappable-form-full">
133 <div class="swappable-form-full">
134 <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %}
134 <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %}
135 {{ form.as_div }}
135 {{ form.as_div }}
136 <div class="form-submit">
136 <div class="form-submit">
137 <input type="submit" value="{% trans "Post" %}"/>
137 <input type="submit" value="{% trans "Post" %}"/>
138 </div>
138 </div>
139 </form>
139 </form>
140 </div>
140 </div>
141 <div>
141 <div>
142 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
142 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
143 </div>
143 </div>
144 <div><a href="{% url "staticpage" name="help" %}">
144 <div>
145 {% trans 'Text syntax' %}</a></div>
145 <a href="{% url "staticpage" name="help" %}">{% trans 'Text syntax' %}</a>
146 </div>
147 <div>
148 <a href="{% url "tags" "required" %}">{% trans 'Tags' %}</a>
149 </div>
146 </div>
150 </div>
147 </div>
151 </div>
148
152
149 <script src="{% static 'js/form.js' %}"></script>
153 <script src="{% static 'js/form.js' %}"></script>
150
154
151 {% endblock %}
155 {% endblock %}
152
156
153 {% block metapanel %}
157 {% block metapanel %}
154
158
155 <span class="metapanel">
159 <span class="metapanel">
156 <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b>
160 <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b>
157 {% trans "Pages:" %}
161 {% trans "Pages:" %}
158 <a href="
162 <a href="
159 {% if tag %}
163 {% if tag %}
160 {% url "tag" tag_name=tag.name page=paginator.page_range|first %}
164 {% url "tag" tag_name=tag.name page=paginator.page_range|first %}
161 {% else %}
165 {% else %}
162 {% url "index" page=paginator.page_range|first %}
166 {% url "index" page=paginator.page_range|first %}
163 {% endif %}
167 {% endif %}
164 ">&lt;&lt;</a>
168 ">&lt;&lt;</a>
165 [
169 [
166 {% for page in paginator.center_range %}
170 {% for page in paginator.center_range %}
167 <a
171 <a
168 {% ifequal page current_page.number %}
172 {% ifequal page current_page.number %}
169 class="current_page"
173 class="current_page"
170 {% endifequal %}
174 {% endifequal %}
171 href="
175 href="
172 {% if tag %}
176 {% if tag %}
173 {% url "tag" tag_name=tag.name page=page %}
177 {% url "tag" tag_name=tag.name page=page %}
174 {% else %}
178 {% else %}
175 {% url "index" page=page %}
179 {% url "index" page=page %}
176 {% endif %}
180 {% endif %}
177 ">{{ page }}</a>
181 ">{{ page }}</a>
178 {% if not forloop.last %},{% endif %}
182 {% if not forloop.last %},{% endif %}
179 {% endfor %}
183 {% endfor %}
180 ]
184 ]
181 <a href="
185 <a href="
182 {% if tag %}
186 {% if tag %}
183 {% url "tag" tag_name=tag.name page=paginator.page_range|last %}
187 {% url "tag" tag_name=tag.name page=paginator.page_range|last %}
184 {% else %}
188 {% else %}
185 {% url "index" page=paginator.page_range|last %}
189 {% url "index" page=paginator.page_range|last %}
186 {% endif %}
190 {% endif %}
187 ">&gt;&gt;</a>
191 ">&gt;&gt;</a>
188 [<a href="rss/">RSS</a>]
192 [<a href="rss/">RSS</a>]
189 </span>
193 </span>
190
194
191 {% endblock %}
195 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now