##// END OF EJS Templates
Tag buttons on the separate line
neko259 -
r1409:f6d5c409 default
parent child Browse files
Show More
@@ -1,196 +1,199 b''
1 {% extends "boards/base.html" %}
1 {% extends "boards/base.html" %}
2
2
3 {% load i18n %}
3 {% load i18n %}
4 {% load board %}
4 {% load board %}
5 {% load static %}
5 {% load static %}
6 {% load tz %}
6 {% load tz %}
7
7
8 {% block head %}
8 {% block head %}
9 <meta name="robots" content="noindex">
9 <meta name="robots" content="noindex">
10
10
11 {% if tag %}
11 {% if tag %}
12 <title>{{ tag.name }} - {{ site_name }}</title>
12 <title>{{ tag.name }} - {{ site_name }}</title>
13 {% else %}
13 {% else %}
14 <title>{{ site_name }}</title>
14 <title>{{ site_name }}</title>
15 {% endif %}
15 {% endif %}
16
16
17 {% if prev_page_link %}
17 {% if prev_page_link %}
18 <link rel="prev" href="{{ prev_page_link }}" />
18 <link rel="prev" href="{{ prev_page_link }}" />
19 {% endif %}
19 {% endif %}
20 {% if next_page_link %}
20 {% if next_page_link %}
21 <link rel="next" href="{{ next_page_link }}" />
21 <link rel="next" href="{{ next_page_link }}" />
22 {% endif %}
22 {% endif %}
23
23
24 {% endblock %}
24 {% endblock %}
25
25
26 {% block content %}
26 {% block content %}
27
27
28 {% get_current_language as LANGUAGE_CODE %}
28 {% get_current_language as LANGUAGE_CODE %}
29 {% get_current_timezone as TIME_ZONE %}
29 {% get_current_timezone as TIME_ZONE %}
30
30
31 {% for banner in banners %}
31 {% for banner in banners %}
32 <div class="post">
32 <div class="post">
33 <div class="title">{{ banner.title }}</div>
33 <div class="title">{{ banner.title }}</div>
34 <div>{{ banner.text }}</div>
34 <div>{{ banner.text }}</div>
35 <div>{% trans 'Related message' %}: <a href="{{ banner.post.get_absolute_url }}">>>{{ banner.post.id }}</a></div>
35 <div>{% trans 'Related message' %}: <a href="{{ banner.post.get_absolute_url }}">>>{{ banner.post.id }}</a></div>
36 </div>
36 </div>
37 {% endfor %}
37 {% endfor %}
38
38
39 {% if tag %}
39 {% if tag %}
40 <div class="tag_info" style="border-bottom: solid .5ex #{{ tag.get_color }}">
40 <div class="tag_info" style="border-bottom: solid .5ex #{{ tag.get_color }}">
41 {% if random_image_post %}
41 {% if random_image_post %}
42 <div class="tag-image">
42 <div class="tag-image">
43 {% with image=random_image_post.images.first %}
43 {% with image=random_image_post.images.first %}
44 <a href="{{ random_image_post.get_absolute_url }}"><img
44 <a href="{{ random_image_post.get_absolute_url }}"><img
45 src="{{ image.image.url_200x150 }}"
45 src="{{ image.image.url_200x150 }}"
46 width="{{ image.pre_width }}"
46 width="{{ image.pre_width }}"
47 height="{{ image.pre_height }}"/></a>
47 height="{{ image.pre_height }}"
48 alt="{{ random_image_post.id }}"/></a>
48 {% endwith %}
49 {% endwith %}
49 </div>
50 </div>
50 {% endif %}
51 {% endif %}
51 <div class="tag-text-data">
52 <div class="tag-text-data">
52 <h2>
53 <h2>
54 /{{ tag.get_view|safe }}/
55 {% if perms.change_tag %}
56 <span class="moderator_info">| <a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a></span>
57 {% endif %}
58 </h2>
59 <p>
53 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
60 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
54 {% if is_favorite %}
61 {% if is_favorite %}
55 <button name="method" value="unsubscribe" class="fav"></button>
62 <button name="method" value="unsubscribe" class="fav"></button>
56 {% else %}
63 {% else %}
57 <button name="method" value="subscribe" class="not_fav"></button>
64 <button name="method" value="subscribe" class="not_fav"></button>
58 {% endif %}
65 {% endif %}
59 </form>
66 </form>
60 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
67 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
61 {% if is_hidden %}
68 {% if is_hidden %}
62 <button name="method" value="unhide" class="fav">H</button>
69 <button name="method" value="unhide" class="fav">H</button>
63 {% else %}
70 {% else %}
64 <button name="method" value="hide" class="not_fav">H</button>
71 <button name="method" value="hide" class="not_fav">H</button>
65 {% endif %}
72 {% endif %}
66 </form>
73 </form>
67 /{{ tag.get_view|safe }}/
74 </p>
68 {% if perms.change_tag %}
69 <span class="moderator_info">| <a href="{% url 'admin:boards_tag_change' tag.id %}">{% trans 'Edit tag' %}</a></span>
70 {% endif %}
71 </h2>
72 {% if tag.get_description %}
75 {% if tag.get_description %}
73 <p>{{ tag.get_description|safe }}</p>
76 <p>{{ tag.get_description|safe }}</p>
74 {% endif %}
77 {% endif %}
75 <p>
78 <p>
76 {% with active_count=tag.get_active_thread_count bumplimit_count=tag.get_bumplimit_thread_count archived_count=tag.get_archived_thread_count %}
79 {% with active_count=tag.get_active_thread_count bumplimit_count=tag.get_bumplimit_thread_count archived_count=tag.get_archived_thread_count %}
77 {% if active_count %}
80 {% if active_count %}
78 {% blocktrans count count=active_count %}{{ count }} active thread{% plural %}active threads{% endblocktrans %},
81 {% blocktrans count count=active_count %}{{ count }} active thread{% plural %}active threads{% endblocktrans %},
79 {% endif %}
82 {% endif %}
80 {% if bumplimit_count %}
83 {% if bumplimit_count %}
81 {% blocktrans count count=bumplimit_count %}{{ count }} thread in bumplimit{% plural %} threads in bumplimit{% endblocktrans %},
84 {% blocktrans count count=bumplimit_count %}{{ count }} thread in bumplimit{% plural %} threads in bumplimit{% endblocktrans %},
82 {% endif %}
85 {% endif %}
83 {% if archived_count %}
86 {% if archived_count %}
84 {% blocktrans count count=archived_count %}{{ count }} archived thread{% plural %}archived threads{% endblocktrans %},
87 {% blocktrans count count=archived_count %}{{ count }} archived thread{% plural %}archived threads{% endblocktrans %},
85 {% endif %}
88 {% endif %}
86 {% endwith %}
89 {% endwith %}
87 {% blocktrans count count=tag.get_post_count %}{{ count }} message{% plural %}messages{% endblocktrans %}.
90 {% blocktrans count count=tag.get_post_count %}{{ count }} message{% plural %}messages{% endblocktrans %}.
88 </p>
91 </p>
89 {% if tag.get_all_parents %}
92 {% if tag.get_all_parents %}
90 <p>
93 <p>
91 {% for parent in tag.get_all_parents %}
94 {% for parent in tag.get_all_parents %}
92 {{ parent.get_view|safe }} &gt;
95 {{ parent.get_view|safe }} &gt;
93 {% endfor %}
96 {% endfor %}
94 {{ tag.get_view|safe }}
97 {{ tag.get_view|safe }}
95 </p>
98 </p>
96 {% endif %}
99 {% endif %}
97 </div>
100 </div>
98 </div>
101 </div>
99 {% endif %}
102 {% endif %}
100
103
101 {% if threads %}
104 {% if threads %}
102 {% if prev_page_link %}
105 {% if prev_page_link %}
103 <div class="page_link">
106 <div class="page_link">
104 <a href="{{ prev_page_link }}">{% trans "Previous page" %}</a>
107 <a href="{{ prev_page_link }}">{% trans "Previous page" %}</a>
105 </div>
108 </div>
106 {% endif %}
109 {% endif %}
107
110
108 {% for thread in threads %}
111 {% for thread in threads %}
109 <div class="thread">
112 <div class="thread">
110 {% post_view thread.get_opening_post thread=thread truncated=True need_open_link=True %}
113 {% post_view thread.get_opening_post thread=thread truncated=True need_open_link=True %}
111 {% if not thread.archived %}
114 {% if not thread.archived %}
112 {% with last_replies=thread.get_last_replies %}
115 {% with last_replies=thread.get_last_replies %}
113 {% if last_replies %}
116 {% if last_replies %}
114 {% with skipped_replies_count=thread.get_skipped_replies_count %}
117 {% with skipped_replies_count=thread.get_skipped_replies_count %}
115 {% if skipped_replies_count %}
118 {% if skipped_replies_count %}
116 <div class="skipped_replies">
119 <div class="skipped_replies">
117 <a href="{% url 'thread' thread.get_opening_post_id %}">
120 <a href="{% url 'thread' thread.get_opening_post_id %}">
118 {% blocktrans count count=skipped_replies_count %}Skipped {{ count }} reply. Open thread to see all replies.{% plural %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
121 {% blocktrans count count=skipped_replies_count %}Skipped {{ count }} reply. Open thread to see all replies.{% plural %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
119 </a>
122 </a>
120 </div>
123 </div>
121 {% endif %}
124 {% endif %}
122 {% endwith %}
125 {% endwith %}
123 <div class="last-replies">
126 <div class="last-replies">
124 {% for post in last_replies %}
127 {% for post in last_replies %}
125 {% post_view post truncated=True %}
128 {% post_view post truncated=True %}
126 {% endfor %}
129 {% endfor %}
127 </div>
130 </div>
128 {% endif %}
131 {% endif %}
129 {% endwith %}
132 {% endwith %}
130 {% endif %}
133 {% endif %}
131 </div>
134 </div>
132 {% endfor %}
135 {% endfor %}
133
136
134 {% if next_page_link %}
137 {% if next_page_link %}
135 <div class="page_link">
138 <div class="page_link">
136 <a href="{{ next_page_link }}">{% trans "Next page" %}</a>
139 <a href="{{ next_page_link }}">{% trans "Next page" %}</a>
137 </div>
140 </div>
138 {% endif %}
141 {% endif %}
139 {% else %}
142 {% else %}
140 <div class="post">
143 <div class="post">
141 {% trans 'No threads exist. Create the first one!' %}</div>
144 {% trans 'No threads exist. Create the first one!' %}</div>
142 {% endif %}
145 {% endif %}
143
146
144 <div class="post-form-w">
147 <div class="post-form-w">
145 <script src="{% static 'js/panel.js' %}"></script>
148 <script src="{% static 'js/panel.js' %}"></script>
146 <div class="post-form">
149 <div class="post-form">
147 <div class="form-title">{% trans "Create new thread" %}</div>
150 <div class="form-title">{% trans "Create new thread" %}</div>
148 <div class="swappable-form-full">
151 <div class="swappable-form-full">
149 <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %}
152 <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %}
150 {{ form.as_div }}
153 {{ form.as_div }}
151 <div class="form-submit">
154 <div class="form-submit">
152 <input type="submit" value="{% trans "Post" %}"/>
155 <input type="submit" value="{% trans "Post" %}"/>
153 <button id="preview-button" onclick="return false;">{% trans 'Preview' %}</button>
156 <button id="preview-button" onclick="return false;">{% trans 'Preview' %}</button>
154 </div>
157 </div>
155 </form>
158 </form>
156 </div>
159 </div>
157 <div>
160 <div>
158 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
161 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
159 {% with size=max_file_size|filesizeformat %}
162 {% with size=max_file_size|filesizeformat %}
160 {% blocktrans %}Max file size is {{ size }}.{% endblocktrans %}
163 {% blocktrans %}Max file size is {{ size }}.{% endblocktrans %}
161 {% endwith %}
164 {% endwith %}
162 </div>
165 </div>
163 <div id="preview-text"></div>
166 <div id="preview-text"></div>
164 <div><a href="{% url "staticpage" name="help" %}">{% trans 'Text syntax' %}</a></div>
167 <div><a href="{% url "staticpage" name="help" %}">{% trans 'Text syntax' %}</a></div>
165 <div><a href="{% url "tags" "required" %}">{% trans 'Tags' %}</a></div>
168 <div><a href="{% url "tags" "required" %}">{% trans 'Tags' %}</a></div>
166 </div>
169 </div>
167 </div>
170 </div>
168
171
169 <script src="{% static 'js/form.js' %}"></script>
172 <script src="{% static 'js/form.js' %}"></script>
170 <script src="{% static 'js/thread_create.js' %}"></script>
173 <script src="{% static 'js/thread_create.js' %}"></script>
171
174
172 {% endblock %}
175 {% endblock %}
173
176
174 {% block metapanel %}
177 {% block metapanel %}
175
178
176 <span class="metapanel">
179 <span class="metapanel">
177 <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b>
180 <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b>
178 {% trans "Pages:" %}
181 {% trans "Pages:" %}
179 [
182 [
180 {% with dividers=paginator.get_dividers %}
183 {% with dividers=paginator.get_dividers %}
181 {% for page in paginator.get_divided_range %}
184 {% for page in paginator.get_divided_range %}
182 {% if page in dividers %}
185 {% if page in dividers %}
183 …,
186 …,
184 {% endif %}
187 {% endif %}
185 <a
188 <a
186 {% ifequal page current_page.number %}
189 {% ifequal page current_page.number %}
187 class="current_page"
190 class="current_page"
188 {% endifequal %}
191 {% endifequal %}
189 href="{% page_url paginator page %}">{{ page }}</a>
192 href="{% page_url paginator page %}">{{ page }}</a>
190 {% if not forloop.last %},{% endif %}
193 {% if not forloop.last %},{% endif %}
191 {% endfor %}
194 {% endfor %}
192 {% endwith %}
195 {% endwith %}
193 ]
196 ]
194 </span>
197 </span>
195
198
196 {% endblock %}
199 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now