Index: branches/liquidthreads/skins/monobook/main.css |
— | — | @@ -185,8 +185,9 @@ |
186 | 186 | /* display: none;*/ |
187 | 187 | } |
188 | 188 | |
189 | | -.lqt_thread_changed_by_history .lqt_post { |
190 | | - padding: .5em 1.5em .5em 1.5em; |
| 189 | +.lqt_post_changed_by_history { |
| 190 | +/* padding: .5em 1.5em .5em 1.5em;*/ |
| 191 | + padding: 0.5em 1em; |
191 | 192 | background-color: #eeeeee; |
192 | 193 | border: solid 1pt #ffaa66; |
193 | 194 | display: table; width: auto; |
Index: branches/liquidthreads/extensions/LqtPages.php |
— | — | @@ -516,99 +516,8 @@ |
517 | 517 | } |
518 | 518 | } |
519 | 519 | |
520 | | -/** |
521 | | - * @addtogroup Pager |
522 | | - */ |
523 | | -class ThreadHistoryPager extends PageHistoryPager { |
524 | | - protected $thread; |
525 | | - |
526 | | - function __construct( $thread ) { |
527 | | - // mPageHistory = this in the PageHistoryPager methods now. |
528 | | - parent::__construct($this); |
529 | | - $this->thread = $thread; |
530 | | - } |
531 | 520 | |
532 | | - function getQueryInfo() { |
533 | | - return array( |
534 | | - 'tables' => 'historical_thread', |
535 | | - 'fields' => 'hthread_id, hthread_revision, hthread_contents, hthread_change_type, hthread_change_object', |
536 | | - 'conds' => array('hthread_id' => $this->thread->id() ), |
537 | | - 'options' => array() |
538 | | - ); |
539 | | - } |
540 | 521 | |
541 | | - function getIndexField() { |
542 | | - return 'hthread_revision'; |
543 | | - } |
544 | | - |
545 | | - /** |
546 | | - * Returns a row from the history printout. |
547 | | - * |
548 | | - * @param object $row The database row corresponding to the line (or is it the previous line?). |
549 | | - * @param object $next The database row corresponding to the next line (or is it this one?). |
550 | | - * @param int $counter Apparently a counter of what row number we're at, counted from the top row = 1. |
551 | | - * @param $notificationtimestamp |
552 | | - * @param bool $latest Whether this row corresponds to the page's latest revision. |
553 | | - * @param bool $firstInList Whether this row corresponds to the first displayed on this history page. |
554 | | - * @return string HTML output for the row |
555 | | - */ |
556 | | - function historyLine( $row, $next, $counter = '', $notificationtimestamp = false, $latest = false, $firstInList = false ) { |
557 | | - |
558 | | - $hthread = HistoricalThread::fromTextRepresentation($row->hthread_contents); |
559 | | - return $this->rowForThread($hthread); |
560 | | - } |
561 | | - |
562 | | - private function rowForThread($t) { |
563 | | - global $wgLang, $wgOut; // TODO global. |
564 | | - |
565 | | - /* TODO: best not to refer to LqtView class directly. */ |
566 | | - /* We don't use oldid because that has side-effects. */ |
567 | | - $result = array(); |
568 | | - $change_names = array(Threads::CHANGE_EDITED_ROOT => "Comment text edited:", |
569 | | - Threads::CHANGE_EDITED_SUMMARY => "Summary changed:", |
570 | | - Threads::CHANGE_REPLY_CREATED => "New reply created:", |
571 | | - Threads::CHANGE_NEW_THREAD => "New thread created:", |
572 | | - Threads::CHANGE_DELETED => "Deleted:", |
573 | | - Threads::CHANGE_UNDELETED => "Undeleted:"); |
574 | | - $change_label = array_key_exists($t->changeType(), $change_names) ? $change_names[$t->changeType()] : ""; |
575 | | - |
576 | | - $url = LqtView::permalinkUrlWithQuery( $this->thread, 'lqt_oldid=' . $t->revisionNumber() ); |
577 | | - |
578 | | - $p = new Parser(); $sig = $wgOut->parse( $p->getUserSig( $t->changeUser() ), false ); |
579 | | - |
580 | | - $result[] = "<tr>"; |
581 | | - $result[] = "<td><a href=\"$url\">" . $wgLang->timeanddate($t->timestamp()) . "</a></td>"; |
582 | | - $result[] = "<td>" . $sig . "</td>"; |
583 | | - $result[] = "<td>$change_label</td>"; |
584 | | - $result[] = "<td>" . $t->changeComment() . "</td>"; |
585 | | - $result[] = "</tr>"; |
586 | | - return implode('', $result); |
587 | | - } |
588 | | - |
589 | | - function getNotificationTimestamp() { |
590 | | - return "foo"; |
591 | | - } |
592 | | -/* |
593 | | - function formatRow( $row ) { |
594 | | - return '<li>' . $row->hthread_revision; |
595 | | - } |
596 | | -*/ |
597 | | - function getStartBody() { |
598 | | - $this->mLastRow = false; |
599 | | - $this->mCounter = 1; |
600 | | - |
601 | | - // Due to the screwy way we're doing history, the last revision we show, |
602 | | - // that is, the current revision, is in the thread table, not the |
603 | | - // historical_thread table. aurggghhh! |
604 | | - // TODO paging. |
605 | | - return '<table>' . $this->rowForThread($this->thread); |
606 | | - } |
607 | | - |
608 | | - function getEndBody() { |
609 | | - return '</table>'; |
610 | | - } |
611 | | -} |
612 | | - |
613 | 522 | class ThreadHistoryListingView extends ThreadPermalinkView { |
614 | 523 | |
615 | 524 | private function rowForThread($t) { |
— | — | @@ -674,15 +583,13 @@ |
675 | 584 | |
676 | 585 | /* TOOD: customize tabs so that History is highlighted. */ |
677 | 586 | |
678 | | - function threadDivClass($thread) { |
679 | | - // efVarDump($this->output, $thread->changeObject()->id()); |
| 587 | + function postDivClass($thread) { |
680 | 588 | $is_changed_thread = $thread->changeObject() && |
681 | 589 | $thread->changeObject()->id() == $thread->id(); |
682 | | - |
683 | 590 | if ( $is_changed_thread ) |
684 | | - return 'lqt_thread lqt_thread_changed_by_history'; |
| 591 | + return 'lqt_post_changed_by_history'; |
685 | 592 | else |
686 | | - return 'lqt_thread'; |
| 593 | + return 'lqt_post'; |
687 | 594 | } |
688 | 595 | |
689 | 596 | |
Index: branches/liquidthreads/extensions/LqtBaseView.php |
— | — | @@ -556,7 +556,7 @@ |
557 | 557 | |
558 | 558 | /* $color_number = $this->selectNewUserColor( $thread->root()->originalAuthor() ); |
559 | 559 | $this->openDiv( "lqt_post lqt_post_color_$color_number" );*/ |
560 | | - $this->openDiv( 'lqt_post' ); |
| 560 | + $this->openDiv( $this->postDivClass($thread) ); |
561 | 561 | |
562 | 562 | if( $this->methodAppliesToThread( 'edit', $thread ) ) { |
563 | 563 | $this->showPostEditingForm( $thread ); |
— | — | @@ -584,8 +584,8 @@ |
585 | 585 | } |
586 | 586 | } |
587 | 587 | |
588 | | - function threadDivClass( $thread ) { |
589 | | - return 'lqt_thread'; |
| 588 | + function postDivClass( $thread ) { |
| 589 | + return 'lqt_post'; |
590 | 590 | } |
591 | 591 | |
592 | 592 | function showThread( $thread ) { |
— | — | @@ -629,7 +629,7 @@ |
630 | 630 | $this->output->addHTML("<p class=\"lqt_summary_notice\">If this discussion seems to be concluded, you are encouraged to <a href=\"{$this->permalinkUrl($thread, 'summarize')}\">write a summary</a>. There have been no changes here for at least $this->archive_start_days days.</p>"); |
631 | 631 | } |
632 | 632 | |
633 | | - $this->openDiv($this->threadDivClass($thread), "lqt_thread_id_{$thread->id()}"); |
| 633 | + $this->openDiv('lqt_thread', "lqt_thread_id_{$thread->id()}"); |
634 | 634 | |
635 | 635 | $this->showRootPost( $thread ); |
636 | 636 | $this->indent(); |