r90663 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90662‎ | r90663 | r90664 >
Date:16:53, 23 June 2011
Author:kaldari
Status:ok
Tags:
Comment:
adding campaign to allocation table
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialBannerAllocation.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialBannerAllocation.php
@@ -131,7 +131,8 @@
132132 global $wgOut, $wgUser, $wgRequest, $wgLang;
133133
134134 $sk = $wgUser->getSkin();
135 - $viewPage = $this->getTitleFor( 'NoticeTemplate', 'view' );
 135+ $viewBanner = $this->getTitleFor( 'NoticeTemplate', 'view' );
 136+ $viewCampaign = $this->getTitleFor( 'CentralNotice' );
136137
137138 // Begin building HTML
138139 $htmlOut = '';
@@ -163,10 +164,12 @@
164165 $htmlOut .= Xml::openElement( 'table',
165166 array ( 'cellpadding' => 9, 'class' => 'wikitable sortable' ) );
166167 $htmlOut .= Xml::openElement( 'tr' );
167 - $htmlOut .= Xml::element( 'th', array( 'width' => '40%' ),
 168+ $htmlOut .= Xml::element( 'th', array( 'width' => '20%' ),
168169 wfMsg ( 'centralnotice-percentage' ) );
169 - $htmlOut .= Xml::element( 'th', array( 'width' => '60%' ),
 170+ $htmlOut .= Xml::element( 'th', array( 'width' => '30%' ),
170171 wfMsg ( 'centralnotice-banner' ) );
 172+ $htmlOut .= Xml::element( 'th', array( 'width' => '30%' ),
 173+ wfMsg ( 'centralnotice-notice' ) );
171174 $htmlOut .= Xml::closeElement( 'tr' );
172175 foreach ( $banners as $banner ) {
173176 $htmlOut .= Xml::openElement( 'tr' );
@@ -175,9 +178,13 @@
176179 $htmlOut .= wfMsg ( 'percent', $wgLang->formatNum( $percentage ) );
177180 $htmlOut .= Xml::closeElement( 'td' );
178181 $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
179 - $sk->makeLinkObj( $viewPage, htmlspecialchars( $banner['name'] ),
 182+ $sk->makeLinkObj( $viewBanner, htmlspecialchars( $banner['name'] ),
180183 'template=' . urlencode( $banner['name'] ) )
181184 );
 185+ $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
 186+ $sk->makeLinkObj( $viewCampaign, htmlspecialchars( $banner['campaign'] ),
 187+ 'method=listNoticeDetail&notice=' . urlencode( $banner['campaign'] ) )
 188+ );
182189 $htmlOut .= Xml::closeElement( 'tr' );
183190 }
184191 $htmlOut .= Xml::closeElement( 'table' );

Status & tagging log