do not show Quest picture on submissions page
This commit is contained in:
commit
647428d417
244 changed files with 24121 additions and 0 deletions
94
views/html/achievements/index.tpl
Normal file
94
views/html/achievements/index.tpl
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<?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><i class="fa fa-trophy fa-fw"></i><?=_('Achievements')?></h1>
|
||||
<p><?=_('Achievement description')?></p>
|
||||
<div class="cf">
|
||||
<section class="rare">
|
||||
<h2><?=_('Seldom Achievements')?></h2>
|
||||
<ol>
|
||||
<?php foreach($seldomAchievements as &$achievement) : ?>
|
||||
<li class="cf">
|
||||
<?php if($achievement['achieved'] !== false) : ?>
|
||||
<?php if(!is_null($achievement['achieved_achievementsmedia_id'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','achievement',$seminary['url'],$achievement['url']))?>" />
|
||||
<?php endif ?>
|
||||
<?php else : ?>
|
||||
<?php if(!is_null($achievement['unachieved_achievementsmedia_id'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','achievement',$seminary['url'],$achievement['url']))?>" />
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<p class="fwb"><?=$achievement['title']?></p>
|
||||
<p><small><?=sprintf(_('Achievement has been achieved only %d times'), $achievement['c'])?></small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="rare hunter">
|
||||
<h2><?=_('Most successful collectors')?></h2>
|
||||
<ol>
|
||||
<?php foreach($successfulCharacters as $successfulCharacter) : ?>
|
||||
<li class="cf">
|
||||
<img src="<?=$linker->link(array('media','avatar',$seminary['url'],$successfulCharacter['charactertype_url'],$successfulCharacter['xplevel'],'portrait'))?>" />
|
||||
<p class="fwb"><?=$successfulCharacter['name']?></p>
|
||||
<p><small><?=sprintf(_('Character has achieved %d Achievements'), $successfulCharacter['c'])?></small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ol>
|
||||
</section>
|
||||
</div>
|
||||
<h2><?=_('Personal Achievements')?></h2>
|
||||
<div class="libindxpr cf">
|
||||
<p><small><?=sprintf(_('Own progress: %d %%'), round(count($achievedAchievements) / (count($achievedAchievements)+count($unachievedAchievements)) * 100))?></small></p>
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round(count($achievedAchievements) / (count($achievedAchievements)+count($unachievedAchievements)) * 100)?>%"></span>
|
||||
</div>
|
||||
</div>
|
||||
<p><small><b><?=$character['rank']?>. <?=_('Rank')?>:</b> <?=sprintf(_('You achieved %d of %d Achievements so far'), count($achievedAchievements), count($achievedAchievements)+count($unachievedAchievements))?>.</small></p>
|
||||
<ul class="achmnts">
|
||||
<li class="cf">
|
||||
<img src="http://legende-von-zyren.de/img/achieve/36b.jpg" />
|
||||
<p class="fwb">Freigeschaltetes Achievement<span class="unlcked">erreicht am 17.06.104</span></p>
|
||||
<p class="desc">Das Bild ist entsprechend farbig, ein eventueller Fortschrittsbalken mit 100% soll entfallen.</p>
|
||||
</li>
|
||||
<?php foreach($achievedAchievements as &$achievement) : ?>
|
||||
<li class="cf">
|
||||
<?php if(!is_null($achievement['achieved_achievementsmedia_id'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','achievement',$seminary['url'],$achievement['url']))?>" />
|
||||
<?php endif ?>
|
||||
<p class="fwb">
|
||||
<?=$achievement['title']?>
|
||||
<span class="unlcked"><?=sprintf(_('achieved at: %s'), $dateFormatter->format(new \DateTime($achievement['created'])))?></span>
|
||||
</p>
|
||||
<p class="desc"><?=\hhu\z\Utils::t($achievement['description'])?></p>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
<?php foreach($unachievedAchievements as &$achievement) : ?>
|
||||
<li class="cf">
|
||||
<?php if(!is_null($achievement['unachieved_achievementsmedia_id'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','achievement',$seminary['url'],$achievement['url']))?>" />
|
||||
<?php endif ?>
|
||||
<p class="fwb">
|
||||
<?=(!$achievement['hidden']) ? $achievement['title'] : _('Secret Achievement')?>
|
||||
</p>
|
||||
<?php if(!$achievement['hidden']) : ?>
|
||||
<p class="desc"><?=\hhu\z\Utils::t($achievement['description'])?></p>
|
||||
<?php else : ?>
|
||||
<p class="desc"><?=_('Continue playing to unlock this secret Achievement')?></p>
|
||||
<?php endif ?>
|
||||
<?php if(array_key_exists('characterProgress', $achievement)) : ?>
|
||||
<div class="prgrss cf">
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round($achievement['characterProgress']*100)?>%"></span>
|
||||
</div>
|
||||
<p class="xpnumeric"><?=round($achievement['characterProgress']*100)?>%</p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
50
views/html/charactergroups/group.tpl
Normal file
50
views/html/charactergroups/group.tpl
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?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)?>"><?=_('Character Groups')?></a></li>
|
||||
<li><i class="fa fa-chevron-right fa-fw"></i><a href="<?=$linker->link(array('groupsgroup',$seminary['url'],$groupsgroup['url']),1)?>"><?=$groupsgroup['name']?></a></li>
|
||||
</ul>
|
||||
<div class="gbanner cf">
|
||||
<img src="http://s1.directupload.net/images/140325/3eqybn4i.png" class="gbanner">
|
||||
<h1><?=$group['name']?></h1>
|
||||
<p>"<?=$group['motto']?>"</p>
|
||||
</div>
|
||||
<ul class="gdata cf">
|
||||
<li><?=$group['rank']?>. <?=_('Rank')?></li>
|
||||
<li><?=$group['xps']?> XP</li>
|
||||
<li><?=count($group['characters'])?> <?=(count($group['characters']) > 1) ? _('Members') : _('Member')?></li>
|
||||
</ul>
|
||||
|
||||
<section>
|
||||
<h1><i class="fa fa-users fa-fw"></i><?=_('Characters')?></h1>
|
||||
<ul class="gchars cf">
|
||||
<?php foreach($group['characters'] as &$character) : ?>
|
||||
<li>
|
||||
<?php if(array_key_exists('small_avatar', $character)) : ?>
|
||||
<p><img src="<?=$linker->link(array('media','seminary',$seminary['url'],$character['small_avatar']['url']))?>"></p>
|
||||
<?php endif ?>
|
||||
<p><a href="<?=$linker->link(array('characters','character',$seminary['url'],$character['url']))?>"><?=$character['name']?></a></p>
|
||||
<p><small><?=$character['xps']?> XP</small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1><i class="fa fa-pencil-square-o fa-fw"></i><?=_('Quests')?></h1>
|
||||
<ul class="gquests">
|
||||
<?php foreach($quests as &$quest) : ?>
|
||||
<li class="cf">
|
||||
<p>
|
||||
<span class="date"><?=$dateFormatter->format(new \DateTime($quest['created']))?></span>
|
||||
<a href="<?=$linker->link(array('charactergroupsquests','quest',$seminary['url'],$groupsgroup['url'],$quest['url']))?>" class="fwb"><?=$quest['title']?></a>
|
||||
<span class="xp"><?=$quest['group_xps']?> / <?=$quest['xps']?> XP</span>
|
||||
</p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
25
views/html/charactergroups/groupsgroup.tpl
Normal file
25
views/html/charactergroups/groupsgroup.tpl
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?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)?>"><?=_('Character Groups')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=$groupsgroup['name']?></h1>
|
||||
|
||||
<ol class="cglist">
|
||||
<?php foreach($groups as &$group) : ?>
|
||||
<li><a href="<?=$linker->link(array('group',$seminary['url'],$groupsgroup['url'],$group['url']),1)?>"><?=$group['name']?></a><span class="xp"><?=$group['xps']?> XP</span></li>
|
||||
<?php endforeach ?>
|
||||
</ol>
|
||||
|
||||
|
||||
<h2><?=_('Character Groups Quests')?></h2>
|
||||
<ul class="cgqlist">
|
||||
<?php foreach($quests as &$quest) : ?>
|
||||
<li><a href="<?=$linker->link(array('charactergroupsquests','quest',$seminary['url'],$groupsgroup['url'],$quest['url']))?>"><?=$quest['title']?></a></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
14
views/html/charactergroups/index.tpl
Normal file
14
views/html/charactergroups/index.tpl
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?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><?=_('Character Groups')?></h1>
|
||||
<ul class="cgqlist">
|
||||
<?php foreach($groupsgroups as &$group) : ?>
|
||||
<li><a href="<?=$linker->link(array('groupsgroup',$seminary['url'],$group['url']),1)?>"><?=$group['name']?></a></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
53
views/html/charactergroupsquests/quest.tpl
Normal file
53
views/html/charactergroupsquests/quest.tpl
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?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('charactergroups','groupsgroup',$seminary['url'],$groupsgroup['url']))?>"><?=$groupsgroup['name']?></a></li>
|
||||
<li><i class="fa fa-chevron-right fa-fw"></i><?=_('Character Groups Quests')?></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=$quest['title']?></h1>
|
||||
<small>Maximale Belohnung: <span class="fwb"><?=$quest['xps']?> XP</span></small>
|
||||
|
||||
<section>
|
||||
<h1><i class="fa fa-envelope fa-fw"></i><?=_('Description')?></h1>
|
||||
<p>
|
||||
<?php if(!is_null($media)) : ?>
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>" class="grpqimg" />
|
||||
<?php endif ?>
|
||||
<?=\hhu\z\Utils::t($quest['description'])?>
|
||||
</p>
|
||||
<?php if(!empty($quest['rules'])) : ?>
|
||||
<h1><i class="fa fa-exclamation-triangle fa-fw"></i><?=_('Rules')?></h1>
|
||||
<p><?=\hhu\z\Utils::t($quest['rules'])?></p>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
|
||||
<?php if(!empty($quest['von_text'])) : ?>
|
||||
<section>
|
||||
<h1><i class="fa fa-thumbs-up fa-fw"></i><?=_('Won Quest')?></h1>
|
||||
<p><?=\hhu\z\Utils::t($quest['won_text'])?></p>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
<?php if(!empty($quest['lost_text'])) : ?>
|
||||
<section>
|
||||
<h1><i class="fa fa-thumbs-down fa-fw"></i><?=_('Lost Quest')?></h1>
|
||||
<p><?=\hhu\z\Utils::t($quest['lost_text'])?></p>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
|
||||
<section>
|
||||
<h1><i class="fa fa-users fa-fw"></i><?=$groupsgroup['name']?></h1>
|
||||
<ul class="grpqlist">
|
||||
<?php foreach($groups as &$group) : ?>
|
||||
<li>
|
||||
<span class="date"><?=$dateFormatter->format(new \DateTime($group['created']))?></span>
|
||||
<span class="group"><a href="<?=$linker->link(array('charactergroups','group',$seminary['url'],$groupsgroup['url'],$group['url']))?>"><?=$group['name']?></a></span>
|
||||
<span class="xp"><?=$group['xps']?> XP</span>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
101
views/html/characters/character.tpl
Normal file
101
views/html/characters/character.tpl
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
<h2><a href="<?=$linker->link(array('index',$seminary['url']),1)?>"><?=_('Characters')?></a></h2>
|
||||
<h3><i class="fa fa-user fa-fw"></i><?=$character['name']?></h3>
|
||||
|
||||
<section class="cf">
|
||||
<div class="cinfo">
|
||||
<div class="cdata">
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round($character['quest_xps']*100/$seminary['achievable_xps'])?>%"></span>
|
||||
</div>
|
||||
<p><small><?=_('Total progress')?>: <?=round($character['quest_xps']*100/$seminary['achievable_xps'])?> %</small></p>
|
||||
</div>
|
||||
<div class="cdata square">
|
||||
<p class="value"><?=$character['xplevel']['level']?></p>
|
||||
<p><small><?=_('Level')?></small></p>
|
||||
</div>
|
||||
<div class="cdata square">
|
||||
<p class="value"><?=$character['xps']?></p>
|
||||
<p><small>XP</small></p>
|
||||
</div>
|
||||
<div class="cdata square blue">
|
||||
<p class="value"><?=$character['rank']?>.</p>
|
||||
<p><small><?=_('Rank')?></small></p>
|
||||
</div>
|
||||
|
||||
<h1><i class="fa fa-trophy fa-fw"></i><?=_('Achievements')?></h1>
|
||||
<ul class="cranks">
|
||||
<?php foreach($achievements as &$achievement) : ?>
|
||||
<li>
|
||||
<?php if(!is_null($achievement['achieved_achievementsmedia_id'])) : ?>
|
||||
<a href="#" title="Achievement-Titel"><img src="<?=$linker->link(array('media','achievement',$seminary['url'],$achievement['url']))?>"></a>
|
||||
<?php endif ?>
|
||||
<p><a href="#"><?=$achievement['title']?></a></p>
|
||||
<p><small><?=sprintf(_('achieved at: %s'), $dateFormatter->format(new \DateTime($achievement['created'])))?></small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cportrait">
|
||||
<img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level']))?>" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cf">
|
||||
<section class="fll48">
|
||||
<h1><i class="fa fa-users fa-fw"></i><?=_('Character Groups')?></h1>
|
||||
<ul class="cgroups cf">
|
||||
<?php foreach($groups as &$group) : ?>
|
||||
<li class="cf">
|
||||
<img src="http://s1.directupload.net/images/140325/3eqybn4i.png">
|
||||
<a href="<?=$linker->link(array('charactergroups','group',$seminary['url'],$group['charactergroupsgroup_url'],$group['url']))?>"><?=$group['name']?></a><p><span><?=$group['xps']?> XPs</span></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="flr48">
|
||||
<h1><i class="fa fa-list fa-fw"></i><?=_('Ranking')?></h1>
|
||||
<ul class="cranks">
|
||||
<?php foreach($ranking['superior'] as $index => &$rankCharacter) : ?>
|
||||
<li>
|
||||
<a href="#" title="Achievement-Titel"><img src="<?=$linker->link(array('media','avatar',$seminary['url'],$rankCharacter['charactertype_url'],$rankCharacter['xplevel'],'portrait'))?>"></a>
|
||||
<p><?=$character['rank']-count($ranking['superior'])+$index?>. <a href="#"><?=$rankCharacter['name']?></a></p>
|
||||
<p><small><?=_('Level')?> <?=$rankCharacter['xplevel']?> (<?=$rankCharacter['xps']?> XPs)</small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<li>
|
||||
<a href="#" title="Achievement-Titel"><img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level'],'portrait'))?>"></a>
|
||||
<p class="fwb"><?=$character['rank']?>. <a href="#"><?=$character['name']?></a></p>
|
||||
<p><small><?=_('Level')?> <?=$character['xplevel']['level']?> (<?=$character['xps']?> XPs)</small></p>
|
||||
</li>
|
||||
<?php foreach($ranking['inferior'] as $index => &$rankCharacter) : ?>
|
||||
<li>
|
||||
<a href="#" title="Achievement-Titel"><img src="<?=$linker->link(array('media','avatar',$seminary['url'],$rankCharacter['charactertype_url'],$rankCharacter['xplevel'],'portrait'))?>"></a>
|
||||
<p><?=$character['rank']+$index+1?>. <a href="#"><?=$rankCharacter['name']?></a></p>
|
||||
<p><small><?=_('Level')?> <?=$rankCharacter['xplevel']?> (<?=$rankCharacter['xps']?> XPs)</small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
<h1><i class="fa fa-book fa-fw"></i><?=_('Topic progress')?></h1>
|
||||
<ul class="ctopics cf">
|
||||
<?php foreach($questtopics as &$topic) : ?>
|
||||
<li>
|
||||
<p><small><a href="<?=$linker->link(array('library','topic',$seminary['url'],$topic['url']))?>"><?=$topic['title']?></a> (<?=$topic['characterQuestcount']?>/<?=$topic['questcount']?>)</small></p>
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round($topic['characterQuestcount']/$topic['questcount']*100)?>%"></span>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
17
views/html/characters/index.tpl
Normal file
17
views/html/characters/index.tpl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
<h2><?=_('Characters')?></h2>
|
||||
|
||||
<ul class="gchars cf">
|
||||
<?php foreach($characters as &$character) : ?>
|
||||
<li>
|
||||
<p><img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level'],'portrait'))?>"></p>
|
||||
<p><a href="<?=$linker->link(array('characters','character',$seminary['url'],$character['url']))?>"><?=$character['name']?></a></p>
|
||||
<p><small><?=$character['xps']?> XP</small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
82
views/html/characters/register.tpl
Normal file
82
views/html/characters/register.tpl
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><?=$seminary['title']?></h1>
|
||||
<h2><?=_('Create Character')?></h2>
|
||||
|
||||
<form method="post" action="">
|
||||
<?php if($validation !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'charactername':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Character name is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Character name is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Character name contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Character name already exists');
|
||||
break;
|
||||
default: echo _('Character name invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<fieldset>
|
||||
<legend><?=_('Character properties')?></legend>
|
||||
<label for="charactername"><?=_('Character name')?>:</label>
|
||||
<input type="text" name="charactername" placeholder="<?=_('Character name')?>" required="required" value="<?=$charactername?>" /><br />
|
||||
<label for="type"><?=_('Character type')?>:</label>
|
||||
<select name="type" required="required">
|
||||
<?php foreach($types as &$type) : ?>
|
||||
<option value="<?=$type['url']?>" <?php if(array_key_exists('selected', $type) && $type['selected']) : ?>selected="selected"<?php endif ?>><?=$type['name']?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</fieldset>
|
||||
|
||||
<?php if($fieldsValidation !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($fieldsValidation as $field => &$settings) : ?>
|
||||
<li><?=sprintf(_('The Seminary field “%s” is invalid'), $field)?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<fieldset>
|
||||
<legend><?=_('Seminary fields')?></legend>
|
||||
<?php foreach($fields as &$field) : ?>
|
||||
<label for="fields[<?=$field['url']?>]"><?=$field['title']?>:</label>
|
||||
<?php switch($field['type_title']) {
|
||||
case 'Number':
|
||||
case 'Varchar': ?>
|
||||
<input type="text" name="fields[<?=$field['url']?>]" pattern="<?=(!empty($field['regex'])) ? substr($field['regex'],1,strrpos($field['regex'],$field['regex'][0])-1) : ''?>" <?php if($field['required']) : ?>required="required"<?php endif ?>/>
|
||||
<?php break;
|
||||
case 'Text': ?>
|
||||
<textarea name="fields[<?=$field['url']?>]"></textarea>
|
||||
<?php break;
|
||||
case 'List': ?>
|
||||
<select name="fields[<?=$field['url']?>]">
|
||||
<?php foreach(explode('|', substr($field['regex'],1,strrpos($field['regex'],$field['regex'][0])-1)) as $option) : ?>
|
||||
<option value="<?=mb_eregi_replace('\\\\','',$option)?>"><?=mb_eregi_replace('\\\\','',$option)?></option>
|
||||
<?php endforeach?>
|
||||
</select>
|
||||
<?php break;
|
||||
} ?>
|
||||
<br />
|
||||
<?php endforeach ?>
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
2
views/html/error/index.tpl
Normal file
2
views/html/error/index.tpl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1><?=_('Error')?></h1>
|
||||
<p class="error"><?=$code?>: <?=$string?></p>
|
||||
56
views/html/html.tpl
Normal file
56
views/html/html.tpl
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>The Legend of Z</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
|
||||
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="<?=$linker->link(array('css','desktop.css'))?>" media="all" />
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery.nicescroll.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(
|
||||
function() {
|
||||
$("#qtextbox").niceScroll({autohidemode:false,cursorcolor:"#c2beb9"});
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<!--[if lt IE 9]>
|
||||
<script type="text/javascript" src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="/js/dnd.js"></script>
|
||||
<meta name="description" content="">
|
||||
<meta name="robots" content="noindex,follow">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<input type="checkbox" id="toggle">
|
||||
<label for="toggle" class="toggle" onclick><a id="navicon"><i class="fa fa-bars"></i>Menü</a></label>
|
||||
<?php if(!is_null($loggedUser)) : ?>
|
||||
<?php if(!is_null($loggedCharacter)) : ?>
|
||||
<a href="<?=$linker->link(array('characters','character',$loggedSeminary['url'],$loggedCharacter['url']))?>" id="profile"><i class="fa fa-user fa-fw"></i><?=$loggedCharacter['name']?><span class="circlenote"><?=$loggedCharacter['xplevel']?></span></a>
|
||||
<?php else : ?>
|
||||
<a href="<?=$linker->link(array('users',$loggedUser['url']))?>" id="profile"><i class="fa fa-user fa-fw"></i><?=$loggedUser['username']?></a>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<menu>
|
||||
<?=$menu?>
|
||||
</menu>
|
||||
</nav>
|
||||
</header>
|
||||
<article class="wrap">
|
||||
<?=$intermediate?>
|
||||
</article>
|
||||
<aside>
|
||||
<?php if(!is_null($loggedCharacter) && count($loggedUser['seminaryroles']) > 0) : ?>
|
||||
<?=$seminarybar?>
|
||||
<?php endif ?>
|
||||
</aside>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
36
views/html/introduction/index.tpl
Normal file
36
views/html/introduction/index.tpl
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<h1><?=_('Introduction')?></h1>
|
||||
<p>Ein Projekt zum Thema „Gamification im Lehrumfeld“ – basierend auf <a href="http://legende-von-zyren.de">Die Legende von Zyren</a>.</p>
|
||||
|
||||
<?php if(is_null($userId)) : ?>
|
||||
<h2><?=_('Login')?></h2>
|
||||
<form method="post" action="<?=$linker->link(array('users','login'))?>" class="logreg">
|
||||
<fieldset>
|
||||
<label for="username"><?=_('Username')?>:</label>
|
||||
<input name="username" type="text" placeholder="<?=_('Username')?>" title="<?=_('Username')?>" required="required" /><br />
|
||||
<label for="password"><?=_('Password')?>:</label>
|
||||
<input name="password" type="password" placeholder="<?=_('Password')?>" title="<?=_('Password')?>" required="required" /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="login" class="cta" value="<?=_('Login')?>" />
|
||||
<?=_('or')?> <a href="<?=$linker->link(array('users','register'))?>"><?=_('register yourself')?></a>
|
||||
</form>
|
||||
<?php endif ?>
|
||||
|
||||
<h2>Entwickler</h2>
|
||||
<ul>
|
||||
<li itemscope itemtype="http://schema.org/Person">
|
||||
<span itemprop="name">Oliver Hanraths</span><br />
|
||||
Programmierung und Datenbank
|
||||
</li>
|
||||
<li itemscope itemtype="http://schema.org/Person">
|
||||
<span itemprop="name">Daniel Miskovic</span><br />
|
||||
GUI und Webdesign
|
||||
</li>
|
||||
<li itemscope itemtype="http://schema.org/Person">
|
||||
<span itemprop="name">Kathrin Knautz</span>, <span itemprop="honorificSuffix">B.A., M.A.</span><br />
|
||||
Leitung
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p itemscope itemtype="http://schema.org/CollegeOrUniversity">
|
||||
<a itemprop="name" href="http://www.uni-duesseldorf.de">Heinrich-Heine-Universität Düsseldorf</a>
|
||||
</p>
|
||||
28
views/html/library/index.tpl
Normal file
28
views/html/library/index.tpl
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?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><i class="fa fa-book fa-fw"></i><?=_('Questtopics')?></h1>
|
||||
<p>Hier findest du alle Themen aus der Vorlesung "Wissensrepräsentation" und die passenden Quests zum Nachschlagen und Wiederholen. Dein Fortschritt in "Die Legende von Zyren" beeinflusst den Umfang der Bibliothek, spiele also regelmäßig weiter und schalte so Quest für Quest alle Inhalte frei.</p>
|
||||
<div class="libindxpr cf">
|
||||
<p><small>Gesamtfortschritt: 77%</small></p>
|
||||
<div class="xpbar">
|
||||
<span style="width:77%"></span>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="libindx cf">
|
||||
<?php foreach($questtopics as &$topic) : ?>
|
||||
<li class="cf">
|
||||
<i class="fa fa-file-o"></i>
|
||||
<p class="ltopc"><a href="<?=$linker->link(array('library','topic',$seminary['url'],$topic['url']))?>"><?=$topic['title']?></a></p>
|
||||
<p><small>Fortschritt: <?=$topic['characterQuestcount']?> / <?=$topic['questcount']?></small></p>
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round($topic['characterQuestcount']/$topic['questcount']*100)?>%"></span>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
30
views/html/library/topic.tpl
Normal file
30
views/html/library/topic.tpl
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?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)?>"><?=_('Questtopics')?></a></li>
|
||||
</ul>
|
||||
<h1><i class="fa fa-book fa-fw"></i><?=$questtopic['title']?></h1>
|
||||
<div class="libindxpr cf">
|
||||
<p><small>Themenfortschritt: <?=$questtopic['characterQuestcount']?> / <?=$questtopic['questcount']?></small></p>
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round($questtopic['characterQuestcount']/$questtopic['questcount']*100)?>%"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Quests zu diesem Thema:</h2>
|
||||
<ul class="libtop">
|
||||
<?php foreach($quests as &$quest) : ?>
|
||||
<li>
|
||||
<p><a href="<?=$linker->link(array('quests','quest',$seminary['url'],$quest['questgroup']['url'],$quest['url']))?>"><?=$quest['title']?></a></p>
|
||||
<ul class="addon">
|
||||
<?php foreach($quest['subtopics'] as &$subtopic) : ?>
|
||||
<li><?=$subtopic['title']?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
9
views/html/menu/index.tpl
Normal file
9
views/html/menu/index.tpl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<li><a href="<?=$linker->link(array(), 0, true, array(), true)?>"><i class="fa fa-home fa-fw"></i>The Legend of Z</a></li>
|
||||
<?php if(!is_null($loggedUser) && count(array_intersect(array('admin','moderator'),$loggedUser['roles'])) > 0) : ?><li><a href="<?=$linker->link('users')?>"><i class="fa fa-users fa-fw"></i><?=_('Users')?></a></li><?php endif ?>
|
||||
<?php if(!is_null($loggedUser)) : ?><li><a href="<?=$linker->link('seminaries')?>"><i class="fa fa-pencil-square-o fa-fw"></i><?=_('Seminaries')?></a></li><?php endif ?>
|
||||
<?php if(!is_null($loggedCharacter) && count($loggedUser['seminaryroles']) > 0) : ?><?=$seminarymenu?><?php endif ?>
|
||||
<?php if(is_null($loggedUser)) : ?>
|
||||
<li><a href="<?=$linker->link(array('users','login'))?>"><i class="fa fa-sign-in fa-fw"></i><?=_('Login')?></a></li>
|
||||
<?php else : ?>
|
||||
<li><a href="<?=$linker->link(array('users','logout'))?>"><i class="fa fa-sign-out fa-fw"></i><?=_('Logout')?></a></li>
|
||||
<?php endif ?>
|
||||
16
views/html/questgroups/create.tpl
Normal file
16
views/html/questgroups/create.tpl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
<h2><?=_('Questgroups')?></h2>
|
||||
<h3><?=_('Create')?></h3>
|
||||
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<label for="title"><?=_('Title')?>:</label>
|
||||
<input type="text" name="title" value="" placeholder="<?=_('Title')?>" /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('Create')?>" />
|
||||
</form>
|
||||
60
views/html/questgroups/questgroup.tpl
Normal file
60
views/html/questgroups/questgroup.tpl
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?php if(!is_null($picture)) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$picture['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
|
||||
<?=$questgroupshierarchypath?>
|
||||
|
||||
<?php if(!is_null($questgroup['hierarchy'])) : ?>
|
||||
<h2><?=$questgroup['hierarchy']['title_singular']?> <?=$questgroup['hierarchy']['questgroup_pos']?>: <?=$questgroup['title']?></h2>
|
||||
<?php else : ?>
|
||||
<h2><?=$questgroup['title']?></h2>
|
||||
<?php endif ?>
|
||||
<?php foreach($texts as &$text) : ?>
|
||||
<p><?=\hhu\z\Utils::t($text['text'])?></p>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php if(!is_null($childquestgroupshierarchy)) : ?>
|
||||
<?php foreach($childquestgroupshierarchy as &$hierarchy) : ?>
|
||||
<?php if(count($hierarchy['questgroups']) > 0) : ?>
|
||||
<h3><?=$hierarchy['title_plural']?></h3>
|
||||
<ul class="qg">
|
||||
<?php foreach($hierarchy['questgroups'] as &$group) : ?>
|
||||
<li class="cf">
|
||||
<span class="qgicon"><i class="fa fa-check-square-o"></i></span>
|
||||
<div class="qgtitle"><a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$group['url']))?>"><?=$group['title']?></a></div>
|
||||
<div class="qgprogress cf">
|
||||
<p class="xpinfo">Fortschritt:</p>
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round($group['character_xps']/$group['xps']*100)?>%"></span>
|
||||
</div>
|
||||
<p class="xpnumeric"><?=$group['character_xps']?> / <?=$group['xps']?> XP</p>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if(isset($quests) && !is_null($quests) && count($quests) > 0) : ?>
|
||||
<h3><?=_('Quests')?></h3>
|
||||
<ul class="qglist">
|
||||
<?php foreach($quests as &$quest) : ?>
|
||||
<li class="qgtitle">
|
||||
<a href="<?=$linker->link(array('quests','quest',$seminary['url'],$questgroup['url'],$quest['url']))?>" <?php if($quest['solved']) : ?>class="solved"<?php endif ?>><i class="fa <?=($quest['solved']) ? 'fa-check-square-o' : 'fa-share-square-o'?> fa-fw"></i><?=$quest['title']?></a>
|
||||
<?php if(count($quest['relatedQuestgroups']) > 0) : ?>
|
||||
<ul class="gplist">
|
||||
<?php foreach($quest['relatedQuestgroups'] as &$relatedQuestgroup) : ?>
|
||||
<li class="qgtitle">
|
||||
<a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$relatedQuestgroup['url']))?>" class="bonus"><i class="fa fa-share-square-o fa-fw"><?=$relatedQuestgroup['title']?></i></a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
17
views/html/questgroupshierarchypath/index.tpl
Normal file
17
views/html/questgroupshierarchypath/index.tpl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php if(count($parentquestgroupshierarchy) > 0) : ?>
|
||||
<ul class="breadcrumbs">
|
||||
<?php foreach($parentquestgroupshierarchy as &$hierarchy) : ?>
|
||||
<li>
|
||||
<i class="fa fa-chevron-right fa-fw"></i>
|
||||
<?php if(array_key_exists('hierarchy', $hierarchy)) : ?>
|
||||
<?php if(!is_null($hierarchy['hierarchy'])) : ?>
|
||||
<?=$hierarchy['hierarchy']['title_singular']?><?php if(array_key_exists('questgroup_pos', $hierarchy['hierarchy'])) : ?> <?=$hierarchy['hierarchy']['questgroup_pos']?><?php endif ?>:
|
||||
<?php endif ?>
|
||||
<a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$hierarchy['url']))?>"><?=$hierarchy['title']?></a>
|
||||
<?php else : ?>
|
||||
<a href="<?=$linker->link(array('quests','quest',$seminary['url'],$hierarchy['questgroup']['url'],$hierarchy['url']))?>"><?=$hierarchy['title']?></a>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
41
views/html/quests/create.tpl
Normal file
41
views/html/quests/create.tpl
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
<h2><a href="<?=$linker->link(array('index',$seminary['url']),1)?>"><?=_('Quests')?></a></h2>
|
||||
<h3><?=_('Create')?></h3>
|
||||
|
||||
<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>
|
||||
19
views/html/quests/createmedia.tpl
Normal file
19
views/html/quests/createmedia.tpl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
<h2>Create Questsmedia</h2>
|
||||
|
||||
<?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>
|
||||
49
views/html/quests/index.tpl
Normal file
49
views/html/quests/index.tpl
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
<h2><?=_('Quests')?></h2>
|
||||
|
||||
<form method="post">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<select name="filters[questgroup]">
|
||||
<option value="0"><?=_('Questgroup')?></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>
|
||||
</th>
|
||||
<th><?=_('Questname')?></th>
|
||||
<th>
|
||||
<select name="filters[questtype]">
|
||||
<option value=""><?=_('Questtype')?></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>
|
||||
</th>
|
||||
<th>XPs</th>
|
||||
<th><?=('Submissions')?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($quests as &$quest) : ?>
|
||||
<tr>
|
||||
<td><a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$quest['questgroup']['url']))?>"><?=$quest['questgroup']['title']?></a></td>
|
||||
<td><a href="<?=$linker->link(array('quests','quest',$seminary['url'],$quest['questgroup']['url'],$quest['url']))?>"><?=$quest['title']?></a></td>
|
||||
<td><?=$quest['questtype']['title']?></td>
|
||||
<td><?=$quest['xps']?></td>
|
||||
<td><?=$quest['opensubmissionscount']?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="submit" name="filter" value="<?=_('Apply filters')?>" />
|
||||
<input type="submit" name="reset" value="<?=_('Reset filters')?>" />
|
||||
</form>
|
||||
113
views/html/quests/quest.tpl
Normal file
113
views/html/quests/quest.tpl
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
<?php if(!is_null($questgroup['picture'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questgroup['picture']['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
<?=$questgroupshierarchypath?>
|
||||
<h2><?=$quest['title']?></h2>
|
||||
|
||||
<?php if(count($questtexts) > 0) : ?>
|
||||
<section>
|
||||
<h1 id="questtext"><?=$questtexttype['type']?></h1>
|
||||
<div id="qtextbox">
|
||||
<?php $mediaShown = false; ?>
|
||||
<?php foreach($questtexts as &$questtext) : ?>
|
||||
<p class="qtext cf">
|
||||
<?php if(array_key_exists('media', $questtext)) : ?>
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questtext['media']['url']))?>" />
|
||||
<?php elseif(!is_null($media) && !$mediaShown) : ?>
|
||||
<?php $mediaShown = true; ?>
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>" />
|
||||
<?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($queststatus)) : ?>
|
||||
<section>
|
||||
<?php if($queststatus == 'solved') : ?>
|
||||
<h1><?=_('solved')?></h1>
|
||||
<p><?=sprintf(_('Quest completed. You have earned %d XPs.'), $quest['xps'])?></p>
|
||||
<?php elseif($queststatus == 'unsolved') : ?>
|
||||
<h1><?=_('unsolved')?></h1>
|
||||
<p><?=\hhu\z\Utils::t($quest['wrong_text'])?></p>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if($questtexttype['type'] == 'Prolog') : ?>
|
||||
<section>
|
||||
<?php if(!is_null($task)) : ?>
|
||||
<h1 id="task"><?=_('Task')?></h1>
|
||||
<p><?=$t->t($quest['task'])?></p>
|
||||
<?=$task?>
|
||||
|
||||
<?php if($solved) : ?>
|
||||
<p><?=_('Task already successfully solved')?>:
|
||||
<ul>
|
||||
<?php if($solved) : ?>
|
||||
<li><a href="<?=$linker->link(null,0,false,array('show-answer'=>'true'),true,'task')?>"><?=_('Show answer')?></a></li>
|
||||
<li><a href="<?=$linker->link('Epilog',5)?>"><?=_('Skip task')?></a></l>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<?php elseif($hasEpilog) : ?>
|
||||
<p><a href="<?=$linker->link('Epilog',5)?>"><?=_('continue')?></a></p>
|
||||
<?php endif ?>
|
||||
</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>
|
||||
<?=_('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 ?>
|
||||
</li>
|
||||
<?php else : ?>
|
||||
<li>
|
||||
<?php if($nextquest['entered'] || !$charactedHasChoosenNextQuest) : ?>
|
||||
<?php if(!empty($nextquest['entry_text'])) : ?>
|
||||
<a href="<?=$linker->link(array($nextquest['questgroup_url'],$nextquest['url']),3)?>"><?=$nextquest['entry_text']?></a>
|
||||
<?php else : ?>
|
||||
<?=_('Quest')?>:
|
||||
<a href="<?=$linker->link(array($nextquest['questgroup_url'],$nextquest['url']),3)?>"><?=$nextquest['title']?></a>
|
||||
<?php endif ?>
|
||||
<?php else : ?>
|
||||
<?php if(!empty($nextquest['entry_text'])) : ?>
|
||||
<?=$nextquest['entry_text']?>
|
||||
<?php else : ?>
|
||||
<?=$nextquest['title']?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php elseif(!is_null($nextquestgroup)) : ?>
|
||||
<a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$nextquestgroup['url']))?>"><?=$nextquestgroup['hierarchy']['title_singular']?> <?=$nextquestgroup['hierarchy']['questgroup_pos']?>: <?=$nextquestgroup['title']?></a>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
13
views/html/quests/submission.tpl
Normal file
13
views/html/quests/submission.tpl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php if(!is_null($questgroup['picture'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$questgroup['picture']['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
<?=$questgroupshierarchypath?>
|
||||
<h2><?=$quest['title']?></h2>
|
||||
|
||||
<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 ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
<?=$questgroupshierarchypath?>
|
||||
<h2><?=$quest['title']?></h2>
|
||||
|
||||
<section>
|
||||
<h1><?=_('submitted')?></h1>
|
||||
<ul>
|
||||
<?php foreach($submittedSubmissionCharacters as &$character) : ?>
|
||||
<li>
|
||||
<a href="<?=$linker->link(array('submission',$seminary['url'],$questgroup['url'],$quest['url'],$character['url']),1)?>"><?=$character['name']?></a>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('unsolved')?></h1>
|
||||
<ul>
|
||||
<?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?>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('solved')?></h1>
|
||||
<ul>
|
||||
<?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?>
|
||||
</ul>
|
||||
</section>
|
||||
15
views/html/seminaries/create.tpl
Normal file
15
views/html/seminaries/create.tpl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><?=_('Seminaries')?></h1>
|
||||
<h2><?=_('New seminary')?></h2>
|
||||
|
||||
<form method="post" action="<?=$linker->link('create', 1)?>" class="logreg">
|
||||
<fieldset>
|
||||
<label for="title"><?=_('Title')?>:</label>
|
||||
<input type="text" name="title" placeholder="<?=_('Title')?>" /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
13
views/html/seminaries/delete.tpl
Normal file
13
views/html/seminaries/delete.tpl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><?=_('Seminaries')?></h1>
|
||||
<h2><?=_('Delete seminary')?></h2>
|
||||
|
||||
<?=sprintf(_('Should the seminary “%s” really be deleted?'), $seminary['title'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
15
views/html/seminaries/edit.tpl
Normal file
15
views/html/seminaries/edit.tpl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><?=_('Seminaries')?></h1>
|
||||
<h2><?=_('Edit seminary')?></h2>
|
||||
|
||||
<form method="post" class="logreg">
|
||||
<fieldset>
|
||||
<label for="title"><?=_('Title')?>:</label>
|
||||
<input type="text" name="title" placeholder="<?=_('Title')?>" value="<?=$seminary['title']?>" /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="save" value="<?=_('save')?>" />
|
||||
</form>
|
||||
31
views/html/seminaries/index.tpl
Normal file
31
views/html/seminaries/index.tpl
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<h1><?=_('Seminaries')?></h1>
|
||||
<?php if(count(array_intersect(array('admin','moderator'),\hhu\z\controllers\IntermediateController::$user['roles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link('create', 1)?>"><?=_('Create new seminary')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<ul class="questgroups cf">
|
||||
<?php foreach($seminaries as &$seminary) : ?>
|
||||
<li>
|
||||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>" />
|
||||
<?php endif ?>
|
||||
<section>
|
||||
<p class="fwb">
|
||||
<?php if(count($seminary['userroles']) > 0) : ?>
|
||||
<a href="<?=$linker->link(array('seminary', $seminary['url']), 1)?>"><?=$seminary['title']?></a>
|
||||
<?php else : ?>
|
||||
<?=$seminary['title']?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<p><small><?=sprintf(_('created by %s on %s'), $seminary['creator']['username'], $dateFormatter->format(new \DateTime($seminary['created'])))?></small></p>
|
||||
<p><?=\hhu\z\Utils::t($seminary['description'])?></p>
|
||||
<?php if(!array_key_exists('usercharacter', $seminary)) : ?>
|
||||
<a href="<?=$linker->link(array('characters','register',$seminary['url']))?>" class="cta orange"><?=_('Create a Character')?></a>
|
||||
<?php elseif(count($seminary['userroles']) == 0) : ?>
|
||||
<p><?=sprintf(_('Your Character “%s” has not been activated yet'), $seminary['usercharacter']['name'])?></p>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
40
views/html/seminaries/seminary.tpl
Normal file
40
views/html/seminaries/seminary.tpl
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminaryheader',$seminary['url']))?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\IntermediateController::$user['seminaryroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<?php if(in_array('admin', \hhu\z\controllers\IntermediateController::$user['seminaryroles'])) : ?><li><a href="<?=$linker->link('edit', 3)?>"><?=_('Edit seminary')?></a></li><?php endif ?>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\IntermediateController::$user['seminaryroles'])) : ?><li><a href="<?=$linker->link('delete', 3)?>"><?=_('Delete seminary')?></a></li><?php endif ?>
|
||||
<?php if(count(array_intersect(array('admin','moderator'), \hhu\z\controllers\IntermediateController::$user['seminaryroles'])) > 0) : ?><li><a href="<?=$linker->link(array('quests','index',$seminary['url']))?>"><?=_('Show Quests')?></a></li><?php endif ?>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<p><?=\hhu\z\Utils::t($seminary['description'])?></p>
|
||||
<?php foreach($questgroupshierarchy as &$hierarchy) : ?>
|
||||
<h2><?=$hierarchy['title_plural']?></h2>
|
||||
<ul class="questgroups cf">
|
||||
<?php foreach($hierarchy['questgroups'] as &$group) : ?>
|
||||
<li>
|
||||
<?php if(!is_null($group['picture'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$group['picture']['url']))?>">
|
||||
<?php endif ?>
|
||||
<section>
|
||||
<p class="fwb"><?=$hierarchy['title_singular']?> <?=$group['pos']?>:
|
||||
<a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$group['url']))?>"><?=$group['title']?></a></p>
|
||||
<div class="cf">
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round($group['character_xps']*100/$group['xps'])?>%"></span>
|
||||
</div>
|
||||
<p class="xpnumeric"><?=$group['character_xps']?> / <?=$group['xps']?> XP</p>
|
||||
</div>
|
||||
<?php if(array_key_exists('text', $group)) : ?>
|
||||
<p><?=$group['text']?></p>
|
||||
<?php endif ?>
|
||||
<a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$group['url']))?>" class="cta orange">Auf ins Abenteuer!</a>
|
||||
</section>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
<?php endforeach ?>
|
||||
48
views/html/seminarybar/index.tpl
Normal file
48
views/html/seminarybar/index.tpl
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<section class="cf">
|
||||
<h1><?=$character['name']?></h1>
|
||||
<img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level']))?>" class="char">
|
||||
<ul class="charstats">
|
||||
<li><i class="fa fa-caret-right fa-fw"></i><?=('Level')?> <?=$character['xplevel']['level']?></li>
|
||||
<li><i class="fa fa-caret-right fa-fw"></i><?=$character['xps']?> XPs</li>
|
||||
<li><i class="fa fa-caret-right fa-fw"></i><?=$character['rank']?>. <?=_('Rank')?></li>
|
||||
<li><i class="fa fa-caret-right fa-fw"></i><a href="<?=$linker->link(array('characters','character',$seminary['url'],$character['url']))?>">Zum Profil</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<?php if(!is_null($lastQuest)) : ?>
|
||||
<section>
|
||||
<h1><?=_('Last Quest')?></h1>
|
||||
<p><i class="fa fa-pencil-square-o fa-fw"></i><a href="<?=$linker->link(array('quests','quest',$seminary['url'],$lastQuest['questgroup']['url'],$lastQuest['url']))?>"><?=$lastQuest['title']?></a></p>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if(!is_null($lastAchievement)) : ?>
|
||||
<section>
|
||||
<h1><?=('Last Achievement')?></h1>
|
||||
<ul class="cranks">
|
||||
<li>
|
||||
<?php if(!is_null($lastAchievement['achieved_achievementsmedia_id'])) : ?>
|
||||
<a href="#" title="Achievement-Titel"><img src="<?=$linker->link(array('media','achievement',$seminary['url'],$lastAchievement['url']))?>"></a>
|
||||
<?php endif ?>
|
||||
<p><a href="#"><?=$lastAchievement['title']?></a></p>
|
||||
<p><small><?=sprintf(_('achieved at: %s'), $dateFormatter->format(new \DateTime($lastAchievement['created'])))?></small></p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
|
||||
<section>
|
||||
<?php foreach($characterGroups as &$group) : ?>
|
||||
<h1><?=$group['name']?></h1>
|
||||
<ul class="cranks">
|
||||
<?php foreach($group['members'] as &$member) : ?>
|
||||
<li>
|
||||
<a href="#" title="Achievement-Titel"><img src="<?=$linker->link(array('media','avatar',$seminary['url'],$member['charactertype_url'],$member['xplevel'],'portrait'))?>"></a>
|
||||
<p><a href="<?=$linker->link(array('characters','character',$seminary['url'],$member['url']))?>"><?=$member['name']?></a></p>
|
||||
<p><small><?=_('Level')?> <?=$member['xplevel']?> (<?=$member['xps']?> XPs)</small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<p><i class="fa fa-users fa-fw"></i><a href="<?=$linker->link(array('charactergroups','group',$seminary['url'],$group['charactergroupsgroup_url'],$group['url']))?>"><?=sprintf(_('Show %s-Profile'),$group['charactergroupsgroup_name'])?></a></p>
|
||||
<?php endforeach ?>
|
||||
</section>
|
||||
5
views/html/seminarymenu/index.tpl
Normal file
5
views/html/seminarymenu/index.tpl
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<li><a href="<?=$linker->link(array('seminaries',$loggedSeminary['url']))?>" class="smnry"><i class="fa fa-chevron-right fa-fw"></i><?=$loggedSeminary['title']?></a></li>
|
||||
<?php if(count(array_intersect(array('admin','moderator'),$loggedUser['roles'])) > 0) : ?><li><a href="<?=$linker->link(array('characters',$loggedSeminary['url']))?>" class="smnry"><i class="fa fa-users fa-fw"></i><?=_('Characters')?></a></li><?php endif ?>
|
||||
<li><a href="<?=$linker->link(array('charactergroups','index',$loggedSeminary['url']))?>" class="smnry"><i class="fa fa-users fa-fw"></i><?=_('Character Groups')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('achievements','index',$loggedSeminary['url']))?>" class="smnry"><i class="fa fa-trophy fa-fw"></i><?=_('Achievements')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('library','index',$loggedSeminary['url']))?>" class="smnry"><i class="fa fa-book fa-fw"></i><?=_('Library')?></a></li>
|
||||
5
views/html/userroles/user.tpl
Normal file
5
views/html/userroles/user.tpl
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<ul>
|
||||
<?php foreach($roles as &$role) : ?>
|
||||
<li><?=$role['name']?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
18
views/html/users/create.tpl
Normal file
18
views/html/users/create.tpl
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<h1><?=_('Users')?></h1>
|
||||
<h2><?=_('New user')?></h2>
|
||||
|
||||
<form method="post" action="<?=$linker->link('create', 1)?>" class="logreg">
|
||||
<fieldset>
|
||||
<label for="username"><?=_('Username')?>:</label>
|
||||
<input type="text" name="username" placeholder="<?=_('Username')?>" /><br />
|
||||
<label for="prename"><?=_('Prename')?>:</label>
|
||||
<input name="prename" type="text" placeholder="<?=_('Prename')?>" /><br />
|
||||
<label for="surname"><?=_('Surname')?>:</label>
|
||||
<input name="surname" type="text" placeholder="<?=_('Surname')?>" /><br />
|
||||
<label for="email"><?=_('E‑mail address')?>:</label>
|
||||
<input type="email" name="email" placeholder="<?=_('E‑mail address')?>" /><br />
|
||||
<label for="password"><?=_('Password')?>:</label>
|
||||
<input type="password" name="password" placeholder="<?=_('Password')?>" /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
8
views/html/users/delete.tpl
Normal file
8
views/html/users/delete.tpl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<h1><?=_('Users')?></h1>
|
||||
<h2><?=_('Delete user')?></h2>
|
||||
|
||||
<?=sprintf(_('Should the user “%s” (%s) really be deleted?'), $user['username'], $user['email'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
18
views/html/users/edit.tpl
Normal file
18
views/html/users/edit.tpl
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<h1><?=_('Users')?></h1>
|
||||
<h2><?=_('Edit user')?></h2>
|
||||
|
||||
<form method="post" class="logreg">
|
||||
<fieldset>
|
||||
<label for="username"><?=_('Username')?>:</label>
|
||||
<input type="text" name="username" placeholder="<?=_('Username')?>" value="<?=$user['username']?>" /><br />
|
||||
<label for="prename"><?=_('Prename')?>:</label>
|
||||
<input name="prename" type="text" placeholder="<?=_('Prename')?>" value="<?=$user['prename']?>" /><br />
|
||||
<label for="surname"><?=_('Surname')?>:</label>
|
||||
<input name="surname" type="text" placeholder="<?=_('Surname')?>" value="<?=$user['surname']?>" /><br />
|
||||
<label for="email"><?=_('E‑mail address')?>:</label>
|
||||
<input type="email" name="email" placeholder="<?=_('E‑mail address')?>" value="<?=$user['email']?>" /><br />
|
||||
<label for="password"><?=_('Password')?>:</label>
|
||||
<input type="password" name="password" placeholder="<?=_('Password')?>" /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="save" value="<?=_('save')?>" />
|
||||
</form>
|
||||
9
views/html/users/index.tpl
Normal file
9
views/html/users/index.tpl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<h1><?=_('Users')?></h1>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link('create', 1)?>"><?=_('Create new user')?></a></li>
|
||||
</nav>
|
||||
<ol class="cglist">
|
||||
<?php foreach($users as &$user) : ?>
|
||||
<li><a href="<?=$linker->link(array('user', $user['username']), 1)?>"><?=$user['username']?></a><span class="xp"><small><?=sprintf(_('registered on %s'), $dateFormatter->format(new \DateTime($user['created'])))?></small></span></li>
|
||||
<?php endforeach ?>
|
||||
</ol>
|
||||
15
views/html/users/login.tpl
Normal file
15
views/html/users/login.tpl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<h1><?=_('Users')?></h1>
|
||||
|
||||
<h2><?=_('Login')?></h2>
|
||||
<?php if($failed) : ?>
|
||||
<p class="invalid"><?=_('Login failed')?>.</p>
|
||||
<?php endif ?>
|
||||
<form method="post" action="<?=$linker->link(array(), 2)?>" class="logreg">
|
||||
<fieldset>
|
||||
<label for="username"><?=_('Username')?>:</label>
|
||||
<input name="username" type="text" placeholder="<?=_('Username')?>" value="<?=$username?>" required="required" /><br />
|
||||
<label for="password"><?=_('Password')?>:</label>
|
||||
<input name="password" type="password" placeholder="<?=_('Password')?>" required="required" /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="login" value="<?=_('Login')?>" />
|
||||
</form>
|
||||
0
views/html/users/logout.tpl
Normal file
0
views/html/users/logout.tpl
Normal file
90
views/html/users/register.tpl
Normal file
90
views/html/users/register.tpl
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<h1><?=_('Users')?></h1>
|
||||
|
||||
<h2><?=_('Registration')?></h2>
|
||||
<?php if($validation !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'username':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Username is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Username is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Username contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Username already exists');
|
||||
break;
|
||||
default: echo _('Username invalid');
|
||||
}
|
||||
break;
|
||||
case 'prename':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Prename is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Prename is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': printf(_('Prename contains illegal characters'));
|
||||
break;
|
||||
default: echo _('Prename invalid');
|
||||
}
|
||||
break;
|
||||
case 'surname':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Surname is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Surname is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': printf(_('Surname contains illegal characters'));
|
||||
break;
|
||||
default: echo _('Surname invalid');
|
||||
}
|
||||
break;
|
||||
case 'email':
|
||||
switch($setting) {
|
||||
case 'regex': echo _('E‑mail address invalid');
|
||||
break;
|
||||
case 'exist': echo _('E‑mail address already exists');
|
||||
break;
|
||||
default: echo _('E‑mail address invalid');
|
||||
}
|
||||
break;
|
||||
case 'password':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Password is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Password is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
default: echo _('Password invalid');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
echo $exception->getMessage();
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" action="<?=$linker->link(array(), 2)?>" class="logreg">
|
||||
<fieldset>
|
||||
<label for="username"><?=_('Username')?>:</label>
|
||||
<input name="username" type="text" placeholder="<?=_('Username')?>" title="<?=_('Username')?>" required="required" maxlength="<?=$validationSettings['username']['maxlength']?>" value="<?=$username?>" <?=(array_key_exists('username', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="prename"><?=_('Prename')?>:</label>
|
||||
<input name="prename" type="text" placeholder="<?=_('Prename')?>" title="<?=_('Prename')?>" required="required" maxlength="<?=$validationSettings['prename']['maxlength']?>" value="<?=$prename?>" <?=(array_key_exists('prename', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="surname"><?=_('Surname')?>:</label>
|
||||
<input name="surname" type="text" placeholder="<?=_('Surname')?>" title="<?=_('Surname')?>" required="required" maxlength="<?=$validationSettings['surname']['maxlength']?>" value="<?=$surname?>" <?=(array_key_exists('surname', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="email"><?=_('E‑mail address')?>:</label>
|
||||
<input name="email" type="email" placeholder="<?=_('E‑mail address')?>" title="<?=_('E‑mail address')?>" required="required" value="<?=$email?>" <?=(array_key_exists('email', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="password"><?=_('Password')?>:</label>
|
||||
<input name="password" type="password" placeholder="<?=_('Password')?>" title="<?=_('Password')?>" required="required" maxlength="<?=$validationSettings['password']['maxlength']?>" <?=(array_key_exists('password', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="register" value="<?=_('Register')?>" />
|
||||
</form>
|
||||
35
views/html/users/user.tpl
Normal file
35
views/html/users/user.tpl
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<h1><?=_('Users')?></h1>
|
||||
<?php if(count(array_intersect(array('admin','moderator'),\hhu\z\controllers\IntermediateController::$user['roles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link('edit', 3)?>"><?=_('Edit user')?></a></li>
|
||||
<li><a href="<?=$linker->link('delete', 3)?>"><?=_('Delete user')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<h2><?=$user['username']?></h2>
|
||||
<p>
|
||||
<?=sprintf(_('registered on %s'), $dateFormatter->format(new \DateTime($user['created'])))?><br />
|
||||
<?=_('Name')?>: <?=$user['prename']?> <?=$user['surname']?><br />
|
||||
<?=_('E‑mail address')?>: <a href="mailto:<?=$user['email']?>"><?=$user['email']?></a>
|
||||
</p>
|
||||
|
||||
<h2><?=_('Characters')?></h2>
|
||||
<ul class="gchars cf">
|
||||
<?php foreach($characters as &$character) : ?>
|
||||
<li>
|
||||
<?php if(array_key_exists('small_avatar', $character)) : ?>
|
||||
<p><img src="<?=$linker->link(array('media','seminary',$character['seminary_url'],$character['small_avatar']['url']))?>"></p>
|
||||
<?php endif ?>
|
||||
<p>
|
||||
<?php if(count($character['user_seminaryroles']) > 0) : ?>
|
||||
<a href="<?=$linker->link(array('characters','character',$character['seminary_url'],$character['url']))?>"><?=$character['name']?></a>
|
||||
<?php else : ?>
|
||||
<?=$character['name']?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<p><small><?=_('Level')?> <?=$character['xplevel']['level']?></small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
||||
<h2><?=_('Roles')?></h2>
|
||||
<?=$userroles?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue