Skip to content
Snippets Groups Projects
Commit 8ff70e20 authored by Fabian Galinski's avatar Fabian Galinski :pouting_cat:
Browse files

[TASK] Adds non pushed features

parent 9cc410f5
No related branches found
Tags 3.2.4
No related merge requests found
......@@ -68,15 +68,19 @@ class ListByCategoryController extends AbstractController {
/** @noinspection PhpUndefinedMethodInspection */
$newsCount = $this->newsRepository->countByPid($selectedCategoryId);
$news = $this->newsRepository->findAllSortedNewsByCategory($selectedCategoryId, $newsPerPage, $offset);
$highlightedNews = $this->newsRepository->findLastUpdatedOrHighlightedNewsByCategory(
1, FALSE, $selectedCategoryId
)->getFirst();
$numberOfPages = ceil($newsCount / $newsPerPage);
$news = $this->newsRepository->findAllSortedNewsByCategory($selectedCategoryId, $newsPerPage, $offset);
$news = $news->toArray();
if ($highlightedNews && !in_array($highlightedNews, $news)) {
$news[] = $highlightedNews;
$highlightedNews = NULL;
if ($currentPageBrowserPage <= 1) {
$highlightedNews = $this->newsRepository->findLastUpdatedOrHighlightedNewsByCategory(
1, FALSE, $selectedCategoryId
)->getFirst();
if ($highlightedNews && !in_array($highlightedNews, $news)) {
$news[] = $highlightedNews;
}
}
$newsMetaData = $highlightedNewsMetaData = [];
......
......@@ -96,11 +96,7 @@ SG.ElementScrollBrowser.prototype = {
this.lastUrl = this.url;
this.url = $(response).find('.tx-pagebrowse-next a').attr('href');
//resultList.find('.tx-sgnews-load-indicator').remove();
$(results[0]).hide();
resultList.append(results);
resultList.find('.tx-sgnews-latest:last').remove();
this.loadIndicator = resultList.children(':last');
this.lock = false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment