##// 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 1 {% extends "boards/base.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 12 <title>{{ tag.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 }}" />
19 19 {% endif %}
20 20 {% if next_page_link %}
21 21 <link rel="next" href="{{ next_page_link }}" />
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.text }}</div>
35 35 <div>{% trans 'Related message' %}: <a href="{{ banner.post.get_absolute_url }}">>>{{ 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.images.first %}
44 44 <a href="{{ random_image_post.get_absolute_url }}"><img
45 45 src="{{ image.image.url_200x150 }}"
46 46 width="{{ image.pre_width }}"
47 height="{{ image.pre_height }}"/></a>
47 height="{{ image.pre_height }}"
48 alt="{{ random_image_post.id }}"/></a>
48 49 {% endwith %}
49 50 </div>
50 51 {% endif %}
51 52 <div class="tag-text-data">
52 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 60 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
54 61 {% if is_favorite %}
55 62 <button name="method" value="unsubscribe" class="fav"></button>
56 63 {% else %}
57 64 <button name="method" value="subscribe" class="not_fav"></button>
58 65 {% endif %}
59 66 </form>
60 67 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
61 68 {% if is_hidden %}
62 69 <button name="method" value="unhide" class="fav">H</button>
63 70 {% else %}
64 71 <button name="method" value="hide" class="not_fav">H</button>
65 72 {% endif %}
66 73 </form>
67 /{{ tag.get_view|safe }}/
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>
74 </p>
72 75 {% if tag.get_description %}
73 76 <p>{{ tag.get_description|safe }}</p>
74 77 {% endif %}
75 78 <p>
76 79 {% with active_count=tag.get_active_thread_count bumplimit_count=tag.get_bumplimit_thread_count archived_count=tag.get_archived_thread_count %}
77 80 {% if active_count %}
78 81 {% blocktrans count count=active_count %}{{ count }} active thread{% plural %}active threads{% endblocktrans %},
79 82 {% endif %}
80 83 {% if bumplimit_count %}
81 84 {% blocktrans count count=bumplimit_count %}{{ count }} thread in bumplimit{% plural %} threads in bumplimit{% endblocktrans %},
82 85 {% endif %}
83 86 {% if archived_count %}
84 87 {% blocktrans count count=archived_count %}{{ count }} archived thread{% plural %}archived threads{% endblocktrans %},
85 88 {% endif %}
86 89 {% endwith %}
87 90 {% blocktrans count count=tag.get_post_count %}{{ count }} message{% plural %}messages{% endblocktrans %}.
88 91 </p>
89 92 {% if tag.get_all_parents %}
90 93 <p>
91 94 {% for parent in tag.get_all_parents %}
92 95 {{ parent.get_view|safe }} &gt;
93 96 {% endfor %}
94 97 {{ tag.get_view|safe }}
95 98 </p>
96 99 {% endif %}
97 100 </div>
98 101 </div>
99 102 {% endif %}
100 103
101 104 {% if threads %}
102 105 {% if prev_page_link %}
103 106 <div class="page_link">
104 107 <a href="{{ prev_page_link }}">{% trans "Previous page" %}</a>
105 108 </div>
106 109 {% endif %}
107 110
108 111 {% for thread in threads %}
109 112 <div class="thread">
110 113 {% post_view thread.get_opening_post thread=thread truncated=True need_open_link=True %}
111 114 {% if not thread.archived %}
112 115 {% with last_replies=thread.get_last_replies %}
113 116 {% if last_replies %}
114 117 {% with skipped_replies_count=thread.get_skipped_replies_count %}
115 118 {% if skipped_replies_count %}
116 119 <div class="skipped_replies">
117 120 <a href="{% url 'thread' thread.get_opening_post_id %}">
118 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 122 </a>
120 123 </div>
121 124 {% endif %}
122 125 {% endwith %}
123 126 <div class="last-replies">
124 127 {% for post in last_replies %}
125 128 {% post_view post truncated=True %}
126 129 {% endfor %}
127 130 </div>
128 131 {% endif %}
129 132 {% endwith %}
130 133 {% endif %}
131 134 </div>
132 135 {% endfor %}
133 136
134 137 {% if next_page_link %}
135 138 <div class="page_link">
136 139 <a href="{{ next_page_link }}">{% trans "Next page" %}</a>
137 140 </div>
138 141 {% endif %}
139 142 {% else %}
140 143 <div class="post">
141 144 {% trans 'No threads exist. Create the first one!' %}</div>
142 145 {% endif %}
143 146
144 147 <div class="post-form-w">
145 148 <script src="{% static 'js/panel.js' %}"></script>
146 149 <div class="post-form">
147 150 <div class="form-title">{% trans "Create new thread" %}</div>
148 151 <div class="swappable-form-full">
149 152 <form enctype="multipart/form-data" method="post" id="form">{% csrf_token %}
150 153 {{ form.as_div }}
151 154 <div class="form-submit">
152 155 <input type="submit" value="{% trans "Post" %}"/>
153 156 <button id="preview-button" onclick="return false;">{% trans 'Preview' %}</button>
154 157 </div>
155 158 </form>
156 159 </div>
157 160 <div>
158 161 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
159 162 {% with size=max_file_size|filesizeformat %}
160 163 {% blocktrans %}Max file size is {{ size }}.{% endblocktrans %}
161 164 {% endwith %}
162 165 </div>
163 166 <div id="preview-text"></div>
164 167 <div><a href="{% url "staticpage" name="help" %}">{% trans 'Text syntax' %}</a></div>
165 168 <div><a href="{% url "tags" "required" %}">{% trans 'Tags' %}</a></div>
166 169 </div>
167 170 </div>
168 171
169 172 <script src="{% static 'js/form.js' %}"></script>
170 173 <script src="{% static 'js/thread_create.js' %}"></script>
171 174
172 175 {% endblock %}
173 176
174 177 {% block metapanel %}
175 178
176 179 <span class="metapanel">
177 180 <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b>
178 181 {% trans "Pages:" %}
179 182 [
180 183 {% with dividers=paginator.get_dividers %}
181 184 {% for page in paginator.get_divided_range %}
182 185 {% if page in dividers %}
183 186 …,
184 187 {% endif %}
185 188 <a
186 189 {% ifequal page current_page.number %}
187 190 class="current_page"
188 191 {% endifequal %}
189 192 href="{% page_url paginator page %}">{{ page }}</a>
190 193 {% if not forloop.last %},{% endif %}
191 194 {% endfor %}
192 195 {% endwith %}
193 196 ]
194 197 </span>
195 198
196 199 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now