Add preview toolbar navigation for sets
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user