Add preview toolbar navigation for sets

This commit is contained in:
Wojtek
2026-10-16 20:50:54 +02:00
parent c9076d4a22
commit 887b27f30b
4 changed files with 22 additions and 9 deletions
@@ -0,0 +1 @@
-- Wydanie 1.43.17: zmieniono przyciski paska narzędzi podglądu zestawu.
@@ -29,13 +29,25 @@ class HtmlView extends BaseHtmlView
'media/com_testquestions/egzamin.css'
);
ToolbarHelper::title(Text::_('COM_TESTQUESTIONS_PREVIEW_TITLE'));
ToolbarHelper::link(
$this->set
? Route::_('index.php?option=com_testquestions&task=set.edit&id=' . (int) $this->set->id)
: Route::_('index.php?option=com_testquestions&view=questions'),
$this->set ? 'COM_TESTQUESTIONS_EDIT_SET' : 'COM_TESTQUESTIONS',
'arrow-left'
);
if ($this->set) {
ToolbarHelper::link(
Route::_('index.php?option=com_testquestions&view=sets'),
'COM_TESTQUESTIONS_SETS',
'arrow-left'
);
ToolbarHelper::link(
Route::_('index.php?option=com_testquestions&task=set.edit&id=' . (int) $this->set->id),
'COM_TESTQUESTIONS_EDIT_SET',
'edit'
);
} else {
ToolbarHelper::link(
Route::_('index.php?option=com_testquestions&view=questions'),
'COM_TESTQUESTIONS',
'arrow-left'
);
}
return parent::display($tpl);
}