diff options
Diffstat (limited to 'templates/part.listfolder.php')
-rw-r--r-- | templates/part.listfolder.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/templates/part.listfolder.php b/templates/part.listfolder.php index 9057a14ba..2eea9c7e7 100644 --- a/templates/part.listfolder.php +++ b/templates/part.listfolder.php @@ -6,13 +6,23 @@ $l = new OC_l10n('news'); $folder = isset($_['folder']) ? $_['folder'] : null; $folderId = $folder->getId(); $folderName = $folder->getName(); + if($folder->getOpened()){ $openedClass = 'open'; } else { $openedClass = 'collapsed'; } -echo '<li class="folder ' . $openedClass . ' all_read" data-id="' . $folderId . '">'; + +$lastViewedFeedId = isset($_['lastViewedFeedId']) ? $_['lastViewedFeedId'] : null; +$lastViewedFeedType = isset($_['lastViewedFeedType']) ? $_['lastViewedFeedType'] : null; +if ($lastViewedFeedType === OCA\News\FeedType::FOLDER && $lastViewedFeedId === $feedId){ + $activeClass = 'active'; +} else { + $activeClass = ''; +} + +echo '<li class="folder ' . $openedClass . ' ' . $activeClass . ' all_read" data-id="' . $folderId . '">'; echo '<button class="collapsable_trigger" title="' . $l->t('Collapse') . '"></button>'; echo '<a href="#" class="title">' . htmlspecialchars($folderName, ENT_QUOTES, 'UTF-8') . '</a>'; echo '<span class="buttons">'; |