main navigation redesign
This commit is contained in:
commit
8300d4d559
3468 changed files with 596596 additions and 0 deletions
44
views/html/quests/create.tpl
Normal file
44
views/html/quests/create.tpl
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></li>
|
||||
<li><i class="fa fa-chevron-right fa-fw"></i><a href="<?=$linker->link(array('index',$seminary['url']),1)?>"><?=_('Quests')?></a></li>
|
||||
</ul>
|
||||
<h1><?=_('Create Quest')?></h1>
|
||||
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<label for="name"><?=_('Name')?>:</label>
|
||||
<input type="text" name="name" value="" placeholder="<?=_('Name')?>" /><br />
|
||||
<label for="questgroup"><?=_('Questgroup')?>:</label>
|
||||
<select name="questgroup">
|
||||
<?php foreach($questgroups as &$questgroup) : ?>
|
||||
<option value="<?=$questgroup['url']?>"><?=$questgroup['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<label for="questtype"><?=('Questtype')?>:</label>
|
||||
<select name="questtype">
|
||||
<?php foreach($questtypes as &$questtype) : ?>
|
||||
<option value="<?=$questtype['url']?>"><?=$questtype['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<label for="name"><?=_('XPs')?>:</label>
|
||||
<input type="number" name="xps" value="" placeholder="<?=_('XPs')?>" /><br />
|
||||
<input type="file" name="questmedia" /><br />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="prolog">Prolog:</label><br />
|
||||
<textarea name="prolog" placeholder="Prolog" style="width:100%; height:10em;"></textarea><br />
|
||||
<label for="entrytext"><?=('Entry text')?>:</label><br />
|
||||
<textarea name="entrytext" placeholder="<?=_('Entry text')?>" style="width:100%; height:10em;"></textarea><br />
|
||||
<label for="wrongtext"><?=('Wrong text')?>:</label><br />
|
||||
<textarea name="wrongtext" placeholder="<?=_('Wrong text')?>" style="width:100%; height:10em;"></textarea><br />
|
||||
<label for="task"><?=_('Task')?>:</label><br />
|
||||
<textarea name="task" placeholder="<?=('Task')?>" style="width:100%; height:10em;"></textarea><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('Create')?>" />
|
||||
</form>
|
||||
21
views/html/quests/createmedia.tpl
Normal file
21
views/html/quests/createmedia.tpl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></li>
|
||||
</ul>
|
||||
<h1>Create Questsmedia</h1>
|
||||
|
||||
<?php if(!is_null($mediaid)) :?>
|
||||
<p>New mediaId: <?=var_dump($mediaid)?></p>
|
||||
<?php endif ?>
|
||||
<?php if(!empty($error)) :?>
|
||||
<p>Error: <?=$error?></p>
|
||||
<?php endif ?>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<input type="text" name="description" placeholder="Description" /><br />
|
||||
<input type="file" name="file" required="required" /><br />
|
||||
<input type="submit" name="submit" value="create" />
|
||||
</form>
|
||||
41
views/html/quests/index.tpl
Normal file
41
views/html/quests/index.tpl
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url']))?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></li>
|
||||
</ul>
|
||||
<h1><?=_('Quests')?></h1>
|
||||
|
||||
<form method="post" class="logreg admnqf">
|
||||
<fieldset>
|
||||
<legend>Filter</legend>
|
||||
<label for="filters[questgroup]"><?=_('Questgroup')?>:</label>
|
||||
<select name="filters[questgroup]">
|
||||
<option value="0">alle</option>
|
||||
<?php foreach($filters['questgroups'] as &$filter) : ?>
|
||||
<option value="<?=$filter['id']?>" <?php if($filter['id'] == $selectedFilters['questgroup']) : ?>selected="selected"<?php endif ?>><?=$filter['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<label for="filters[questtype]"><?=_('Questtype')?>:</label>
|
||||
<select name="filters[questtype]">
|
||||
<option value="">alle</option>
|
||||
<?php foreach($filters['questtypes'] as &$filter) : ?>
|
||||
<option value="<?=$filter['classname']?>" <?php if($filter['classname'] == $selectedFilters['questtype']) : ?>selected="selected"<?php endif ?>><?=$filter['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</fieldset>
|
||||
<input type="submit" name="filter" value="<?=_('Apply filters')?>" />
|
||||
<input type="submit" name="reset" value="<?=_('Reset filters')?>" />
|
||||
</form>
|
||||
|
||||
<ul class="admnql">
|
||||
<?php foreach($quests as &$quest) : ?>
|
||||
<li>
|
||||
<p class="fwb"><a href="<?=$linker->link(array('quest',$seminary['url'],$quest['questgroup']['url'],$quest['url']),1)?>"><?=$quest['title']?></a><span><a href="<?=$linker->link(array('submissions',$seminary['url'],$quest['questgroup']['url'],$quest['url']),1)?>"><?=$quest['opensubmissionscount']?> open submissions</a></span></p>
|
||||
<p><small><?=$quest['questtype']['title']?>, <?=sprintf(_('%d XPs'), $quest['xps'])?></small></p>
|
||||
<p><small><a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$quest['questgroup']['url']))?>"><?=$quest['questgroup']['title']?></a></small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
141
views/html/quests/quest.tpl
Normal file
141
views/html/quests/quest.tpl
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
<?php if(!is_null($questgroup['picture'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questgroup['picture']['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?=$questgroupshierarchypath?>
|
||||
<h1><?=$quest['title']?></h1>
|
||||
|
||||
<?php if(array_key_exists('Prolog', $questtexts) && count($questtexts['Prolog']) > 0) : ?>
|
||||
<section>
|
||||
<h1 id="questtext"><?=_('Prolog')?></h1>
|
||||
<div class="qtextbox">
|
||||
<?php $mediaShown = false; ?>
|
||||
<?php foreach($questtexts['Prolog'] as &$questtext) : ?>
|
||||
<p class="qtext cf">
|
||||
<?php if(array_key_exists('media', $questtext)) : ?>
|
||||
<a href="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>"><img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questtext['media']['url']))?>" /></a>
|
||||
<?php elseif(!is_null($media) && !$mediaShown) : ?>
|
||||
<?php $mediaShown = true; ?>
|
||||
<a href="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>"><img src="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>" /></a>
|
||||
<?php endif ?>
|
||||
<?=\hhu\z\Utils::t($questtext['text'])?>
|
||||
</p>
|
||||
<?php if(count($questtext['relatedQuestsgroups']) > 0 || !empty($questtext['abort_text'])) : ?>
|
||||
<ul>
|
||||
<?php foreach($questtext['relatedQuestsgroups'] as &$relatedQuestgroup) : ?>
|
||||
<li><a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$relatedQuestgroup['url']))?>"><?=$relatedQuestgroup['entry_text']?></a></li>
|
||||
<?php endforeach ?>
|
||||
<?php if(!empty($questtext['abort_text'])) : ?>
|
||||
<li><a href="<?=$linker->link(array('quest',$seminary['url'],$relatedquesttext['quest']['questgroup_url'],$relatedquesttext['quest']['url'],$relatedquesttext['type_url']),1)?>"><?=$questtext['abort_text']?></a></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if(!is_null($task)) : ?>
|
||||
<section class="task">
|
||||
<h1 id="task"><?=_('Task')?></h1>
|
||||
<?php if(!is_null($queststatus)) : ?>
|
||||
<?php if($queststatus == 'solved') : ?>
|
||||
<div class="success">
|
||||
<p class="fwb"><i class="fa fa-check-circle fa-fw"></i><?=_('solved')?></p>
|
||||
<p><small><?=_('Quest completed.')?> <?php if($quest['xps'] > 0): ?><?=sprintf(_('You have earned %d XPs.'), $quest['xps'])?><?php endif ?></small></p>
|
||||
</div>
|
||||
<?php elseif($queststatus == 'unsolved') : ?>
|
||||
<div class="error">
|
||||
<p class="fwb"><i class="fa fa-times-circle fa-fw"></i><?=_('unsolved')?></p>
|
||||
<p><small><?=\hhu\z\Utils::t($quest['wrong_text'])?></small></p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if($queststatus != 'solved') : ?>
|
||||
<p><?=$t->t($quest['task'])?></p>
|
||||
<?=$task?>
|
||||
|
||||
<?php if($solved && empty($queststatus)) : ?>
|
||||
<div class="solvdmsg">
|
||||
<p><?=_('Task already successfully solved')?>:
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(null,0,false,array('show-answer'=>'true'),true,'task')?>"><?=_('Show answer')?></a></li>
|
||||
</nav>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if(array_key_exists('Epilog', $questtexts) && count($questtexts['Epilog']) > 0) : ?>
|
||||
<section>
|
||||
<h1 id="questtext"><?=_('Epilog')?></h1>
|
||||
<div class="qtextbox">
|
||||
<?php foreach($questtexts['Epilog'] as &$questtext) : ?>
|
||||
<p class="qtext cf">
|
||||
<?php if(array_key_exists('media', $questtext)) : ?>
|
||||
<a href="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>"><img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questtext['media']['url']))?>" /></a>
|
||||
<?php endif ?>
|
||||
<?=\hhu\z\Utils::t($questtext['text'])?>
|
||||
</p>
|
||||
<?php if(count($questtext['relatedQuestsgroups']) > 0 || !empty($questtext['abort_text'])) : ?>
|
||||
<ul>
|
||||
<?php foreach($questtext['relatedQuestsgroups'] as &$relatedQuestgroup) : ?>
|
||||
<li><p><a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$relatedQuestgroup['url']))?>"><?=$relatedQuestgroup['entry_text']?></a></p></li>
|
||||
<?php endforeach ?>
|
||||
<?php if(!empty($questtext['abort_text'])) : ?>
|
||||
<li><p><a href="<?=$linker->link(array('quest',$seminary['url'],$relatedquesttext['quest']['questgroup_url'],$relatedquesttext['quest']['url'],$relatedquesttext['type_url']),1)?>"><?=$questtext['abort_text']?></a></p></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if(!is_null($nextquests) || !is_null($nextquestgroup)) : ?>
|
||||
<section>
|
||||
<h1><?=_('Continuation')?></h1>
|
||||
<?php if(count($nextquests) > 0) : ?>
|
||||
<ul>
|
||||
<?php foreach($nextquests as &$nextquest) : ?>
|
||||
<?php if($nextquest['id'] == $relatedquesttext['quest']['id']) : ?>
|
||||
<li>
|
||||
<p>
|
||||
<?=_('Quest')?>:
|
||||
<?php if($nextquest['entered'] || !$charactedHasChoosenNextQuest) : ?>
|
||||
<a href="<?=$linker->link(array($nextquest['questgroup_url'],$nextquest['url'],$relatedquesttext['type_url']),3)?>"><?=$nextquest['title']?></a>
|
||||
<?php else : ?>
|
||||
<?=$nextquest['title']?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
</li>
|
||||
<?php else : ?>
|
||||
<li>
|
||||
<p>
|
||||
<?php if(!empty($nextquest['entry_text'])) : ?>
|
||||
<i><?=$nextquest['entry_text']?></i>
|
||||
<?php if($nextquest['entered'] || !$charactedHasChoosenNextQuest) : ?>
|
||||
<a class="cta orange" href="<?=$linker->link(array($nextquest['questgroup_url'],$nextquest['url']),3)?>"><?=_('Choose')?></a>
|
||||
<?php endif ?>
|
||||
<?php else : ?>
|
||||
<?=_('Quest')?>: <a href="<?=$linker->link(array($nextquest['questgroup_url'],$nextquest['url']),3)?>"><?=$nextquest['title']?></a>
|
||||
<?php if($nextquest['entered'] || !$charactedHasChoosenNextQuest) : ?>
|
||||
<a class="cta orange" href="<?=$linker->link(array($nextquest['questgroup_url'],$nextquest['url']),3)?>"><?=_('Let’s go')?></a>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php elseif(!is_null($nextquestgroup)) : ?>
|
||||
<p>
|
||||
<?=$nextquestgroup['hierarchy']['title_singular']?> <?=$nextquestgroup['hierarchy']['questgroup_pos']?>: <a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$nextquestgroup['url']))?>"><?=$nextquestgroup['title']?></a>
|
||||
<a class="cta orange" href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$nextquestgroup['url']))?>"><?=_('Let’s go')?></a>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
12
views/html/quests/submission.tpl
Normal file
12
views/html/quests/submission.tpl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php if(!is_null($questgroup['picture'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questgroup['picture']['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?=$questgroupshierarchypath?>
|
||||
<h1><?=$quest['title']?></h1>
|
||||
|
||||
<h3><?=sprintf(_('Submission of %s'),$character['name'])?></h3>
|
||||
<section>
|
||||
<?=$output?>
|
||||
</section>
|
||||
37
views/html/quests/submissions.tpl
Normal file
37
views/html/quests/submissions.tpl
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php if(!is_null($questgroup['picture'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questgroup['picture']['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?=$questgroupshierarchypath?>
|
||||
<h1><?=$quest['title']?></h1>
|
||||
|
||||
<section>
|
||||
<h1><?=_('submitted')?></h1>
|
||||
<ol class="cglist">
|
||||
<?php foreach($submittedSubmissionCharacters as &$character) : ?>
|
||||
<li>
|
||||
<a href="<?=$linker->link(array('submission',$seminary['url'],$questgroup['url'],$quest['url'],$character['url']),1)?>"><?=$character['name']?></a>
|
||||
<span class="xp"><small><?=sprintf(_('submitted at %s on %s h'), $dateFormatter->format(new \DateTime($character['submission']['created'])), $timeFormatter->format(new \DateTime($character['submission']['created'])))?></small></span>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ol>
|
||||
|
||||
<h1><?=_('unsolved')?></h1>
|
||||
<ol class="cglist">
|
||||
<?php foreach($unsolvedSubmissionCharacters as &$character) : ?>
|
||||
<li>
|
||||
<a href="<?=$linker->link(array('submission',$seminary['url'],$questgroup['url'],$quest['url'],$character['url']),1)?>"><?=$character['name']?></a>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ol>
|
||||
|
||||
<h1><?=_('solved')?></h1>
|
||||
<ol class="cglist">
|
||||
<?php foreach($solvedSubmissionCharacters as &$character) : ?>
|
||||
<li>
|
||||
<a href="<?=$linker->link(array('submission',$seminary['url'],$questgroup['url'],$quest['url'],$character['url']),1)?>"><?=$character['name']?></a>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ol>
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue