Index: branches/wmf-deployment/extensions/LiquidThreads/lqt.css |
— | — | @@ -414,6 +414,10 @@ |
415 | 415 | margin-left: 8px; |
416 | 416 | } |
417 | 417 | |
| 418 | +.lqt-thread-toolbar-commands > .lqt-command-history { |
| 419 | + margin-left: 8px; |
| 420 | +} |
| 421 | + |
418 | 422 | .lqt-command-quote a { |
419 | 423 | background-image: url(icons/quote.png); |
420 | 424 | margin-left: 8px; |
Index: branches/wmf-deployment/extensions/LiquidThreads/classes/View.php |
— | — | @@ -538,7 +538,15 @@ |
539 | 539 | function threadCommands( $thread ) { |
540 | 540 | wfLoadExtensionMessages( 'LiquidThreads' ); |
541 | 541 | $commands = array(); |
| 542 | + |
| 543 | + $history_url = self::permalinkUrlWithQuery( $thread, array( 'action' => 'history' ) ); |
| 544 | + $commands['history'] = array( 'label' => wfMsgExt( 'history_short', 'parseinline' ), |
| 545 | + 'href' => $history_url, |
| 546 | + 'enabled' => true ); |
542 | 547 | |
| 548 | + if ( $thread->isHistorical() ) { |
| 549 | + return array(); |
| 550 | + } |
543 | 551 | $user_can_edit = $thread->root()->getTitle()->quickUserCan( 'edit' ); |
544 | 552 | $editMsg = $user_can_edit ? 'edit' : 'viewsource'; |
545 | 553 | |
— | — | @@ -547,11 +555,6 @@ |
548 | 556 | true /* include fragment */ , $this->request ), |
549 | 557 | 'enabled' => true ); |
550 | 558 | |
551 | | - $history_url = self::permalinkUrlWithQuery( $thread, array( 'action' => 'history' ) ); |
552 | | - $commands['history'] = array( 'label' => wfMsgExt( 'history_short', 'parseinline' ), |
553 | | - 'href' => $history_url, |
554 | | - 'enabled' => true ); |
555 | | - |
556 | 559 | if ( $this->user->isAllowed( 'delete' ) ) { |
557 | 560 | $delete_url = $thread->title()->getFullURL( 'action=delete' ); |
558 | 561 | $deleteMsg = $thread->type() == Threads::TYPE_DELETED ? 'lqt_undelete' : 'delete'; |
— | — | @@ -590,7 +593,16 @@ |
591 | 594 | |
592 | 595 | if ( $thread->isHistorical() ) { |
593 | 596 | // No links for historical threads. |
594 | | - return array(); |
| 597 | + $history_url = self::permalinkUrlWithQuery( $thread, |
| 598 | + array( 'action' => 'history' ) ); |
| 599 | + $commands = array(); |
| 600 | + |
| 601 | + $commands['history'] = array( |
| 602 | + 'label' => wfMsgExt( 'history_short', 'parseinline' ), |
| 603 | + 'href' => $history_url, |
| 604 | + 'enabled' => true ); |
| 605 | + |
| 606 | + return $commands; |
595 | 607 | } |
596 | 608 | |
597 | 609 | $commands = array(); |
— | — | @@ -765,9 +777,12 @@ |
766 | 778 | array( 'class' => 'lqt-thread-actions-trigger ' . |
767 | 779 | 'lqt-command-icon', 'style' => 'display: none;' ), |
768 | 780 | $triggerText ); |
769 | | - $headerParts[] = Xml::tags( 'li', |
| 781 | + |
| 782 | + if ( count($commands) ) { |
| 783 | + $headerParts[] = Xml::tags( 'li', |
770 | 784 | array( 'class' => 'lqt-thread-toolbar-menu' ), |
771 | 785 | $dropDownTrigger ); |
| 786 | + } |
772 | 787 | |
773 | 788 | $html .= implode( ' ', $headerParts ); |
774 | 789 | |
Index: branches/wmf-deployment/extensions/LiquidThreads/lqt.js |
— | — | @@ -370,15 +370,17 @@ |
371 | 371 | |
372 | 372 | $j(threadContainer).data( 'thread-id', threadId ); |
373 | 373 | |
374 | | - if (!(replyLI.length)) { |
375 | | - return; |
| 374 | + if ( replyLI.length ) { |
| 375 | + replyLI[0].id = "lqt-reply-id-"+threadId; |
| 376 | + var replyLink = replyLI.find('a'); |
| 377 | + |
| 378 | + replyLink.click( liquidThreads.handleReplyLink ); |
| 379 | + |
| 380 | + // Add quote button to menus |
| 381 | + var toolbar = $j(threadContainer).find('.lqt-thread-toolbar-commands'); |
| 382 | + liquidThreads.addQuoteButton(toolbar); |
376 | 383 | } |
377 | 384 | |
378 | | - replyLI[0].id = "lqt-reply-id-"+threadId; |
379 | | - var replyLink = replyLI.find('a'); |
380 | | - |
381 | | - replyLink.click( liquidThreads.handleReplyLink ); |
382 | | - |
383 | 385 | // Hide edit forms |
384 | 386 | $j(threadContainer).find('div.lqt-edit-form').each( |
385 | 387 | function() { |
— | — | @@ -391,10 +393,6 @@ |
392 | 394 | |
393 | 395 | // Update menus |
394 | 396 | $j(threadContainer).each( liquidThreads.setupMenus ); |
395 | | - |
396 | | - // Add quote button to menus |
397 | | - var toolbar = $j(threadContainer).find('.lqt-thread-toolbar-commands'); |
398 | | - liquidThreads.addQuoteButton(toolbar); |
399 | 397 | |
400 | 398 | // Check for a "show replies" button |
401 | 399 | $j('a.lqt-show-replies').click( liquidThreads.showReplies ); |
Property changes on: branches/wmf-deployment/extensions/LiquidThreads |
___________________________________________________________________ |
Name: svn:mergeinfo |
402 | 400 | - /branches/REL1_15/phase3/extensions/LiquidThreads:51646 |
/trunk/extensions/LiquidThreads:56151-57564 |
/trunk/phase3/extensions/LiquidThreads:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447 |
403 | 401 | + /branches/REL1_15/phase3/extensions/LiquidThreads:51646 |
/trunk/extensions/LiquidThreads:56151-57566 |
/trunk/phase3/extensions/LiquidThreads:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447 |