Add configurable subjects to question sets
This commit is contained in:
@@ -50,5 +50,10 @@ class HtmlView extends BaseHtmlView
|
||||
'COM_TESTQUESTIONS_QUESTIONS',
|
||||
'list'
|
||||
);
|
||||
ToolbarHelper::link(
|
||||
'index.php?option=com_testquestions&view=subjects',
|
||||
'COM_TESTQUESTIONS_SUBJECTS',
|
||||
'list'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Komponent\Component\Testquestions\Administrator\View\Subject;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
protected $form;
|
||||
protected $item;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
ToolbarHelper::title($this->item->id ? Text::_('COM_TESTQUESTIONS_EDIT_SUBJECT') : Text::_('COM_TESTQUESTIONS_NEW_SUBJECT'));
|
||||
ToolbarHelper::save('subject.save', 'JTOOLBAR_SAVE');
|
||||
ToolbarHelper::cancel('subject.cancel', 'JTOOLBAR_CANCEL');
|
||||
|
||||
return parent::display($tpl);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Komponent\Component\Testquestions\Administrator\View\Subjects;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
protected $items;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->items = $this->get('Items');
|
||||
ToolbarHelper::title(Text::_('COM_TESTQUESTIONS_SUBJECTS'));
|
||||
ToolbarHelper::addNew('subject.add', 'JTOOLBAR_NEW');
|
||||
ToolbarHelper::editList('subject.edit', 'JTOOLBAR_EDIT');
|
||||
ToolbarHelper::deleteList('', 'subjects.delete', 'JTOOLBAR_DELETE');
|
||||
ToolbarHelper::link('index.php?option=com_testquestions&view=sets', 'COM_TESTQUESTIONS_SETS', 'back');
|
||||
|
||||
return parent::display($tpl);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user