From 4a9a4cf0d246455ada84f6905d52a3eaccb8dc83 Mon Sep 17 00:00:00 2001 From: Jimmy Huynh Date: Tue, 26 Jan 2021 18:14:05 +0100 Subject: (+) Adding sharing_user names to EVERY articles + pre-condition if sharedArticle: no title feed (e.g.: from wikiRSS...) Signed-off-by: Marco Nassabain --- l10n/fr.js | 1 + l10n/fr.json | 1 + lib/Db/Item.php | 5 +++++ templates/part.content.php | 10 ++++++++-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/l10n/fr.js b/l10n/fr.js index b52f7bdd6..8a95c0d2d 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -38,6 +38,7 @@ OC.L10N.register( "Remove keep article unread" : "Marquer l'article comme lu", "by" : "par", "from" : "de", + "shared from": "partagé par", "Play audio" : "Ecouter", "Download audio" : "Télécharger le son", "Download video" : "Télécharger la vidéo", diff --git a/l10n/fr.json b/l10n/fr.json index e0908ff64..7b9bfdadc 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -36,6 +36,7 @@ "Remove keep article unread" : "Marquer l'article comme lu", "by" : "par", "from" : "de", + "shared from" : "partagé par", "Play audio" : "Ecouter", "Download audio" : "Télécharger le son", "Download video" : "Télécharger la vidéo", diff --git a/lib/Db/Item.php b/lib/Db/Item.php index 2ead77066..285bc64bc 100644 --- a/lib/Db/Item.php +++ b/lib/Db/Item.php @@ -311,6 +311,11 @@ class Item extends Entity implements IAPI, \JsonSerializable return $this->starred; } + public function isShared(): bool + { + return $this->getSharedBy == '' && $this->getSharedWith == ''; + } + public function isUnread(): bool { return $this->unread; diff --git a/templates/part.content.php b/templates/part.content.php index ecb9688df..8be446f7c 100644 --- a/templates/part.content.php +++ b/templates/part.content.php @@ -192,12 +192,18 @@ t('by')) ?> {{ ::item.author }} - t('from')) ?> - + t('from')) ?> + {{ ::Content.getFeed(item.feedId).title }} favicon + t('shared from')) ?> + + {{ :: item.sharedBy}} + favicon + +
-- cgit v1.2.3