mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-12 09:26:05 +00:00
(bug 51005) Add secondary link to the archive page
Change-Id: I9b1e8fd76eacda3c4bcb5ffc1e3799204da52960
This commit is contained in:
parent
604b338473
commit
353f4e8ab5
|
@ -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' ) {
|
||||
$secondaryLink = $this->getLink( $event, $user, 'secondary' );
|
||||
if ( $secondaryLink ) {
|
||||
$notificationFooterContent[] = $timestamp;
|
||||
$notificationFooterContent[] = $secondaryLink;
|
||||
$footer = $wgLang->pipeList( $notificationFooterContent );
|
||||
}
|
||||
}
|
||||
if ( !$notificationFooterContent ) {
|
||||
$footer = $timestamp;
|
||||
|
||||
// Default footer is timestamp
|
||||
$footer = $this->formatTimestamp( $event->getTimestamp() );
|
||||
$secondaryLink = $this->getLink( $event, $user, 'secondary' );
|
||||
if ( $secondaryLink ) {
|
||||
$footer = $wgLang->pipeList( array( $footer, $secondaryLink ) );
|
||||
}
|
||||
return Xml::tags( 'div', array( 'class' => 'mw-echo-notification-footer' ), $footer ) . "\n";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue