@@ -43,28 +43,33 @@ discard block |
||
43 | 43 | </div> |
44 | 44 | <div class="list_posts">', $post['message'], '</div>'; |
45 | 45 | |
46 | - if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) |
|
47 | - echo ' |
|
46 | + if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) { |
|
47 | + echo ' |
|
48 | 48 | <ul class="quickbuttons">'; |
49 | + } |
|
49 | 50 | |
50 | 51 | // If they *can* reply? |
51 | - if ($post['can_reply']) |
|
52 | - echo ' |
|
52 | + if ($post['can_reply']) { |
|
53 | + echo ' |
|
53 | 54 | <li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>'; |
55 | + } |
|
54 | 56 | |
55 | 57 | // If they *can* quote? |
56 | - if ($post['can_quote']) |
|
57 | - echo ' |
|
58 | + if ($post['can_quote']) { |
|
59 | + echo ' |
|
58 | 60 | <li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], ';quote=', $post['id'], '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>'; |
61 | + } |
|
59 | 62 | |
60 | 63 | // How about... even... remove it entirely?! |
61 | - if ($post['can_delete']) |
|
62 | - echo ' |
|
64 | + if ($post['can_delete']) { |
|
65 | + echo ' |
|
63 | 66 | <li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';recent;', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>'; |
67 | + } |
|
64 | 68 | |
65 | - if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) |
|
66 | - echo ' |
|
69 | + if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) { |
|
70 | + echo ' |
|
67 | 71 | </ul>'; |
72 | + } |
|
68 | 73 | |
69 | 74 | echo ' |
70 | 75 | </div>'; |
@@ -86,12 +91,13 @@ discard block |
||
86 | 91 | echo ' |
87 | 92 | <div id="recent" class="main_content">'; |
88 | 93 | |
89 | - if ($context['showCheckboxes']) |
|
90 | - echo ' |
|
94 | + if ($context['showCheckboxes']) { |
|
95 | + echo ' |
|
91 | 96 | <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;"> |
92 | 97 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
93 | 98 | <input type="hidden" name="qaction" value="markread"> |
94 | 99 | <input type="hidden" name="redirect_url" value="action=unread', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">'; |
100 | + } |
|
95 | 101 | |
96 | 102 | if (!empty($context['topics'])) |
97 | 103 | { |
@@ -120,11 +126,12 @@ discard block |
||
120 | 126 | </div>'; |
121 | 127 | |
122 | 128 | // Show a "select all" box for quick moderation? |
123 | - if ($context['showCheckboxes']) |
|
124 | - echo ' |
|
129 | + if ($context['showCheckboxes']) { |
|
130 | + echo ' |
|
125 | 131 | <div class="moderation"> |
126 | 132 | <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');"> |
127 | 133 | </div>'; |
134 | + } |
|
128 | 135 | |
129 | 136 | echo ' |
130 | 137 | </div> |
@@ -143,15 +150,18 @@ discard block |
||
143 | 150 | // Now we handle the icons |
144 | 151 | echo ' |
145 | 152 | <div class="icons floatright">'; |
146 | - if ($topic['is_locked']) |
|
147 | - echo ' |
|
153 | + if ($topic['is_locked']) { |
|
154 | + echo ' |
|
148 | 155 | <span class="generic_icons lock"></span>'; |
149 | - if ($topic['is_sticky']) |
|
150 | - echo ' |
|
156 | + } |
|
157 | + if ($topic['is_sticky']) { |
|
158 | + echo ' |
|
151 | 159 | <span class="generic_icons sticky"></span>'; |
152 | - if ($topic['is_poll']) |
|
153 | - echo ' |
|
160 | + } |
|
161 | + if ($topic['is_poll']) { |
|
162 | + echo ' |
|
154 | 163 | <span class="generic_icons poll"></span>'; |
164 | + } |
|
155 | 165 | echo ' |
156 | 166 | </div>'; |
157 | 167 | |
@@ -176,19 +186,21 @@ discard block |
||
176 | 186 | ', sprintf($txt['last_post_topic'], '<a href="' . $topic['last_post']['href'] . '">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), ' |
177 | 187 | </div>'; |
178 | 188 | |
179 | - if ($context['showCheckboxes']) |
|
180 | - echo ' |
|
189 | + if ($context['showCheckboxes']) { |
|
190 | + echo ' |
|
181 | 191 | <div class="moderation"> |
182 | 192 | <input type="checkbox" name="topics[]" value="', $topic['id'], '"> |
183 | 193 | </div>'; |
194 | + } |
|
184 | 195 | |
185 | 196 | echo ' |
186 | 197 | </div>'; |
187 | 198 | } |
188 | 199 | |
189 | - if (empty($context['topics'])) |
|
190 | - echo ' |
|
200 | + if (empty($context['topics'])) { |
|
201 | + echo ' |
|
191 | 202 | <div style="display: none;"></div>'; |
203 | + } |
|
192 | 204 | |
193 | 205 | echo ' |
194 | 206 | </div> |
@@ -203,25 +215,27 @@ discard block |
||
203 | 215 | ', $context['page_index'], ' |
204 | 216 | </div> |
205 | 217 | </div>'; |
206 | - } |
|
207 | - else |
|
208 | - echo ' |
|
218 | + } else { |
|
219 | + echo ' |
|
209 | 220 | <div class="cat_bar"> |
210 | 221 | <h3 class="catbg centertext"> |
211 | 222 | ', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], ' |
212 | 223 | </h3> |
213 | 224 | </div>'; |
225 | + } |
|
214 | 226 | |
215 | - if ($context['showCheckboxes']) |
|
216 | - echo ' |
|
227 | + if ($context['showCheckboxes']) { |
|
228 | + echo ' |
|
217 | 229 | </form>'; |
230 | + } |
|
218 | 231 | |
219 | 232 | echo ' |
220 | 233 | </div>'; |
221 | 234 | |
222 | - if (empty($context['no_topic_listing'])) |
|
223 | - template_topic_legend(); |
|
224 | -} |
|
235 | + if (empty($context['no_topic_listing'])) { |
|
236 | + template_topic_legend(); |
|
237 | + } |
|
238 | + } |
|
225 | 239 | |
226 | 240 | /** |
227 | 241 | * Template for showing unread replies (eg new replies to topics you've posted in) |
@@ -233,12 +247,13 @@ discard block |
||
233 | 247 | echo ' |
234 | 248 | <div id="recent">'; |
235 | 249 | |
236 | - if ($context['showCheckboxes']) |
|
237 | - echo ' |
|
250 | + if ($context['showCheckboxes']) { |
|
251 | + echo ' |
|
238 | 252 | <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;"> |
239 | 253 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
240 | 254 | <input type="hidden" name="qaction" value="markread"> |
241 | 255 | <input type="hidden" name="redirect_url" value="action=unreadreplies', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">'; |
256 | + } |
|
242 | 257 | |
243 | 258 | if (!empty($context['topics'])) |
244 | 259 | { |
@@ -267,11 +282,12 @@ discard block |
||
267 | 282 | </div>'; |
268 | 283 | |
269 | 284 | // Show a "select all" box for quick moderation? |
270 | - if ($context['showCheckboxes']) |
|
271 | - echo ' |
|
285 | + if ($context['showCheckboxes']) { |
|
286 | + echo ' |
|
272 | 287 | <div class="moderation"> |
273 | 288 | <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');"> |
274 | 289 | </div>'; |
290 | + } |
|
275 | 291 | |
276 | 292 | echo ' |
277 | 293 | </div> |
@@ -290,15 +306,18 @@ discard block |
||
290 | 306 | // Now we handle the icons |
291 | 307 | echo ' |
292 | 308 | <div class="icons floatright">'; |
293 | - if ($topic['is_locked']) |
|
294 | - echo ' |
|
309 | + if ($topic['is_locked']) { |
|
310 | + echo ' |
|
295 | 311 | <span class="generic_icons lock"></span>'; |
296 | - if ($topic['is_sticky']) |
|
297 | - echo ' |
|
312 | + } |
|
313 | + if ($topic['is_sticky']) { |
|
314 | + echo ' |
|
298 | 315 | <span class="generic_icons sticky"></span>'; |
299 | - if ($topic['is_poll']) |
|
300 | - echo ' |
|
316 | + } |
|
317 | + if ($topic['is_poll']) { |
|
318 | + echo ' |
|
301 | 319 | <span class="generic_icons poll"></span>'; |
320 | + } |
|
302 | 321 | echo ' |
303 | 322 | </div>'; |
304 | 323 | |
@@ -323,11 +342,12 @@ discard block |
||
323 | 342 | ', sprintf($txt['last_post_topic'], '<a href="' . $topic['last_post']['href'] . '">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), ' |
324 | 343 | </div>'; |
325 | 344 | |
326 | - if ($context['showCheckboxes']) |
|
327 | - echo ' |
|
345 | + if ($context['showCheckboxes']) { |
|
346 | + echo ' |
|
328 | 347 | <div class="moderation"> |
329 | 348 | <input type="checkbox" name="topics[]" value="', $topic['id'], '"> |
330 | 349 | </div>'; |
350 | + } |
|
331 | 351 | echo ' |
332 | 352 | </div>'; |
333 | 353 | } |
@@ -343,24 +363,26 @@ discard block |
||
343 | 363 | ', $context['page_index'], ' |
344 | 364 | </div> |
345 | 365 | </div>'; |
346 | - } |
|
347 | - else |
|
348 | - echo ' |
|
366 | + } else { |
|
367 | + echo ' |
|
349 | 368 | <div class="cat_bar"> |
350 | 369 | <h3 class="catbg centertext"> |
351 | 370 | ', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], ' |
352 | 371 | </h3> |
353 | 372 | </div>'; |
373 | + } |
|
354 | 374 | |
355 | - if ($context['showCheckboxes']) |
|
356 | - echo ' |
|
375 | + if ($context['showCheckboxes']) { |
|
376 | + echo ' |
|
357 | 377 | </form>'; |
378 | + } |
|
358 | 379 | |
359 | 380 | echo ' |
360 | 381 | </div>'; |
361 | 382 | |
362 | - if (empty($context['no_topic_listing'])) |
|
363 | - template_topic_legend(); |
|
364 | -} |
|
383 | + if (empty($context['no_topic_listing'])) { |
|
384 | + template_topic_legend(); |
|
385 | + } |
|
386 | + } |
|
365 | 387 | |
366 | 388 | ?> |
367 | 389 | \ No newline at end of file |