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