Merge pull request #5758 from MrPetovan/bug/fix-empty-notifications

Fix introductions notifications links
This commit is contained in:
Michael Vogel 2018-09-12 06:14:51 +00:00 committed by GitHub
commit f3a97a0828
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,6 +132,11 @@ function notifications_content(App $a)
$notif_tpl = get_markup_template('notifications.tpl'); $notif_tpl = get_markup_template('notifications.tpl');
$notif_show_lnk = [
'href' => ($show ? 'notifications/' . $notifs['ident'] : 'notifications/' . $notifs['ident'] . '?show=all' ),
'text' => ($show ? L10n::t('Show unread') : L10n::t('Show all')),
];
// Process the data for template creation // Process the data for template creation
if (defaults($notifs, 'ident', '') === 'introductions') { if (defaults($notifs, 'ident', '') === 'introductions') {
$sugg = get_markup_template('suggestions.tpl'); $sugg = get_markup_template('suggestions.tpl');
@ -303,11 +308,6 @@ function notifications_content(App $a)
$notif_nocontent = L10n::t('No more %s notifications.', $notifs['ident']); $notif_nocontent = L10n::t('No more %s notifications.', $notifs['ident']);
} }
$notif_show_lnk = [
'href' => ($show ? 'notifications/' . $notifs['ident'] : 'notifications/' . $notifs['ident'] . '?show=all' ),
'text' => ($show ? L10n::t('Show unread') : L10n::t('Show all')),
];
$o .= replace_macros($notif_tpl, [ $o .= replace_macros($notif_tpl, [
'$notif_header' => $notif_header, '$notif_header' => $notif_header,
'$tabs' => $tabs, '$tabs' => $tabs,