http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90663
Revision: 90663
Author: kaldari
Date: 2011-06-23 16:53:39 +0000 (Thu, 23 Jun 2011)
Log Message:
-----------
adding campaign to allocation table
Modified Paths:
--------------
trunk/extensions/CentralNotice/SpecialBannerAllocation.php
Modified: trunk/extensions/CentralNotice/SpecialBannerAllocation.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialBannerAllocation.php 2011-06-23
16:05:16 UTC (rev 90662)
+++ trunk/extensions/CentralNotice/SpecialBannerAllocation.php 2011-06-23
16:53:39 UTC (rev 90663)
@@ -131,7 +131,8 @@
global $wgOut, $wgUser, $wgRequest, $wgLang;
$sk = $wgUser->getSkin();
- $viewPage = $this->getTitleFor( 'NoticeTemplate', 'view' );
+ $viewBanner = $this->getTitleFor( 'NoticeTemplate', 'view' );
+ $viewCampaign = $this->getTitleFor( 'CentralNotice' );
// Begin building HTML
$htmlOut = '';
@@ -163,10 +164,12 @@
$htmlOut .= Xml::openElement( 'table',
array ( 'cellpadding' => 9, 'class' =>
'wikitable sortable' ) );
$htmlOut .= Xml::openElement( 'tr' );
- $htmlOut .= Xml::element( 'th', array( 'width' => '40%'
),
+ $htmlOut .= Xml::element( 'th', array( 'width' => '20%'
),
wfMsg ( 'centralnotice-percentage' ) );
- $htmlOut .= Xml::element( 'th', array( 'width' => '60%'
),
+ $htmlOut .= Xml::element( 'th', array( 'width' => '30%'
),
wfMsg ( 'centralnotice-banner' ) );
+ $htmlOut .= Xml::element( 'th', array( 'width' => '30%'
),
+ wfMsg ( 'centralnotice-notice' ) );
$htmlOut .= Xml::closeElement( 'tr' );
foreach ( $banners as $banner ) {
$htmlOut .= Xml::openElement( 'tr' );
@@ -175,9 +178,13 @@
$htmlOut .= wfMsg ( 'percent',
$wgLang->formatNum( $percentage ) );
$htmlOut .= Xml::closeElement( 'td' );
$htmlOut .= Xml::tags( 'td', array( 'valign' =>
'top' ),
- $sk->makeLinkObj( $viewPage,
htmlspecialchars( $banner['name'] ),
+ $sk->makeLinkObj( $viewBanner,
htmlspecialchars( $banner['name'] ),
'template=' . urlencode(
$banner['name'] ) )
);
+ $htmlOut .= Xml::tags( 'td', array( 'valign' =>
'top' ),
+ $sk->makeLinkObj( $viewCampaign,
htmlspecialchars( $banner['campaign'] ),
+
'method=listNoticeDetail¬ice=' . urlencode( $banner['campaign'] ) )
+ );
$htmlOut .= Xml::closeElement( 'tr' );
}
$htmlOut .= Xml::closeElement( 'table' );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs