Skip to content

Commit

Permalink
Fixed problems in layout
Browse files Browse the repository at this point in the history
  • Loading branch information
gvollbach committed Oct 18, 2023
1 parent dab74ca commit 98d694a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Modules/Forum/classes/class.ilObjForumGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -823,8 +823,7 @@ protected function renderThreadOverview(ilForumThreadObject $tbl, ilForum $frm,

$list_item = $this->factory->item()->standard($link)
->withActions($actions)
->withProperties($this->getThreadProperties($current_thread))
->withDescription($current_thread->getFirstVisiblePostNode()->getMessage());
->withProperties($this->getThreadProperties($current_thread));
$list_item = $this->addAvatarToThreadOverview($current_thread, $list_item);
$list_item = $this->markModeratorPostInOverview($list_item, $current_thread->getThrAuthorId(),
$ref_id);
Expand Down Expand Up @@ -987,10 +986,16 @@ protected function getThreadProperties(ilForumTopic $forum_topic) : array
{

$this->ctrl->setParameter($this, 'thr_pk', $forum_topic->getId());
$unread_counter = $forum_topic->getNumUnreadPosts();
if($unread_counter === 0) {
$unread = '';
} else {
$unread = ' (' . $unread_counter . ' ' . $this->lng->txt('unread') . ')';
}
$properties = [
$this->lng->txt('forums_created_by') => $forum_topic->getUserAlias(),
$this->lng->txt('forums_articles') => $forum_topic->getNumPosts() . ' (' . $forum_topic->getNumUnreadPosts() . ')',
$this->lng->txt('forums_last_post') => $forum_topic->getLastPost()->getCreateDate(),
$this->lng->txt('forums_articles') => $forum_topic->getNumPosts() . $unread,
$this->lng->txt('forums_last_post') => $this->object->Forum->convertDate($forum_topic->getLastPost()->getCreateDate()),
$this->lng->txt('visits') => $forum_topic->getVisits(),
];

Expand Down

0 comments on commit 98d694a

Please sign in to comment.