(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 ) {
global $wgLang;
$timestamp = $this->formatTimestamp( $event->getTimestamp() );
$notificationFooterContent = array();
if ( $this->outputFormat === 'flyout' ) {
// Default footer is timestamp
$footer = $this->formatTimestamp( $event->getTimestamp() );
$secondaryLink = $this->getLink( $event, $user, 'secondary' );
if ( $secondaryLink ) {
$notificationFooterContent[] = $timestamp;
$notificationFooterContent[] = $secondaryLink;
$footer = $wgLang->pipeList( $notificationFooterContent );
}
}
if ( !$notificationFooterContent ) {
$footer = $timestamp;
$footer = $wgLang->pipeList( array( $footer, $secondaryLink ) );
}
return Xml::tags( 'div', array( 'class' => 'mw-echo-notification-footer' ), $footer ) . "\n";
}