Add read-only preview for question sets
This commit is contained in:
@@ -17,6 +17,15 @@ $resolveImageUrl = static function ($path) {
|
||||
?>
|
||||
<div class="com-testquestions egzamin">
|
||||
<p class="alert alert-info"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_PREVIEW_READONLY'); ?></p>
|
||||
<?php if ($this->set) : ?>
|
||||
<header class="test-set-header">
|
||||
<h1><?php echo htmlspecialchars($this->set->title, ENT_QUOTES, 'UTF-8'); ?></h1>
|
||||
<?php if ($this->set->image) : ?>
|
||||
<div class="foto_pyt"><img src="<?php echo htmlspecialchars($resolveImageUrl($this->set->image), ENT_QUOTES, 'UTF-8'); ?>" alt="" loading="lazy"></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->set->test_content) : ?><div class="test-set-content"><?php echo $this->set->test_content; ?></div><?php endif; ?>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
<?php if (!$this->items) : ?>
|
||||
<div class="alert alert-warning"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_PREVIEW_EMPTY'); ?></div>
|
||||
<?php else : ?>
|
||||
@@ -54,7 +63,7 @@ $resolveImageUrl = static function ($path) {
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<a class="btn btn-secondary" href="<?php echo Route::_('index.php?option=com_testquestions&view=questions'); ?>">
|
||||
<?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_PREVIEW_BACK'); ?>
|
||||
<a class="btn btn-secondary" href="<?php echo $this->set ? Route::_('index.php?option=com_testquestions&task=set.edit&id=' . (int) $this->set->id) : Route::_('index.php?option=com_testquestions&view=questions'); ?>">
|
||||
<?php echo $this->set ? \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_EDIT_SET') : \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_PREVIEW_BACK'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user