(bug 51005) Add secondary link to the archive page

Change-Id: I9b1e8fd76eacda3c4bcb5ffc1e3799204da52960
This commit is contained in:
bsitu 2013-07-12 11:29:01 -07:00
parent 604b338473
commit 353f4e8ab5

View file

@ -371,18 +371,12 @@ class EchoBasicFormatter extends EchoNotificationFormatter {
*/ */
protected function formatFooter( $event, $user ) { protected function formatFooter( $event, $user ) {
global $wgLang; global $wgLang;
$timestamp = $this->formatTimestamp( $event->getTimestamp() );
$notificationFooterContent = array(); // Default footer is timestamp
if ( $this->outputFormat === 'flyout' ) { $footer = $this->formatTimestamp( $event->getTimestamp() );
$secondaryLink = $this->getLink( $event, $user, 'secondary' ); $secondaryLink = $this->getLink( $event, $user, 'secondary' );
if ( $secondaryLink ) { if ( $secondaryLink ) {
$notificationFooterContent[] = $timestamp; $footer = $wgLang->pipeList( array( $footer, $secondaryLink ) );
$notificationFooterContent[] = $secondaryLink;
$footer = $wgLang->pipeList( $notificationFooterContent );
}
}
if ( !$notificationFooterContent ) {
$footer = $timestamp;
} }
return Xml::tags( 'div', array( 'class' => 'mw-echo-notification-footer' ), $footer ) . "\n"; return Xml::tags( 'div', array( 'class' => 'mw-echo-notification-footer' ), $footer ) . "\n";
} }