Index: trunk/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php |
— | — | @@ -94,7 +94,7 @@ |
95 | 95 | } |
96 | 96 | |
97 | 97 | class CentralNoticeLogPager extends ReverseChronologicalPager { |
98 | | - var $special; |
| 98 | + var $viewPage, $special; |
99 | 99 | |
100 | 100 | function __construct( $special ) { |
101 | 101 | $this->special = $special; |
— | — | @@ -103,6 +103,8 @@ |
104 | 104 | // Override paging defaults |
105 | 105 | list( $this->mLimit, /* $offset */ ) = $this->mRequest->getLimitOffset( 20, '' ); |
106 | 106 | $this->mLimitsShown = array( 20, 50, 100 ); |
| 107 | + |
| 108 | + $this->viewPage = SpecialPage::getTitleFor( 'CentralNotice' ); |
107 | 109 | } |
108 | 110 | |
109 | 111 | /** |
— | — | @@ -133,10 +135,18 @@ |
134 | 136 | */ |
135 | 137 | function formatRow( $row ) { |
136 | 138 | global $wgLang; |
137 | | - |
138 | | - // Create a user object so we can pull the name, user page link, etc. |
| 139 | + |
| 140 | + // Create a user object so we can pull the name, user page, etc. |
139 | 141 | $loggedUser = User::newFromId( $row->notlog_user_id ); |
140 | | - |
| 142 | + // Create the user page link |
| 143 | + $userLink = $this->getSkin()->makeLinkObj( $loggedUser->getUserPage(), |
| 144 | + $loggedUser->getName() ); |
| 145 | + |
| 146 | + // Create the campaign link |
| 147 | + $campaignLink = $this->getSkin()->makeLinkObj( $this->viewPage, |
| 148 | + htmlspecialchars( $row->notlog_not_name ), |
| 149 | + 'method=listNoticeDetail¬ice=' . urlencode( $row->notlog_not_name ) ); |
| 150 | + |
141 | 151 | // Begin banner row |
142 | 152 | $htmlOut = Xml::openElement( 'tr' ); |
143 | 153 | |
— | — | @@ -144,13 +154,13 @@ |
145 | 155 | $wgLang->date( $row->notlog_timestamp ) . ' ' . $wgLang->time( $row->notlog_timestamp ) |
146 | 156 | ); |
147 | 157 | $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), |
148 | | - $loggedUser->getName() |
| 158 | + $userLink |
149 | 159 | ); |
150 | 160 | $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), |
151 | 161 | $row->notlog_action |
152 | 162 | ); |
153 | 163 | $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), |
154 | | - $row->notlog_not_name |
| 164 | + $campaignLink |
155 | 165 | ); |
156 | 166 | |
157 | 167 | // End banner row |
— | — | @@ -164,7 +174,7 @@ |
165 | 175 | */ |
166 | 176 | function getStartBody() { |
167 | 177 | $htmlOut = ''; |
168 | | - $htmlOut .= Xml::openElement( 'table', array( 'cellpadding' => 9 ) ); |
| 178 | + $htmlOut .= Xml::openElement( 'table', array( 'id' => 'cn-campaign-logs', 'cellpadding' => 4 ) ); |
169 | 179 | $htmlOut .= Xml::openElement( 'tr' ); |
170 | 180 | $htmlOut .= Xml::element( 'th', array( 'align' => 'left' ), |
171 | 181 | wfMsg ( 'centralnotice-timestamp' ) |
Index: trunk/extensions/CentralNotice/centralnotice.css |
— | — | @@ -57,6 +57,9 @@ |
58 | 58 | margin-left:1.6em; |
59 | 59 | margin-right:1.6em; |
60 | 60 | } |
| 61 | +#preferences table#cn-campaign-logs { |
| 62 | + width: auto; |
| 63 | +} |
61 | 64 | |
62 | 65 | /* Vector-specific definitions */ |
63 | 66 | body.skin-vector #preferences fieldset.prefsection { |