Index: trunk/extensions/LiquidThreads/classes/View.php |
— | — | @@ -430,6 +430,11 @@ |
431 | 431 | return; |
432 | 432 | } |
433 | 433 | |
| 434 | + $html = Xml::openElement( 'div', |
| 435 | + array( 'class' => 'lqt-reply-form' ) ); |
| 436 | + $this->output->addHTML( $html ); |
| 437 | + |
| 438 | + |
434 | 439 | try { |
435 | 440 | $t = $this->newReplyTitle( null, $thread ); |
436 | 441 | } catch ( MWException $excep ) { |
— | — | @@ -507,6 +512,8 @@ |
508 | 513 | $redirectTitle->setFragment( '#' . $this->anchorName( $newThread ) ); |
509 | 514 | $this->output->redirect( $this->title->getFullURL() ); |
510 | 515 | } |
| 516 | + |
| 517 | + $this->output->addHTML( '</div>' ); |
511 | 518 | } |
512 | 519 | |
513 | 520 | function showPostEditingForm( $thread ) { |
— | — | @@ -1405,9 +1412,9 @@ |
1406 | 1413 | $ebLookup = array( Threads::EDITED_BY_AUTHOR => 'author', |
1407 | 1414 | Threads::EDITED_BY_OTHERS => 'others' ); |
1408 | 1415 | $lastEdit = $thread->root()->getTimestamp(); |
| 1416 | + $lastEditTime = $wgLang->time( $lastEdit, false, true, true ); |
| 1417 | + $lastEditDate = $wgLang->date( $lastEdit, false, true, true ); |
1409 | 1418 | $lastEdit = $wgLang->timeanddate( $lastEdit, true ); |
1410 | | - $lastEditTime = $wgLang->time( $lastEdit, true ); |
1411 | | - $lastEditDate = $wgLang->date( $lastEdit, true ); |
1412 | 1419 | $editors = ''; |
1413 | 1420 | $editorCount = 0; |
1414 | 1421 | |
— | — | @@ -1879,6 +1886,10 @@ |
1880 | 1887 | $this->showThreadReplies( $thread, $startAt, $maxCount, $showThreads, |
1881 | 1888 | $cascadeOptions, $replyInterruption ); |
1882 | 1889 | } elseif ( $hasSubthreads && !$showThreads ) { |
| 1890 | + if ($replyTo) { |
| 1891 | + $this->showReplyForm( $thread ); |
| 1892 | + } |
| 1893 | + |
1883 | 1894 | // Add a "show subthreads" link. |
1884 | 1895 | $link = $this->getShowReplies( $thread ); |
1885 | 1896 | |
— | — | @@ -1896,10 +1907,8 @@ |
1897 | 1908 | $class = 'lqt-thread-replies lqt-thread-replies-' . |
1898 | 1909 | $this->threadNestingLevel; |
1899 | 1910 | $html = Xml::openElement( 'div', array( 'class' => $class ) ); |
1900 | | - $html .= Xml::openElement( 'div', |
1901 | | - array( 'class' => 'lqt-reply-form' ) ); |
1902 | 1911 | $this->output->addHTML( $html ); |
1903 | | - |
| 1912 | + |
1904 | 1913 | $this->showReplyForm( $thread ); |
1905 | 1914 | |
1906 | 1915 | $finishDiv = Xml::tags( 'div', |
— | — | @@ -1912,6 +1921,22 @@ |
1913 | 1922 | $finishHTML .= Xml::closeElement( 'div' ); // lqt-thread-replies |
1914 | 1923 | $this->output->addHTML( $finishHTML ); |
1915 | 1924 | } |
| 1925 | + } elseif ( !$hasSubthreads && $replyTo ) { |
| 1926 | + $class = 'lqt-thread-replies lqt-thread-replies-'. |
| 1927 | + $this->threadNestingLevel; |
| 1928 | + $html = Xml::openElement( 'div', array( 'class' => $class ) ); |
| 1929 | + $this->output->addHTML( $html ); |
| 1930 | + |
| 1931 | + $this->showReplyForm( $thread ); |
| 1932 | + |
| 1933 | + $html = Xml::tags( 'div', |
| 1934 | + array( 'class' => 'lqt-replies-finish' ), |
| 1935 | + Xml::tags( 'div', |
| 1936 | + array( 'class' => |
| 1937 | + 'lqt-replies-finish-corner' |
| 1938 | + ), ' ' ) ); |
| 1939 | + $html .= Xml::closeElement( 'div' ); |
| 1940 | + $this->output->addHTML( $html ); |
1916 | 1941 | } |
1917 | 1942 | |
1918 | 1943 | if ( $this->threadNestingLevel == 1 ) { |
— | — | @@ -1934,10 +1959,7 @@ |
1935 | 1960 | // Check if we're actually replying to this thread. |
1936 | 1961 | if ( $this->methodAppliesToThread( 'reply', $thread ) ) { |
1937 | 1962 | // As with above, flush HTML to avoid refactoring EditPage. |
1938 | | - $this->output->addHTML( Xml::openElement( 'div', |
1939 | | - array( 'class' => 'lqt-reply-form' ) ) ); |
1940 | 1963 | $this->showReplyForm( $thread ); |
1941 | | - $this->output->addHTML( Xml::closeElement( 'div' ) ); |
1942 | 1964 | return; |
1943 | 1965 | } elseif ( !$thread->canUserReply( $this->user ) ) { |
1944 | 1966 | return; |