mirror of
https://github.com/friendica/friendica
synced 2025-04-24 07:10:11 +00:00
rename CSS attributes notify => notification
This commit is contained in:
parent
b016e420fe
commit
b229939c3d
30 changed files with 177 additions and 177 deletions
|
@ -110,16 +110,16 @@ abstract class BaseNotifications extends BaseModule
|
|||
/**
|
||||
* Shows the printable result of notifications for a specific tab
|
||||
*
|
||||
* @param string $header The notification header
|
||||
* @param array $content The array with the notifications
|
||||
* @param string $noContent The string in case there are no notifications
|
||||
* @param array $showLink The possible links at the top
|
||||
* @param string $header The notification header
|
||||
* @param array $notifications The array with the notifications
|
||||
* @param string $noContent The string in case there are no notifications
|
||||
* @param array $showLink The possible links at the top
|
||||
*
|
||||
* @return string The rendered output
|
||||
*
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
protected static function printContent(string $header, array $content, string $noContent, array $showLink)
|
||||
protected static function printContent(string $header, array $notifications, string $noContent, array $showLink)
|
||||
{
|
||||
// Get the nav tabs for the notification pages
|
||||
$tabs = self::getTabs();
|
||||
|
@ -129,12 +129,12 @@ abstract class BaseNotifications extends BaseModule
|
|||
|
||||
$notif_tpl = Renderer::getMarkupTemplate('notifications/notifications.tpl');
|
||||
return Renderer::replaceMacros($notif_tpl, [
|
||||
'$notif_header' => $header ?? DI::l10n()->t('Notifications'),
|
||||
'$tabs' => $tabs,
|
||||
'$notif_content' => $content,
|
||||
'$notif_nocontent' => $noContent,
|
||||
'$notif_show_lnk' => $showLink,
|
||||
'$notif_paginate' => $pager->renderMinimal(count($content))
|
||||
'$header' => $header ?? DI::l10n()->t('Notifications'),
|
||||
'$tabs' => $tabs,
|
||||
'$notifications' => $notifications,
|
||||
'$noContent' => $noContent,
|
||||
'$showLink' => $showLink,
|
||||
'$paginate' => $pager->renderMinimal(count($notifications))
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -62,29 +62,29 @@ class Introductions extends BaseNotifications
|
|||
switch ($notification['label']) {
|
||||
case 'friend_suggestion':
|
||||
$notificationContent[] = Renderer::replaceMacros($notificationSuggestions, [
|
||||
'$type' => $notification['label'],
|
||||
'$type' => $notification['label'],
|
||||
'str_notification_type' => DI::l10n()->t('Notification type:'),
|
||||
'str_type' => $notification['str_type'],
|
||||
'$intro_id' => $notification['intro_id'],
|
||||
'$lbl_madeby' => DI::l10n()->t('Suggested by:'),
|
||||
'$madeby' => $notification['madeby'],
|
||||
'$madeby_url' => $notification['madeby_url'],
|
||||
'$madeby_zrl' => $notification['madeby_zrl'],
|
||||
'$madeby_addr' => $notification['madeby_addr'],
|
||||
'$contact_id' => $notification['contact_id'],
|
||||
'$photo' => $notification['photo'],
|
||||
'$fullname' => $notification['name'],
|
||||
'$url' => $notification['url'],
|
||||
'$zrl' => $notification['zrl'],
|
||||
'$lbl_url' => DI::l10n()->t('Profile URL'),
|
||||
'$addr' => $notification['addr'],
|
||||
'$hidden' => ['hidden', DI::l10n()->t('Hide this contact from others'), ($notification['hidden'] == 1), ''],
|
||||
'$knowyou' => $notification['knowyou'],
|
||||
'$approve' => DI::l10n()->t('Approve'),
|
||||
'$note' => $notification['note'],
|
||||
'$request' => $notification['request'],
|
||||
'$ignore' => DI::l10n()->t('Ignore'),
|
||||
'$discard' => DI::l10n()->t('Discard'),
|
||||
'str_type' => $notification['str_type'],
|
||||
'$intro_id' => $notification['intro_id'],
|
||||
'$lbl_madeby' => DI::l10n()->t('Suggested by:'),
|
||||
'$madeby' => $notification['madeby'],
|
||||
'$madeby_url' => $notification['madeby_url'],
|
||||
'$madeby_zrl' => $notification['madeby_zrl'],
|
||||
'$madeby_addr' => $notification['madeby_addr'],
|
||||
'$contact_id' => $notification['contact_id'],
|
||||
'$photo' => $notification['photo'],
|
||||
'$fullname' => $notification['name'],
|
||||
'$url' => $notification['url'],
|
||||
'$zrl' => $notification['zrl'],
|
||||
'$lbl_url' => DI::l10n()->t('Profile URL'),
|
||||
'$addr' => $notification['addr'],
|
||||
'$hidden' => ['hidden', DI::l10n()->t('Hide this contact from others'), ($notification['hidden'] == 1), ''],
|
||||
'$knowyou' => $notification['knowyou'],
|
||||
'$approve' => DI::l10n()->t('Approve'),
|
||||
'$note' => $notification['note'],
|
||||
'$request' => $notification['request'],
|
||||
'$ignore' => DI::l10n()->t('Ignore'),
|
||||
'$discard' => DI::l10n()->t('Discard'),
|
||||
]);
|
||||
break;
|
||||
|
||||
|
@ -146,39 +146,39 @@ class Introductions extends BaseNotifications
|
|||
}
|
||||
|
||||
$notificationContent[] = Renderer::replaceMacros($notificationTemplate, [
|
||||
'$type' => $notification['label'],
|
||||
'$header' => $header,
|
||||
'$type' => $notification['label'],
|
||||
'$header' => $header,
|
||||
'str_notification_type' => DI::l10n()->t('Notification type:'),
|
||||
'str_type' => $notification['notifytype'],
|
||||
'$dfrn_text' => $dfrn_text,
|
||||
'$dfrn_id' => $notification['dfrn_id'],
|
||||
'$uid' => $notification['uid'],
|
||||
'$intro_id' => $notification['intro_id'],
|
||||
'$contact_id' => $notification['contact_id'],
|
||||
'$photo' => $notification['photo'],
|
||||
'$fullname' => $notification['name'],
|
||||
'$location' => $notification['location'],
|
||||
'$lbl_location' => DI::l10n()->t('Location:'),
|
||||
'$about' => $notification['about'],
|
||||
'$lbl_about' => DI::l10n()->t('About:'),
|
||||
'$keywords' => $notification['keywords'],
|
||||
'$lbl_keywords' => DI::l10n()->t('Tags:'),
|
||||
'$gender' => $notification['gender'],
|
||||
'$lbl_gender' => DI::l10n()->t('Gender:'),
|
||||
'$hidden' => ['hidden', DI::l10n()->t('Hide this contact from others'), ($notification['hidden'] == 1), ''],
|
||||
'$url' => $notification['url'],
|
||||
'$zrl' => $notification['zrl'],
|
||||
'$lbl_url' => DI::l10n()->t('Profile URL'),
|
||||
'$addr' => $notification['addr'],
|
||||
'$lbl_knowyou' => $lbl_knowyou,
|
||||
'$lbl_network' => DI::l10n()->t('Network:'),
|
||||
'$network' => ContactSelector::networkToName($notification['network'], $notification['url']),
|
||||
'$knowyou' => $knowyou,
|
||||
'$approve' => DI::l10n()->t('Approve'),
|
||||
'$note' => $notification['note'],
|
||||
'$ignore' => DI::l10n()->t('Ignore'),
|
||||
'$discard' => $discard,
|
||||
'$action' => $action,
|
||||
'str_type' => $notification['notifytype'],
|
||||
'$dfrn_text' => $dfrn_text,
|
||||
'$dfrn_id' => $notification['dfrn_id'],
|
||||
'$uid' => $notification['uid'],
|
||||
'$intro_id' => $notification['intro_id'],
|
||||
'$contact_id' => $notification['contact_id'],
|
||||
'$photo' => $notification['photo'],
|
||||
'$fullname' => $notification['name'],
|
||||
'$location' => $notification['location'],
|
||||
'$lbl_location' => DI::l10n()->t('Location:'),
|
||||
'$about' => $notification['about'],
|
||||
'$lbl_about' => DI::l10n()->t('About:'),
|
||||
'$keywords' => $notification['keywords'],
|
||||
'$lbl_keywords' => DI::l10n()->t('Tags:'),
|
||||
'$gender' => $notification['gender'],
|
||||
'$lbl_gender' => DI::l10n()->t('Gender:'),
|
||||
'$hidden' => ['hidden', DI::l10n()->t('Hide this contact from others'), ($notification['hidden'] == 1), ''],
|
||||
'$url' => $notification['url'],
|
||||
'$zrl' => $notification['zrl'],
|
||||
'$lbl_url' => DI::l10n()->t('Profile URL'),
|
||||
'$addr' => $notification['addr'],
|
||||
'$lbl_knowyou' => $lbl_knowyou,
|
||||
'$lbl_network' => DI::l10n()->t('Network:'),
|
||||
'$network' => ContactSelector::networkToName($notification['network'], $notification['url']),
|
||||
'$knowyou' => $knowyou,
|
||||
'$approve' => DI::l10n()->t('Approve'),
|
||||
'$note' => $notification['note'],
|
||||
'$ignore' => DI::l10n()->t('Ignore'),
|
||||
'$discard' => $discard,
|
||||
'$action' => $action,
|
||||
]);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -80,15 +80,15 @@ class Notifications extends BaseNotifications
|
|||
// notification and apply the correct template according to the notificationtype (label).
|
||||
foreach ($notifications['notifications'] as $notification) {
|
||||
$notification_templates = [
|
||||
'like' => 'notifications/likes_item.tpl',
|
||||
'dislike' => 'notifications/dislikes_item.tpl',
|
||||
'attend' => 'notifications/attend_item.tpl',
|
||||
'attendno' => 'notifications/attend_item.tpl',
|
||||
'attendmaybe' => 'notifications/attend_item.tpl',
|
||||
'friend' => 'notifications/friends_item.tpl',
|
||||
'comment' => 'notifications/comments_item.tpl',
|
||||
'post' => 'notifications/posts_item.tpl',
|
||||
'notification' => 'notifications/notification.tpl',
|
||||
'like' => 'notifications/likes_item.tpl',
|
||||
'dislike' => 'notifications/dislikes_item.tpl',
|
||||
'attend' => 'notifications/attend_item.tpl',
|
||||
'attendno' => 'notifications/attend_item.tpl',
|
||||
'attendmaybe' => 'notifications/attend_item.tpl',
|
||||
'friend' => 'notifications/friends_item.tpl',
|
||||
'comment' => 'notifications/comments_item.tpl',
|
||||
'post' => 'notifications/posts_item.tpl',
|
||||
'notification' => 'notifications/notification.tpl',
|
||||
];
|
||||
|
||||
$notificationTemplate = Renderer::getMarkupTemplate($notification_templates[$notification['label']]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue