Index: trunk/extensions/ConfirmAccount/ConfirmAccount.php |
— | — | @@ -92,7 +92,7 @@ |
93 | 93 | # Check for collisions |
94 | 94 | $wgHooks['AbortNewAccount'][] = 'ConfirmAccountUIHooks::checkIfAccountNameIsPending'; |
95 | 95 | # Status header like "new messages" bar |
96 | | -$wgHooks['SiteNoticeAfter'][] = 'ConfirmAccountUIHooks::confirmAccountsNotice'; |
| 96 | +$wgHooks['BeforePageDisplay'][] = 'ConfirmAccountUIHooks::confirmAccountsNotice'; |
97 | 97 | |
98 | 98 | # Register admin pages for AdminLinks extension. |
99 | 99 | $wgHooks['AdminLinks'][] = 'ConfirmAccountUIHooks::confirmAccountAdminLinks'; |
Index: trunk/extensions/ConfirmAccount/presentation/ConfirmAccountUI.hooks.php |
— | — | @@ -48,15 +48,14 @@ |
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
52 | | - * FIXME: don't just tack on to general site notice |
53 | | - * |
| 52 | + * Add "x email-confirmed open account requests" notice |
54 | 53 | * @param $notice |
55 | 54 | * @return bool |
56 | 55 | */ |
57 | | - public static function confirmAccountsNotice( &$notice ) { |
| 56 | + public static function confirmAccountsNotice( OutputPage &$out, Skin &$skin ) { |
58 | 57 | global $wgConfirmAccountNotice; |
59 | 58 | |
60 | | - $context = RequestContext::getMain(); |
| 59 | + $context = $out->getContext(); |
61 | 60 | if ( !$wgConfirmAccountNotice || !$context->getUser()->isAllowed( 'confirmaccount' ) ) { |
62 | 61 | return true; |
63 | 62 | } |
— | — | @@ -67,11 +66,13 @@ |
68 | 67 | } |
69 | 68 | $count = ConfirmAccount::getOpenEmailConfirmedCount( '*' ); |
70 | 69 | if ( $count > 0 ) { |
71 | | - $message = wfMsgExt( 'confirmaccount-newrequests', 'parsemag', $count ); |
72 | | - $notice .= '<div id="mw-confirmaccount-msg" class="mw-confirmaccount-bar">' . |
73 | | - $context->getOutput()->parse( $message ) . '</div>'; |
| 70 | + $out->prependHtml( |
| 71 | + '<div id="mw-confirmaccount-msg" class="plainlinks mw-confirmaccount-bar">' . |
| 72 | + $out->parse( wfMsg( 'confirmaccount-newrequests', $count ), false ) . |
| 73 | + '</div>' |
| 74 | + ); |
74 | 75 | |
75 | | - $context->getOutput()->addModules( 'ext.confirmAccount' ); // CSS |
| 76 | + $out->addModules( 'ext.confirmAccount' ); // CSS |
76 | 77 | } |
77 | 78 | return true; |
78 | 79 | } |
Index: trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php |
— | — | @@ -919,7 +919,7 @@ |
920 | 920 | } |
921 | 921 | $time = $this->getLang()->timeanddate( wfTimestamp(TS_MW, $row->acr_registration), true ); |
922 | 922 | |
923 | | - $r = "<li class='mw-confirmaccount-time-{$this->queueType}'>"; |
| 923 | + $r = "<li class='mw-confirmaccount-type-{$this->queueType}'>"; |
924 | 924 | |
925 | 925 | $r .= $time." (<strong>{$link}</strong>)"; |
926 | 926 | # Auto-rejected accounts have a user ID of zero |
Index: trunk/extensions/ConfirmAccount/presentation/modules/confirmaccount.css |
— | — | @@ -1,14 +1,12 @@ |
| 2 | +/* RC pending account request notice */ |
2 | 3 | .mw-confirmaccount-bar { |
| 4 | + padding: 3px; |
| 5 | + margin: 5px; |
| 6 | + border: 1px solid #990000; |
3 | 7 | background-color: #f9f9f9; |
4 | | - padding: 0px; |
5 | | - font-size: 80%; |
6 | | - margin-left: 10px; |
7 | | - margin-right: 10px; |
8 | | - text-align: center; |
9 | | - float: right; |
10 | 8 | } |
11 | 9 | |
12 | | -.mw-confirmaccount-time-0 { |
| 10 | +.mw-confirmaccount-type-0 { |
13 | 11 | background-color: #f0fff0; |
14 | 12 | } |
15 | 13 | |
— | — | @@ -16,7 +14,7 @@ |
17 | 15 | background-color: #f9f9f9; |
18 | 16 | } |
19 | 17 | |
20 | | -.mw-confirmaccount-time-1 { |
| 18 | +.mw-confirmaccount-type-1 { |
21 | 19 | background-color: #f0ffff; |
22 | 20 | } |
23 | 21 | |
Index: trunk/extensions/ConfirmAccount/presentation/ConfirmAccount.i18n.php |
— | — | @@ -80,7 +80,7 @@ |
81 | 81 | 'requestaccount-loginnotice' => 'To obtain a user account, you must \'\'\'[[Special:RequestAccount|request one]]\'\'\'.', |
82 | 82 | |
83 | 83 | # Site message for admins |
84 | | - 'confirmaccount-newrequests' => '\'\'\'$1\'\'\' open e-mail-confirmed [[Special:ConfirmAccounts|account {{PLURAL:$1|request|requests}}]] pending', |
| 84 | + 'confirmaccount-newrequests' => '\'\'\'$1\'\'\' open e-mail-confirmed [[Special:ConfirmAccounts|account {{PLURAL:$1|request|requests}}]] {{PLURAL:$1|is|are}} pending. \'\'\'Your attention is needed!\'\'\'', |
85 | 85 | |
86 | 86 | # Confirm account page |
87 | 87 | 'confirmaccounts' => 'Confirm account requests', |