From f48186145a9abc63adde4b168039f4962f9b85fa Mon Sep 17 00:00:00 2001 From: Fabian Helfer Date: Thu, 22 May 2025 11:21:04 +0200 Subject: [PATCH 1/2] Remove Table2GUI from ilObjFormGUI::moveThreadsObject() --- .../Forum/classes/class.ilObjForumGUI.php | 28 ++++--------------- .../default/tpl.forums_threads_move.html | 2 +- .../tpl.forums_threads_move_thr_row.html | 4 --- lang/ilias_de.lang | 2 +- lang/ilias_en.lang | 2 +- 5 files changed, 8 insertions(+), 30 deletions(-) delete mode 100755 components/ILIAS/Forum/templates/default/tpl.forums_threads_move_thr_row.html diff --git a/components/ILIAS/Forum/classes/class.ilObjForumGUI.php b/components/ILIAS/Forum/classes/class.ilObjForumGUI.php index c1b52748d080..6035f2935000 100755 --- a/components/ILIAS/Forum/classes/class.ilObjForumGUI.php +++ b/components/ILIAS/Forum/classes/class.ilObjForumGUI.php @@ -3851,31 +3851,13 @@ public function moveThreadsObject(): bool $this->toolbar->addButton($this->lng->txt('back'), $this->ctrl->getLinkTarget($this)); } - $tblThr = new ilTable2GUI($this); - - $counter = 0; - $result = []; + $messages = []; foreach ($threads as $thread) { - $result[$counter]['num'] = $counter + 1; - $result[$counter]['thr_subject'] = $thread->getSubject(); - ++$counter; + $messages[] = $this->ui_factory->messageBox()->info( + sprintf($this->lng->txt('move_chosen_topics'), $thread->getSubject()) + ); } - - $tblThr->setId('frmthrmv' . $this->object->getRefId()); - $tblThr->setTitle(''); - $tblThr->addColumn($this->lng->txt('subject'), 'top_name', '100%'); - $tblThr->disable('header'); - $tblThr->disable('footer'); - $tblThr->disable('linkbar'); - $tblThr->disable('sort'); - $tblThr->disable('linkbar'); - $tblThr->setLimit(PHP_INT_MAX); - $tblThr->setRowTemplate('tpl.forums_threads_move_thr_row.html', 'components/ILIAS/Forum'); - $tblThr->setDefaultOrderField('is_sticky'); - - #$tblThr->setData($result); - $moveThreadTemplate->setVariable('THREAD_TITLE', sprintf($this->lng->txt('move_chosen_topics'), $thread->getSubject())); - $moveThreadTemplate->setVariable('THREADS_TABLE', $tblThr->getHTML()); + $moveThreadTemplate->setVariable('THREAD_MESSAGE', $this->uiRenderer->render($messages)); $moveThreadTemplate->setVariable('FRM_SELECTION_TREE', $exp->getHTML()); $moveThreadTemplate->setVariable('CMD_SUBMIT', 'performMoveThreads'); $moveThreadTemplate->setVariable('TXT_SUBMIT', $this->lng->txt('move')); diff --git a/components/ILIAS/Forum/templates/default/tpl.forums_threads_move.html b/components/ILIAS/Forum/templates/default/tpl.forums_threads_move.html index 2fd3b6221af4..380d97e265c4 100755 --- a/components/ILIAS/Forum/templates/default/tpl.forums_threads_move.html +++ b/components/ILIAS/Forum/templates/default/tpl.forums_threads_move.html @@ -1,5 +1,5 @@
-

{THREAD_TITLE}

+{THREAD_MESSAGE}

 

{FRM_SELECTION_TREE}

 

diff --git a/components/ILIAS/Forum/templates/default/tpl.forums_threads_move_thr_row.html b/components/ILIAS/Forum/templates/default/tpl.forums_threads_move_thr_row.html deleted file mode 100755 index db31e51d1bdc..000000000000 --- a/components/ILIAS/Forum/templates/default/tpl.forums_threads_move_thr_row.html +++ /dev/null @@ -1,4 +0,0 @@ - - #{VAL_NUM} - {VAL_THR_SUBJECT} - \ No newline at end of file diff --git a/lang/ilias_de.lang b/lang/ilias_de.lang index 0b9f0b8c89ca..3b5755fb41c3 100644 --- a/lang/ilias_de.lang +++ b/lang/ilias_de.lang @@ -10043,7 +10043,7 @@ forum#:#mark_moderator_posts_desc#:#Beiträge der Moderation werden farblich her forum#:#merge#:#Zusammenführen forum#:#merge_posts_into_thread#:#Verschmelze Posts mit anderem Thema forum#:#merged_threads_successfully#:#Die selektierten Themen wurden erfolgreich zusammengeführt -forum#:#move_chosen_topics#:#Thema „%s“ verschieben nach: +forum#:#move_chosen_topics#:#Bitte wählen Sie das Zielforum für das Thema "%s" forum#:#move_thread_to_forum#:#Verschiebe Thema in ein anderes Forum forum#:#new_post#:#Neuer Beitrag forum#:#new_thread_with_post#:#Neues Thema mit Beitrag diff --git a/lang/ilias_en.lang b/lang/ilias_en.lang index fb089334386e..9671c852de99 100755 --- a/lang/ilias_en.lang +++ b/lang/ilias_en.lang @@ -10054,7 +10054,7 @@ forum#:#mark_moderator_posts_desc#:#If activated moderator posts will be highlig forum#:#merge#:#Merge forum#:#merge_posts_into_thread#:#Merge Posts into other Thread forum#:#merged_threads_successfully#:#The selected threads were merged successfully -forum#:#move_chosen_topics#:#Move thread "%s" to: +forum#:#move_chosen_topics#:#Please choose the target forum for Thread "%s" forum#:#move_thread_to_forum#:#Move Thread to other Forum forum#:#new_post#:#New Post forum#:#new_thread_with_post#:#New Thread with Post From 1c65f930eaced9eccca20e23a226969f1024ef54 Mon Sep 17 00:00:00 2001 From: Fabian Helfer Date: Tue, 27 May 2025 12:07:10 +0200 Subject: [PATCH 2/2] update ilias_en.lang move_chosen_topics --- lang/ilias_en.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/ilias_en.lang b/lang/ilias_en.lang index 9671c852de99..2e7ee20c59ae 100755 --- a/lang/ilias_en.lang +++ b/lang/ilias_en.lang @@ -10054,7 +10054,7 @@ forum#:#mark_moderator_posts_desc#:#If activated moderator posts will be highlig forum#:#merge#:#Merge forum#:#merge_posts_into_thread#:#Merge Posts into other Thread forum#:#merged_threads_successfully#:#The selected threads were merged successfully -forum#:#move_chosen_topics#:#Please choose the target forum for Thread "%s" +forum#:#move_chosen_topics#:#Please choose the target forum for thread "%s" forum#:#move_thread_to_forum#:#Move Thread to other Forum forum#:#new_post#:#New Post forum#:#new_thread_with_post#:#New Thread with Post