From 2a6cede6cf626359457e160e19cd1eadc96672c9 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 12 Jul 2019 21:40:00 +0200 Subject: [PATCH] [TASK] update list template in order to remove unread information for links to pages and to external urls --- Configuration/TypoScript/setup.typoscript | 39 +++++++++++++++++++ .../Private/Partials/Unreadnews/ListItem.html | 12 +++--- .../Private/Templates/Unreadnews/List.html | 21 ++++++++++ 3 files changed, 65 insertions(+), 7 deletions(-) diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 8da8731..dabbb56 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -73,6 +73,45 @@ plugin.tx_mdunreadnews_unread { } } +/** + * used for ajax call to remove unread information + * + */ +PAGE_REMOVE_UNREAD_NEWS = PAGE +PAGE_REMOVE_UNREAD_NEWS { + typeNum = 120719 + + config { + disableAllHeaderCode = 1 + additionalHeaders = Content-type:application/html + xhtml_cleaning = 0 + debug = 0 + admPanel = 0 + } + + 10 = USER_INT + 10 { + userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run + extensionName = MdUnreadnews + pluginName = Unread + vendorName = Mediadreams + + switchableControllerActions { + Unreadnews { + 1 = removeUnread + } + } + + settings { + useStdWrap := addToList(newsUid) + + newsUid = TEXT + newsUid.data = GP:newsUid + } + } +} + + /** * This lib can be used to show unread information of a news record * Use following code in your fluid template diff --git a/Resources/Private/Partials/Unreadnews/ListItem.html b/Resources/Private/Partials/Unreadnews/ListItem.html index 75a1f04..6a141d9 100644 --- a/Resources/Private/Partials/Unreadnews/ListItem.html +++ b/Resources/Private/Partials/Unreadnews/ListItem.html @@ -2,33 +2,31 @@ *** internal link *** - + *** external link *** - + *** normal news record *** - - - + - + - + diff --git a/Resources/Private/Templates/Unreadnews/List.html b/Resources/Private/Templates/Unreadnews/List.html index d2f8483..bb0a342 100644 --- a/Resources/Private/Templates/Unreadnews/List.html +++ b/Resources/Private/Templates/Unreadnews/List.html @@ -9,6 +9,27 @@ + +