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