Skip to content

Forum UI: Remove Table2GUI from ilObjFormGUI::moveThreadsObject() #9610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 5 additions & 23 deletions components/ILIAS/Forum/classes/class.ilObjForumGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form method="post" action="{FORMACTION}" role="form" class="preventDoubleSubmission">
<h2 class="ilHeader ilTableHeaderTitle">{THREAD_TITLE}</h2>
{THREAD_MESSAGE}
<p>&nbsp;</p>
{FRM_SELECTION_TREE}
<p>&nbsp;</p>
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion lang/ilias_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lang/ilias_en.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading