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 ) {
|
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";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue