Index: branches/liquidthreads/skins/monobook/main.css |
— | — | @@ -31,6 +31,10 @@ |
32 | 32 | margin-bottom: .1em; |
33 | 33 | }*/ |
34 | 34 | |
| 35 | +.lqt_newmessages_section { |
| 36 | + border-bottom: 0px; |
| 37 | +} |
| 38 | + |
35 | 39 | .lqt_disabled_link { |
36 | 40 | color: #999; |
37 | 41 | } |
Index: branches/liquidthreads/extensions/LqtPages.php |
— | — | @@ -905,6 +905,31 @@ |
906 | 906 | $this->output->addScript($s); |
907 | 907 | } |
908 | 908 | |
| 909 | + function preShowThread($t) { |
| 910 | + $this->output->addHTML(<<<HTML |
| 911 | + <table ><tr> |
| 912 | + <td style="padding-right: 1em; vertical-align: top; padding-top: 1em;" > |
| 913 | + <form method="POST"> |
| 914 | + <input type="submit" value="Read" title="Remove this thread from New Messages." /> |
| 915 | + </form> |
| 916 | + </td> |
| 917 | + <td> |
| 918 | +HTML |
| 919 | + ); |
| 920 | + } |
| 921 | + |
| 922 | + function postShowThread($t) { |
| 923 | + $this->output->addHTML(<<<HTML |
| 924 | + </td> |
| 925 | + </tr></table> |
| 926 | +HTML |
| 927 | + ); |
| 928 | + } |
| 929 | + |
| 930 | + private function showClearButtonForThread($thread) { |
| 931 | + $this->output->addHTML('<input type="submit">'); |
| 932 | + } |
| 933 | + |
909 | 934 | function postDivClass($thread) { |
910 | 935 | |
911 | 936 | } |
— | — | @@ -914,7 +939,9 @@ |
915 | 940 | |
916 | 941 | $threads = NewMessages::newUserMessages($this->user); |
917 | 942 | foreach($threads as $t) { |
| 943 | + $this->preShowThread($t); |
918 | 944 | $this->showThread($t); |
| 945 | + $this->postShowThread($t); |
919 | 946 | } |
920 | 947 | return false; |
921 | 948 | } |
— | — | @@ -928,6 +955,7 @@ |
929 | 956 | $wgMessageCache->addMessage( 'newmessages', 'New Messages' ); |
930 | 957 | |
931 | 958 | class SpecialNewMessages extends SpecialPage { |
| 959 | + private $user, $output, $request, $title; |
932 | 960 | |
933 | 961 | function __construct() { |
934 | 962 | SpecialPage::SpecialPage( 'Newmessages' ); |
— | — | @@ -935,17 +963,24 @@ |
936 | 964 | $this->includable( true ); |
937 | 965 | } |
938 | 966 | |
939 | | - |
940 | 967 | function execute( $par = null ) { |
941 | | - global $wgOut, $wgRequest, $wgUser; |
| 968 | + global $wgOut, $wgRequest, $wgTitle, $wgUser; |
| 969 | + $this->user = $wgUser; |
| 970 | + $this->output = $wgOut; |
| 971 | + $this->request = $wgRequest; |
| 972 | + $this->title = $wgTitle; |
942 | 973 | |
943 | 974 | $this->setHeaders(); |
944 | 975 | |
945 | | - $title = $this->getTitle(); |
946 | | - $view = new NewUserMessagesView( $wgOut, new Article($title), $title, $wgUser, $wgRequest ); |
947 | | - return $view->show(); |
| 976 | + $this->output->addHTML('<h2 class="lqt_newmessages_section">Messages sent to you:</h2>'); |
948 | 977 | |
| 978 | + $view = new NewUserMessagesView( $this->output, new Article($this->title), |
| 979 | + $this->title, $this->user, $this->request ); |
| 980 | + $view->setHeaderLevel(3); |
| 981 | + $view->show(); |
| 982 | + |
949 | 983 | // and then the same for the other talkpage messagess. |
| 984 | + $this->output->addHTML('<h2 class="lqt_newmessages_section">Messages on other talkpages:</h2>'); |
950 | 985 | } |
951 | 986 | } |
952 | 987 | |
Index: branches/liquidthreads/extensions/LqtBaseView.php |
— | — | @@ -149,6 +149,10 @@ |
150 | 150 | $this->queries = $this->initializeQueries(); |
151 | 151 | } |
152 | 152 | |
| 153 | + function setHeaderLevel($int) { |
| 154 | + $this->headerLevel = $int; |
| 155 | + } |
| 156 | + |
153 | 157 | function initializeQueries() { |
154 | 158 | $g = new QueryGroup(); |
155 | 159 | $startdate = Date::now()->nDaysAgo($this->archive_start_days)->midnight(); |