integrate loading, running and rendering of QuesttypeAgent for a Quest
This commit is contained in:
parent
7f5572f0e1
commit
eb9511103c
4 changed files with 214 additions and 49 deletions
|
|
@ -9,10 +9,16 @@
|
|||
<img src="<?=$linker->link(array('media','index',$seminary['url'],$media['url']))?>" />
|
||||
<?php endif ?>
|
||||
<section>
|
||||
<?php if($questtext['type'] == 'solved') : ?>
|
||||
<h1><?=_('solved')?></h1>
|
||||
<?php elseif($questtext['type'] == 'unsolved') : ?>
|
||||
<h1><?=_('unsolved')?></h1>
|
||||
<?php else : ?>
|
||||
<h1><?=$questtext['type']?></h1>
|
||||
<?php endif ?>
|
||||
<p><?=\hhu\z\Utils::t($questtext['text'])?></p>
|
||||
|
||||
<?php if(!empty($questtext['sidequests'])) : ?>
|
||||
<?php if(array_key_exists('sidequests', $questtext) && !empty($questtext['sidequests'])) : ?>
|
||||
<ul>
|
||||
<?php foreach($questtext['sidequests'] as &$sidequest) : ?>
|
||||
<li><a href="<?=$linker->link(array('sidequest',$seminary['url'],$questgroup['url'],$quest['url'],$sidequest['url']),1)?>"><?=$sidequest['entry_text']?></a></li>
|
||||
|
|
@ -23,18 +29,21 @@
|
|||
</ul>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if(!empty($questtext['out_text']) && empty($questtext['sidequests'])) : ?>
|
||||
<?php if(array_key_exists('out_text', $questtext) && !empty($questtext['out_text']) && array_key_exists('sidequests', $questtext) && empty($questtext['sidequests'])) : ?>
|
||||
<a href="<?=$linker->link($questtext['pos']+1, 6)?>"><?=$questtext['out_text']?></a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if(array_key_exists('pos', $questtext)) : ?>
|
||||
<?php if($questtext['pos'] > 1) : ?><a href="<?=$linker->link(array($questtext['type_url'],$questtext['pos']-1),5)?>"><</a><?php endif ?>
|
||||
<?=$questtext['pos']?>/<?=$questtext['count']?>
|
||||
<?php if($questtext['pos'] < $questtext['count'] && empty($questtext['out_text'])) : ?><a href="<?=$linker->link(array($questtext['type_url'],$questtext['pos']+1),5)?>">></a><?php endif ?>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
|
||||
<?php if($showtask) : ?>
|
||||
<?php if(!is_null($task)) : ?>
|
||||
<section>
|
||||
<h1><?=_('Task')?></h1>
|
||||
<p><?=\hhu\z\Utils::t($quest['task'])?></p>
|
||||
<p><?=$task?></p>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue