Index: trunk/extensions/LiquidThreads/classes/View.php |
— | — | @@ -744,23 +744,6 @@ |
745 | 745 | return $html; |
746 | 746 | } |
747 | 747 | |
748 | | - function showThreadFooter( $thread ) { |
749 | | - global $wgLang, $wgUser; |
750 | | - |
751 | | - $sk = $wgUser->getSkin(); |
752 | | - $html = ''; |
753 | | - |
754 | | - // Footer commands |
755 | | - $footerCommands = |
756 | | - $this->listItemsForCommands( $this->threadFooterCommands( $thread ) ); |
757 | | - $html .= |
758 | | - Xml::tags( 'span', array( 'class' => "lqt_footer_commands" ), $footerCommands ); |
759 | | - |
760 | | - $html = Xml::tags( 'ul', array( 'class' => 'lqt_footer' ), $html ); |
761 | | - |
762 | | - return $html; |
763 | | - } |
764 | | - |
765 | 748 | function listItemsForCommands( $commands ) { |
766 | 749 | $result = array(); |
767 | 750 | foreach ( $commands as $key => $command ) { |
— | — | @@ -837,7 +820,6 @@ |
838 | 821 | $this->showPostEditingForm( $thread ); |
839 | 822 | $html .= Xml::closeElement( 'div' ); |
840 | 823 | } else { |
841 | | - $html .= $this->getReplyContext( $thread ); |
842 | 824 | $html .= Xml::openElement( 'div', array( 'class' => $divClass ) ); |
843 | 825 | $html .= $this->showPostBody( $post, $oldid ); |
844 | 826 | $html .= Xml::closeElement( 'div' ); |
— | — | @@ -847,10 +829,9 @@ |
848 | 830 | // If we're replying to this thread, show the reply form after it. |
849 | 831 | if ( $this->methodAppliesToThread( 'reply', $thread ) ) { |
850 | 832 | // As with above, flush HTML to avoid refactoring EditPage. |
851 | | - $html .= $this->indent( $thread ); |
852 | 833 | $this->output->addHTML( $html ); |
853 | 834 | $this->showReplyForm( $thread ); |
854 | | - $html = $this->unindent( $thread ); |
| 835 | + $html = ''; |
855 | 836 | } else { |
856 | 837 | $html .= Xml::tags( 'div', |
857 | 838 | array( 'class' => 'lqt-reply-form lqt-edit-form', |
— | — | @@ -900,23 +881,6 @@ |
901 | 882 | return $thread->getAnchorName(); |
902 | 883 | } |
903 | 884 | |
904 | | - // Gets HTML for the 'in reply to' thing if warranted. |
905 | | - function getReplyContext( $thread ) { |
906 | | - if ( $this->lastUnindentedSuperthread ) { |
907 | | - wfLoadExtensionMessages( 'LiquidThreads' ); |
908 | | - $tmp = $this->lastUnindentedSuperthread; |
909 | | - $replyLink = Xml::tags( 'a', array( 'href' => '#'.$this->anchorName( $tmp ) ), |
910 | | - $tmp->subject() ); |
911 | | - $msg = wfMsgExt( 'lqt_in_response_to', array( 'parseinline', 'replaceafter' ), |
912 | | - array( $replyLink, $tmp->author()->getName() ) ); |
913 | | - |
914 | | - return Xml::tags( 'span', array( 'class' => 'lqt_nonindent_message' ), |
915 | | - "← $msg" ); |
916 | | - } |
917 | | - |
918 | | - return ''; |
919 | | - } |
920 | | - |
921 | 885 | // Display a moved thread |
922 | 886 | function showMovedThread( $thread ) { |
923 | 887 | global $wgLang; |
— | — | @@ -1018,11 +982,15 @@ |
1019 | 983 | $this->showSingleThread( $thread ); |
1020 | 984 | |
1021 | 985 | if ( $thread->hasSubthreads() ) { |
| 986 | + $repliesClass = 'lqt-thread-replies lqt-thread-replies-'.$this->threadNestingLevel; |
| 987 | + $div = Xml::openElement( 'div', array( 'class' => $repliesClass ) ); |
| 988 | + $this->output->addHTML( $div ); |
1022 | 989 | foreach ( $thread->subthreads() as $st ) { |
1023 | 990 | if ($st->type() != Threads::TYPE_DELETED) { |
1024 | 991 | $this->showThread( $st ); |
1025 | 992 | } |
1026 | 993 | } |
| 994 | + $this->output->addHTML( Xml::CloseElement( 'div' ) ); |
1027 | 995 | } |
1028 | 996 | |
1029 | 997 | $this->output->addHTML( Xml::closeElement( 'div' ) ); |
— | — | @@ -1038,34 +1006,6 @@ |
1039 | 1007 | return "lqt_thread $levelClass $alternatingClass"; |
1040 | 1008 | } |
1041 | 1009 | |
1042 | | - // FIXME does indentation need rethinking? |
1043 | | - function indent( $thread ) { |
1044 | | - $result = ''; |
1045 | | - if ( $this->headerLevel <= $this->maxIndentationLevel ) { |
1046 | | - $result = '<dl class="lqt_replies"><dd>'; |
1047 | | - } else { |
1048 | | - $result = '<div class="lqt_replies_without_indent">'; |
1049 | | - } |
1050 | | - $this->lastUnindentedSuperthread = null; |
1051 | | - $this->headerLevel += 1; |
1052 | | - |
1053 | | - return $result; |
1054 | | - } |
1055 | | - |
1056 | | - function unindent( $thread ) { |
1057 | | - $result = ''; |
1058 | | - if ( $this->headerLevel <= $this->maxIndentationLevel + 1 ) { |
1059 | | - $result = '</dd></dl>'; |
1060 | | - } else { |
1061 | | - $result = '</div>'; |
1062 | | - } |
1063 | | - // See the beginning of showThread(). |
1064 | | - $this->lastUnindentedSuperthread = $thread->superthread(); |
1065 | | - $this->headerLevel -= 1; |
1066 | | - |
1067 | | - return $result; |
1068 | | - } |
1069 | | - |
1070 | 1010 | function getSummary( $t ) { |
1071 | 1011 | if ( !$t->summary() ) return; |
1072 | 1012 | wfLoadExtensionMessages( 'LiquidThreads' ); |