Questtype ?Textinput?: add support for field sizes (Issue #252) and general improvements
This commit is contained in:
commit
8d903135a5
3476 changed files with 599099 additions and 0 deletions
1
views/binary/binary.tpl
Normal file
1
views/binary/binary.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$intermediate?>
|
||||
1
views/binary/error/index.tpl
Normal file
1
views/binary/error/index.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=_('Error')?>: <?=$code?>: <?=$string?>
|
||||
1
views/binary/media/achievement.tpl
Normal file
1
views/binary/media/achievement.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$file?>
|
||||
1
views/binary/media/avatar.tpl
Normal file
1
views/binary/media/avatar.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$file?>
|
||||
1
views/binary/media/charactergroup.tpl
Normal file
1
views/binary/media/charactergroup.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$file?>
|
||||
1
views/binary/media/charactergroupsquest.tpl
Normal file
1
views/binary/media/charactergroupsquest.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$file?>
|
||||
1
views/binary/media/index.tpl
Normal file
1
views/binary/media/index.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$file?>
|
||||
1
views/binary/media/seminary.tpl
Normal file
1
views/binary/media/seminary.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$file?>
|
||||
1
views/binary/media/seminarymoodpic.tpl
Normal file
1
views/binary/media/seminarymoodpic.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$file?>
|
||||
1
views/binary/uploads/charactergroup.tpl
Normal file
1
views/binary/uploads/charactergroup.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$file?>
|
||||
1
views/binary/uploads/seminary.tpl
Normal file
1
views/binary/uploads/seminary.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$file?>
|
||||
27
views/error.tpl
Normal file
27
views/error.tpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Questlab</title>
|
||||
<link rel="stylesheet" type="text/css" href="/css/desktop.css" media="all" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<nav class="cf">
|
||||
<div id="home">
|
||||
<a href="/">Questlab</a>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<article class="wrap">
|
||||
<div class="moodpic">
|
||||
<img src="/grafics/questlab.jpg" />
|
||||
</div>
|
||||
<h1>Service Unavailable</h1>
|
||||
<p>Die Anwendung steht zur Zeit leider nicht zur Verfügung.</p>
|
||||
</article>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
2
views/fault/error/index.tpl
Normal file
2
views/fault/error/index.tpl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Fehler</h1>
|
||||
<p class="error"><?=$code?>: <?=$string?></p>
|
||||
16
views/fault/fault.tpl
Normal file
16
views/fault/fault.tpl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Questlab</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Questlab</h1>
|
||||
<article>
|
||||
<?=$intermediate?>
|
||||
</article>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
90
views/html/achievements/index.tpl
Normal file
90
views/html/achievements/index.tpl
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<?php if(!is_null($seminary['achievements_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'achievements'))?>">
|
||||
</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'],'locked'))?>" />
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<p class="fwb"><?=(!$achievement['hidden']) ? $achievement['title'] : _('Secret Achievement')?></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>
|
||||
<?php if($successfulCharacter['c'] == 1) : ?>
|
||||
<?=sprintf(_('Character has achieved %d Achievement'), $successfulCharacter['c'])?>
|
||||
<?php else : ?>
|
||||
<?=sprintf(_('Character has achieved %d Achievements'), $successfulCharacter['c'])?>
|
||||
<?php endif ?>
|
||||
</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) / $achievementsCount * 100))?></small></p>
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round(count($achievedAchievements) / $achievementsCount * 100)?>%"></span>
|
||||
</div>
|
||||
</div>
|
||||
<p><small><b><?=$character['rank']?>. <?=_('Rank')?>:</b> <?=sprintf(_('You achieved %d of %d Achievements so far'), count($achievedAchievements), $achievementsCount)?>.</small></p>
|
||||
<ul class="achmnts">
|
||||
<?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 ?>
|
||||
<h3 id="<?=$achievement['url']?>"><?=$achievement['title']?><span class="unlcked"><?=sprintf(_('achieved at: %s'), $dateFormatter->format(new \DateTime($achievement['created'])))?></span></h3>
|
||||
<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'],'locked'))?>" />
|
||||
<?php endif ?>
|
||||
<h3 id="<?=$achievement['url']?>"><?=(!$achievement['hidden']) ? $achievement['title'] : _('Secret Achievement')?></h3>
|
||||
<?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>
|
||||
78
views/html/charactergroups/creategroup.tpl
Normal file
78
views/html/charactergroups/creategroup.tpl
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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>
|
||||
|
||||
<h1><?=sprintf(_('New %s Character group'), $groupsgroup['name'])?></h1>
|
||||
<?php if($validation !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'icon':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during icon upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Icon has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Icon exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Icon invalid');
|
||||
}
|
||||
break;
|
||||
case 'charactergroupname':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Name is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Name is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Name contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Name already exists');
|
||||
break;
|
||||
default: echo _('Name invalid');
|
||||
}
|
||||
break;
|
||||
case 'motto':
|
||||
switch($setting) {
|
||||
case 'maxlength': printf(_('Motto is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
default: echo _('Motto invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" action="" class="logreg" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Icon')?></legend>
|
||||
<input type="file" name="icon" />
|
||||
<p><?=_('Allowed file types')?>:</p>
|
||||
<ul>
|
||||
<?php foreach($mimetypes as &$mimetype) : ?>
|
||||
<li><?=sprintf(_('%s-files'), strtoupper(explode('/',$mimetype['mimetype'])[1]))?> <?php if($mimetype['size'] > 0) : ?>(<?=_('max.')?> <?=round($mimetype['size']/(1024*1024),2)?> MiB)<?php endif ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="charactergroupname"><?=_('Name')?>:</label>
|
||||
<input type="text" id="charactergroupname" name="charactergroupname" placeholder="<?=_('Name')?>" title="<?=_('Name')?>" required="required" maxlength="<?=$validationSettings['charactergroupname']['maxlength']?>" value="<?=$charactergroupname?>" <?=(array_key_exists('charactergroupname', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="motto"><?=_('Motto')?>:</label>
|
||||
<input type="text" id="motto" name="motto" placeholder="<?=_('Motto')?>" title="<?=_('Motto')?>" maxlength="<?=$validationSettings['motto']['maxlength']?>" value="<?=$motto?>" <?=(array_key_exists('motto', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
51
views/html/charactergroups/creategroupsgroup.tpl
Normal file
51
views/html/charactergroups/creategroupsgroup.tpl
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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','index',$seminary['url']))?>"><?=_('Character Groups')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('New Character groups-group')?></h1>
|
||||
<?php if($validation !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'charactergroupsgroupname':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Name is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Name is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Name contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Name already exists');
|
||||
break;
|
||||
default: echo _('Name invalid');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
echo $exception->getMessage();
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" action="" class="logreg">
|
||||
<fieldset>
|
||||
<label for="charactergroupsgroupname"><?=_('Name')?>:</label>
|
||||
<input type="text" name="charactergroupsgroupname" placeholder="<?=_('Name')?>" title="<?=_('Name')?>" required="required" maxlength="<?=$validationSettings['charactergroupsgroupname']['maxlength']?>" value="<?=$charactergroupsgroupname?>" <?=(array_key_exists('charactergroupsgroupname', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<div class="inlbl"><input type="checkbox" id="preferred" name="preferred" <?php if($preferred) : ?>checked="checked"<?php endif ?> /><label for="preferred"><?=_('preferred')?></label></div>
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
17
views/html/charactergroups/deletegroup.tpl
Normal file
17
views/html/charactergroups/deletegroup.tpl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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>
|
||||
<h1><?=sprintf(_('Delete %s Character group'), $groupsgroup['name'])?></h1>
|
||||
|
||||
<?=sprintf(_('Should the %s Character group “%s” really be deleted?'), $groupsgroup['name'], $group['name'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
16
views/html/charactergroups/deletegroupsgroup.tpl
Normal file
16
views/html/charactergroups/deletegroupsgroup.tpl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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><?=_('Delete Character groups-group')?></h1>
|
||||
|
||||
<?=sprintf(_('Should the Character groups-group “%s” really be deleted?'), $groupsgroup['name'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
84
views/html/charactergroups/editgroup.tpl
Normal file
84
views/html/charactergroups/editgroup.tpl
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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>
|
||||
|
||||
<h1><?=sprintf(_('Edit %s Character group'), $groupsgroup['name'])?></h1>
|
||||
<?php if($validation !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'icon':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during icon upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Icon has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Icon exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Icon invalid');
|
||||
}
|
||||
break;
|
||||
case 'charactergroupname':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Name is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Name is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Name contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Name already exists');
|
||||
break;
|
||||
default: echo _('Name invalid');
|
||||
}
|
||||
break;
|
||||
case 'motto':
|
||||
switch($setting) {
|
||||
case 'maxlength': printf(_('Motto is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
default: echo _('Motto invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" class="logreg" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Icon')?></legend>
|
||||
<img src="<?=$linker->link(array('media','charactergroup',$seminary['url'],$groupsgroup['url'],$group['url']))?>" class="gbanner"><br />
|
||||
<input type="file" name="icon" />
|
||||
<p><?=_('Allowed file types')?>:</p>
|
||||
<ul>
|
||||
<?php foreach($mimetypes as &$mimetype) : ?>
|
||||
<li><?=sprintf(_('%s-files'), strtoupper(explode('/',$mimetype['mimetype'])[1]))?> <?php if($mimetype['size'] > 0) : ?>(<?=_('max.')?> <?=round($mimetype['size']/(1024*1024),2)?> MiB)<?php endif ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="charactergroupname"><?=_('Name')?>:</label>
|
||||
<?php if(count(array_intersect(array('admin','moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<input type="text" id="charactergroupname" name="charactergroupname" placeholder="<?=_('Name')?>" title="<?=_('Name')?>" required="required" maxlength="<?=$validationSettings['charactergroupname']['maxlength']?>" value="<?=$charactergroupname?>" <?=(array_key_exists('charactergroupname', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<?php else : ?>
|
||||
<input type="text" id="charactergroupname" name="charactergroupname" disabled="disabled" value="<?=$charactergroupname?>" <?=(array_key_exists('charactergroupname', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<input type="hidden" name="charactergroupname" value="<?=$charactergroupname?>" />
|
||||
<?php endif ?>
|
||||
<label for="motto"><?=_('Motto')?>:</label>
|
||||
<input type="text" id="motto" name="motto" placeholder="<?=_('Motto')?>" title="<?=_('Motto')?>" maxlength="<?=$validationSettings['motto']['maxlength']?>" value="<?=$motto?>" <?=(array_key_exists('motto', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
</form>
|
||||
51
views/html/charactergroups/editgroupsgroup.tpl
Normal file
51
views/html/charactergroups/editgroupsgroup.tpl
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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','index',$seminary['url']))?>"><?=_('Character Groups')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Edit Character groups-group')?></h1>
|
||||
<?php if($validation !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'charactergroupsgroupname':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Name is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Name is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Name contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Name already exists');
|
||||
break;
|
||||
default: echo _('Name invalid');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
echo $exception->getMessage();
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" action="" class="logreg">
|
||||
<fieldset>
|
||||
<label for="charactergroupsgroupname"><?=_('Name')?>:</label>
|
||||
<input type="text" name="charactergroupsgroupname" placeholder="<?=_('Name')?>" title="<?=_('Name')?>" required="required" maxlength="<?=$validationSettings['charactergroupsgroupname']['maxlength']?>" value="<?=$charactergroupsgroupname?>" <?=(array_key_exists('charactergroupsgroupname', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<div class="inlbl"><input type="checkbox" id="preferred" name="preferred" <?php if($preferred) : ?>checked="checked"<?php endif ?> /><label for="preferred"><?=_('preferred')?></label></div>
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
</form>
|
||||
65
views/html/charactergroups/group.tpl
Normal file
65
views/html/charactergroups/group.tpl
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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>
|
||||
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0 || in_array(\hhu\z\controllers\SeminaryController::$character['id'], array_map(function($c) { return $c['id']; }, $group['characters']))) : ?>
|
||||
<nav class="admin">
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0 || in_array(\hhu\z\controllers\SeminaryController::$character['id'], array_map(function($c) { return $c['id']; }, $group['characters']))) : ?>
|
||||
<li><a href="<?=$linker->link(array('editgroup',$seminary['url'],$groupsgroup['url'],$group['url']),1)?>"><?=sprintf(_('Edit %s Character group'), $groupsgroup['name'])?></a></li>
|
||||
<?php endif ?>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<li><a href="<?=$linker->link(array('deletegroup',$seminary['url'],$groupsgroup['url'],$group['url']),1)?>"><?=sprintf(_('Delete %s Character group'), $groupsgroup['name'])?></a></li>
|
||||
<li><a href="<?=$linker->link(array('managegroup',$seminary['url'],$groupsgroup['url'],$group['url']),1)?>"><?=sprintf(_('Manage %s Character group'), $groupsgroup['name'])?></a></li>
|
||||
<?php endif ?>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="gbanner cf">
|
||||
<img src="<?=$linker->link(array('media','charactergroup',$seminary['url'],$groupsgroup['url'],$group['url']))?>" class="gbanner">
|
||||
<h1><?=$group['name']?></h1>
|
||||
<?php if(!empty($group['motto'])) : ?>
|
||||
<p>"<?=$group['motto']?>"</p>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<ul class="gdata cf">
|
||||
<li><?=$group['rank']?>. <?=_('Rank')?></li>
|
||||
<li><?=sprintf(_('%d XPs'), $group['xps'])?></li>
|
||||
<li><?=count($group['characters'])?> <?=(count($group['characters']) == 0 || 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><?=sprintf(_('%d XPs'), $character['xps'])?></small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1><i class="fa fa-pencil-square-o fa-fw"></i><?=sprintf(_('%s-Quests'),$groupsgroup['name'])?></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']?> <?=_('XPs')?></span>
|
||||
</p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
50
views/html/charactergroups/groupsgroup.tpl
Normal file
50
views/html/charactergroups/groupsgroup.tpl
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('editgroupsgroup',$seminary['url'],$groupsgroup['url']), 1)?>"><?=_('Edit Character groups-group')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('deletegroupsgroup',$seminary['url'],$groupsgroup['url']), 1)?>"><?=_('Delete Character groups-group')?></a></li>
|
||||
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
||||
<h1><?=$groupsgroup['name']?></h1>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('creategroup',$seminary['url'],$groupsgroup['url']), 1)?>"><?=sprintf(_('Create new %s Character group'), $groupsgroup['name'])?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<ol class="cglist rnkng">
|
||||
<?php foreach($groups as $index => &$group) : ?>
|
||||
<li>
|
||||
<?php if($index < 3) : ?>
|
||||
<img src="<?=$linker->link(array('media','charactergroup',$seminary['url'],$groupsgroup['url'],$group['url']))?>" class="gbanner">
|
||||
<?php endif ?>
|
||||
<p><a href="<?=$linker->link(array('group',$seminary['url'],$groupsgroup['url'],$group['url']),1)?>"><?=$group['name']?></a><span class="xp"><?=$group['xps']?> XP</span></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ol>
|
||||
|
||||
|
||||
<h2><?=sprintf(_('%s-Quests'),$groupsgroup['name'])?></h2>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('charactergroupsquests','create',$seminary['url'],$groupsgroup['url']))?>"><?=sprintf(_('Create new %s-Quest'), $groupsgroup['name'])?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
||||
<ul class="cgqlist cf">
|
||||
<?php foreach($quests as &$quest) : ?>
|
||||
<li class="cf">
|
||||
<img src="<?=$linker->link(array('media','charactergroupsquest',$seminary['url'],$groupsgroup['url'],$quest['url']))?>" />
|
||||
<p><a href="<?=$linker->link(array('charactergroupsquests','quest',$seminary['url'],$groupsgroup['url'],$quest['url']))?>"><?=$quest['title']?></a></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
21
views/html/charactergroups/index.tpl
Normal file
21
views/html/charactergroups/index.tpl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></li>
|
||||
</ul>
|
||||
<h1><?=_('Character Groups')?></h1>
|
||||
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('creategroupsgroup',$seminary['url']),1)?>"><?=_('Create new Character groups-group')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
||||
<ul class="cglist">
|
||||
<?php foreach($groupsgroups as &$group) : ?>
|
||||
<li><a href="<?=$linker->link(array('groupsgroup',$seminary['url'],$group['url']),1)?>"><?=$group['name']?></a></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
111
views/html/charactergroups/managegroup.tpl
Normal file
111
views/html/charactergroups/managegroup.tpl
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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="<?=$linker->link(array('media','charactergroup',$seminary['url'],$groupsgroup['url'],$group['url']))?>" class="gbanner">
|
||||
<h1><?=$group['name']?></h1>
|
||||
<?php if(!empty($group['motto'])) : ?>
|
||||
<p>"<?=$group['motto']?>"</p>
|
||||
<?php endif ?>
|
||||
</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>
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<ul class="gchars cf">
|
||||
<?php foreach($group['characters'] as &$character) : ?>
|
||||
<li>
|
||||
<input type="checkbox" id="characters-<?=$character['id']?>" name="characters[]" value="<?=$character['id']?>" <?php if($character['id'] == \hhu\z\controllers\SeminaryController::$character['id']) : ?>disabled="disabled"<?php endif ?>/>
|
||||
<label for="characters-<?=$character['id']?>">
|
||||
<?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>
|
||||
</label>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<input type="submit" name="actions[removecharacters]" value="<?=_('Remove Characters')?>" />
|
||||
</fieldset>
|
||||
<fieldset class="filter add">
|
||||
<p class="fwb"><small>Charaktere der Gruppe hinzufügen:</small></p>
|
||||
<input type="text" id="filter_input" placeholder="<?=_('Filter Characters')?>" />
|
||||
<select id="characters" name="characters[]" size="10" multiple="multiple">
|
||||
<?php foreach($characters as &$character) : ?>
|
||||
<option value="<?=$character['id']?>"><?=$character['name']?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<input type="submit" name="actions[addcharacters]" value="<?=_('Add Characters')?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
/**
|
||||
* Hide select elements that include the value string from the given input
|
||||
* element.
|
||||
*
|
||||
* @author Lessan Vaezi (http://stackoverflow.com/a/6647367)
|
||||
*/
|
||||
jQuery.fn.filterByText = function(textbox) {
|
||||
return this.each(function() {
|
||||
var select = this;
|
||||
var options = [];
|
||||
$(select).find('option').each(function() {
|
||||
options.push({value: $(this).val(), text: $(this).text()});
|
||||
});
|
||||
$(select).data('options', options);
|
||||
|
||||
$(textbox).bind('change keyup', function() {
|
||||
var options = $(select).empty().data('options');
|
||||
var search = $.trim($(this).val());
|
||||
var regex = new RegExp(search,"gi");
|
||||
|
||||
$.each(options, function(i) {
|
||||
var option = options[i];
|
||||
if(option.text.match(regex) !== null) {
|
||||
$(select).append(
|
||||
$('<option>').text(option.text).val(option.value)
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
$('#characters').filterByText($('#filter_input'));
|
||||
});
|
||||
</script>
|
||||
94
views/html/charactergroupsquests/create.tpl
Normal file
94
views/html/charactergroupsquests/create.tpl
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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','index',$seminary['url']))?>"><?=_('Character Groups')?></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>
|
||||
</ul>
|
||||
|
||||
<h1><?=sprintf(_('New %s-Quest'), $groupsgroup['name'])?></h1>
|
||||
<?php if($validation !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'icon':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during icon upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Icon has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Icon exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Icon invalid');
|
||||
}
|
||||
break;
|
||||
case 'title':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Title contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Title already exists');
|
||||
break;
|
||||
default: echo _('Title invalid');
|
||||
}
|
||||
break;
|
||||
case 'xps':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('XPs not set'), $value);
|
||||
break;
|
||||
case 'regex': echo _('XPs contain illegal characters');
|
||||
break;
|
||||
default: echo _('XPs invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" action="" class="logreg" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Icon')?></legend>
|
||||
<input type="file" name="icon" />
|
||||
<p><?=_('Allowed file types')?>:</p>
|
||||
<ul>
|
||||
<?php foreach($mimetypes as &$mimetype) : ?>
|
||||
<li><?=sprintf(_('%s-files'), strtoupper(explode('/',$mimetype['mimetype'])[1]))?> <?php if($mimetype['size'] > 0) : ?>(<?=_('max.')?> <?=round($mimetype['size']/(1024*1024),2)?> MiB)<?php endif ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="title"><?=_('Title')?>:</label>
|
||||
<input type="text" id="title" name="title" placeholder="<?=_('Title')?>" title="<?=_('Title')?>" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$title?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> />
|
||||
<label for="xps"><?=_('XPs')?>:</label>
|
||||
<input type="xps" id="xps" name="xps" placeholder="<?=_('XPs')?>" title="<?=_('XPs')?>" pattern="<?=substr($validationSettings['xps']['regex'],1,strrpos($validationSettings['xps']['regex'],$validationSettings['xps']['regex'][0])-1)?>" value="<?=$xps?>" <?=(array_key_exists('xps', $validation)) ? 'class="invalid"' : null?> />
|
||||
<label for="questgroup"><?=_('Questgroup')?></label>
|
||||
<select id="questgroup" name="questgroup">
|
||||
<?php foreach($questgroups as &$questgroup) : ?>
|
||||
<option value="<?=$questgroup['url']?>" <?php if(array_key_exists('selected', $questgroup) && $questgroup['selected']) : ?>selected="selected"<?php endif ?>><?=$questgroup['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<label for="description"><?=_('Description')?>:</label>
|
||||
<textarea id="description" name="description" placeholder="<?=_('Description')?>"><?=$description?></textarea>
|
||||
<label for="rules"><?=_('Rules')?>:</label>
|
||||
<textarea id="rules" name="rules" placeholder="<?=_('Rules')?>"><?=$rules?></textarea>
|
||||
<label for="wonText"><?=_('Won-text')?>:</label>
|
||||
<textarea id="wonText" name="wonText" placeholder="<?=_('Won-text')?>"><?=$wonText?></textarea>
|
||||
<label for="lostText"><?=_('Lost-text')?>:</label>
|
||||
<textarea id="lostText" name="lostText" placeholder="<?=_('Lost-text')?>"><?=$lostText?></textarea>
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
17
views/html/charactergroupsquests/delete.tpl
Normal file
17
views/html/charactergroupsquests/delete.tpl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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','index',$seminary['url']))?>"><?=_('Character Groups')?></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>
|
||||
</ul>
|
||||
|
||||
<h1><?=sprintf(_('Delete %s-Quest'), $groupsgroup['name'])?></h1>
|
||||
<?=sprintf(_('Should the %s-Quest “%s” really be deleted?'), $groupsgroup['name'], $quest['title'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
95
views/html/charactergroupsquests/edit.tpl
Normal file
95
views/html/charactergroupsquests/edit.tpl
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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','index',$seminary['url']))?>"><?=_('Character Groups')?></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>
|
||||
</ul>
|
||||
|
||||
<h1><?=sprintf(_('Edit %s-Quest'), $groupsgroup['name'])?></h1>
|
||||
<?php if($validation !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'icon':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during icon upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Icon has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Icon exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Icon invalid');
|
||||
}
|
||||
break;
|
||||
case 'title':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Title contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Title already exists');
|
||||
break;
|
||||
default: echo _('Title invalid');
|
||||
}
|
||||
break;
|
||||
case 'xps':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('XPs not set'), $value);
|
||||
break;
|
||||
case 'regex': echo _('XPs contain illegal characters');
|
||||
break;
|
||||
default: echo _('XPs invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" action="" class="logreg" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Icon')?></legend>
|
||||
<img src="<?=$linker->link(array('media','charactergroupsquest',$seminary['url'],$groupsgroup['url'],$quest['url']))?>" /><br />
|
||||
<input type="file" name="icon" />
|
||||
<p><?=_('Allowed file types')?>:</p>
|
||||
<ul>
|
||||
<?php foreach($mimetypes as &$mimetype) : ?>
|
||||
<li><?=sprintf(_('%s-files'), strtoupper(explode('/',$mimetype['mimetype'])[1]))?> <?php if($mimetype['size'] > 0) : ?>(<?=_('max.')?> <?=round($mimetype['size']/(1024*1024),2)?> MiB)<?php endif ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="title"><?=_('Title')?>:</label>
|
||||
<input type="text" id="title" name="title" placeholder="<?=_('Title')?>" title="<?=_('Title')?>" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$title?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> />
|
||||
<label for="xps"><?=_('XPs')?>:</label>
|
||||
<input type="xps" id="xps" name="xps" placeholder="<?=_('XPs')?>" title="<?=_('XPs')?>" pattern="<?=substr($validationSettings['xps']['regex'],1,strrpos($validationSettings['xps']['regex'],$validationSettings['xps']['regex'][0])-1)?>" value="<?=$xps?>" <?=(array_key_exists('xps', $validation)) ? 'class="invalid"' : null?> />
|
||||
<label for="questgroup"><?=_('Questgroup')?></label>
|
||||
<select id="questgroup" name="questgroup">
|
||||
<?php foreach($questgroups as &$questgroup) : ?>
|
||||
<option value="<?=$questgroup['url']?>" <?php if(array_key_exists('selected', $questgroup) && $questgroup['selected']) : ?>selected="selected"<?php endif ?>><?=$questgroup['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<label for="description"><?=_('Description')?>:</label>
|
||||
<textarea id="description" name="description" placeholder="<?=_('Description')?>"><?=$description?></textarea>
|
||||
<label for="rules"><?=_('Rules')?>:</label>
|
||||
<textarea id="rules" name="rules" placeholder="<?=_('Rules')?>"><?=$rules?></textarea>
|
||||
<label for="wonText"><?=_('Won-text')?>:</label>
|
||||
<textarea id="wonText" name="wonText" placeholder="<?=_('Won-text')?>"><?=$wonText?></textarea>
|
||||
<label for="lostText"><?=_('Lost-text')?>:</label>
|
||||
<textarea id="lostText" name="lostText" placeholder="<?=_('Lost-text')?>"><?=$lostText?></textarea>
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
</form>
|
||||
90
views/html/charactergroupsquests/manage.tpl
Normal file
90
views/html/charactergroupsquests/manage.tpl
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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','index',$seminary['url']))?>"><?=_('Character Groups')?></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>
|
||||
</ul>
|
||||
|
||||
<div class="gbanner cf">
|
||||
<?php if(!is_null($media)) : ?>
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>" class="grpqimg" />
|
||||
<?php else : ?>
|
||||
<img src="<?=$linker->link(array('grafics','charactergroup.jpg'))?>" class="gbanner">
|
||||
<?php endif ?>
|
||||
<h1><?=$quest['title']?></h1>
|
||||
</div>
|
||||
<ul class="gdata cf">
|
||||
<li><span class="fwb"><?=sprintf(_('%d XPs'), $quest['xps'])?></span></li>
|
||||
<li><?php if($questgroup['entered']) : ?><a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$questgroup['url']))?>"><?=$questgroup['title']?></a><?php else : ?><?=$questgroup['title']?><?php endif ?></li>
|
||||
</ul>
|
||||
|
||||
<section>
|
||||
<h1><i class="fa fa-picture-o fa-fw"></i><?=_('Media')?></h1>
|
||||
<?php if($validation !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'media':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during file upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('File has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('File exceeds size maximum');
|
||||
break;
|
||||
default: echo _('File invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<ul class="gqgllry">
|
||||
<?php foreach($uploads as &$upload) : ?>
|
||||
<li>
|
||||
<a href="<?=$linker->link(array('uploads','seminary',$seminary['url'],$upload['upload']['url']))?>">
|
||||
<img src="<?=$linker->link(array('uploads','seminary',$seminary['url'],$upload['upload']['url'],'thumbnail'))?>" />
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<p><?=_('Allowed file types')?>: <?php foreach($mimetypes as &$mimetype) : ?><?=sprintf(_('%s-files'), strtoupper(explode('/',$mimetype['mimetype'])[1]))?> <?php if($mimetype['size'] > 0) : ?>(<?=_('max.')?> <?=round($mimetype['size']/(1024*1024),2)?> MiB) <?php endif ?><?php endforeach ?></p>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="media" /><br />
|
||||
<input type="submit" name="setmedia" value="<?=_('save')?>" />
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1><i class="fa fa-users fa-fw"></i><?=$groupsgroup['name']?></h1>
|
||||
<form method="post">
|
||||
<ul class="grpqlist">
|
||||
<?php foreach($groups as &$group) : ?>
|
||||
<li>
|
||||
<span class="group"><a href="<?=$linker->link(array('charactergroups','group',$seminary['url'],$groupsgroup['url'],$group['url']))?>"><?=$group['name']?></a></span>
|
||||
<span class="xp">
|
||||
<select name="xps[<?=$group['url']?>]">
|
||||
<option value="null" <?php if(is_null($group['quest_group'])) : ?>selected="selected"<?php endif ?>><?=_('Not attended')?></option>
|
||||
<?php for($i=0; $i<=$quest['xps']; $i++) : ?>
|
||||
<option value="<?=$i?>" <?php if(!is_null($group['quest_group']) && $group['quest_group']['xps'] == $i) : ?>selected="selected"<?php endif ?>><?=sprintf(_('%d XPs'), $i)?></option>
|
||||
<?php endfor ?>
|
||||
</select>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<input type="submit" name="setxps" value="<?=_('Set XPs')?>" />
|
||||
</form>
|
||||
</section>
|
||||
77
views/html/charactergroupsquests/quest.tpl
Normal file
77
views/html/charactergroupsquests/quest.tpl
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<?php if(!is_null($seminary['charactergroups_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'charactergroups'))?>">
|
||||
</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','index',$seminary['url']))?>"><?=_('Character Groups')?></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>
|
||||
</ul>
|
||||
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('edit',$seminary['url'],$groupsgroup['url'],$quest['url']),1)?>"><?=sprintf(_('Edit %s-Quest'), $groupsgroup['name'])?></a></li>
|
||||
<li><a href="<?=$linker->link(array('delete',$seminary['url'],$groupsgroup['url'],$quest['url']),1)?>"><?=sprintf(_('Delete %s-Quest'), $groupsgroup['name'])?></a></li>
|
||||
<li><a href="<?=$linker->link(array('manage',$seminary['url'],$groupsgroup['url'],$quest['url']),1)?>"><?=sprintf(_('Manage %s-Quest'), $groupsgroup['name'])?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="gbanner cf">
|
||||
<img src="<?=$linker->link(array('media','charactergroupsquest',$seminary['url'],$groupsgroup['url'],$quest['url']))?>" class="grpqimg" />
|
||||
<h1><?=$quest['title']?></h1>
|
||||
</div>
|
||||
<ul class="gdata cf">
|
||||
<li><span class="fwb"><?=sprintf(_('%d XPs'), $quest['xps'])?></span></li>
|
||||
<li><?php if($questgroup['entered']) : ?><a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$questgroup['url']))?>"><?=$questgroup['title']?></a><?php else : ?><?=$questgroup['title']?><?php endif ?></li>
|
||||
</ul>
|
||||
|
||||
<?php if(count($uploads) > 0) : ?>
|
||||
<section>
|
||||
<h1><i class="fa fa-picture-o fa-fw"></i><?=_('Media')?></h1>
|
||||
<ul class="gqgllry">
|
||||
<?php foreach($uploads as &$upload) : ?>
|
||||
<li>
|
||||
<a href="<?=$linker->link(array('uploads','seminary',$seminary['url'],$upload['upload']['url']))?>">
|
||||
<img src="<?=$linker->link(array('uploads','seminary',$seminary['url'],$upload['upload']['url'],'thumbnail'))?>" />
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
|
||||
<section>
|
||||
<h1><i class="fa fa-envelope fa-fw"></i><?=_('Description')?></h1>
|
||||
<p><?=\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['won_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"><?=sprintf(_('%d XPs'), $group['xps'])?></span>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
130
views/html/characters/character.tpl
Normal file
130
views/html/characters/character.tpl
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
<?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>
|
||||
<li>
|
||||
<i class="fa fa-chevron-right fa-fw"></i>
|
||||
<?php if(count(array_intersect(array('admin','moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<a href="<?=$linker->link(array('index',$seminary['url']), 1)?>"><?=_('Characters')?></a>
|
||||
<?php else : ?>
|
||||
<?=_('Characters')?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h1><i class="fa fa-user fa-fw"></i><?=$character['name']?></h1>
|
||||
<nav class="admin">
|
||||
<?php if(count(array_intersect(array('admin','moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0 || $character['id'] == \hhu\z\controllers\SeminaryController::$character['id']) : ?>
|
||||
<li><a href="<?=$linker->link(array('edit',$seminary['url'],$character['url']),1)?>"><?=_('Edit Character')?></a></li>
|
||||
<?php endif ?>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<li><a href="<?=$linker->link(array('delete',$seminary['url'],$character['url']),1)?>"><?=_('Delete Character')?></a></li>
|
||||
<?php endif ?>
|
||||
</nav>
|
||||
|
||||
<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>
|
||||
<h2><i class="fa fa-bookmark fa-fw"></i><?=_('Milestones')?></h2>
|
||||
<ul class="crewards">
|
||||
<?php foreach($milestones as &$milestone) : ?>
|
||||
<li>
|
||||
<?php if($milestone['achieved']) : ?>
|
||||
<p class="unlocked fwb"><i class="fa fa-check-circle fa-fw"></i><?=$milestone['title']?></p>
|
||||
<?php elseif($milestone['deadline'] < date('Y-m-d H:i:s')) : ?>
|
||||
<p class="passed fwb"><i class="fa fa-times-circle fa-fw"></i><?=$milestone['title']?></p>
|
||||
<?php else : ?>
|
||||
<p class="fwb"><i class="fa fa-lock fa-fw"></i><?=$milestone['title']?></p>
|
||||
<?php endif ?>
|
||||
<p><?=\hhu\z\Utils::t($milestone['description'])?></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">
|
||||
<h2><i class="fa fa-list fa-fw"></i><?=_('Ranking')?></h2>
|
||||
<ul class="cranks">
|
||||
<?php foreach($ranking['superior'] as $index => &$rankCharacter) : ?>
|
||||
<li>
|
||||
<a href="<?=$linker->link($rankCharacter['url'],3)?>"><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="<?=$linker->link($rankCharacter['url'],3)?>"><?=$rankCharacter['name']?></a></p>
|
||||
<p><small><?=_('Level')?> <?=$rankCharacter['xplevel']?> (<?=sprintf(_('%d XPs'), $rankCharacter['xps'])?>)</small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<li>
|
||||
<img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level'],'portrait'))?>">
|
||||
<p class="fwb"><?=$character['rank']?>. <?=$character['name']?></p>
|
||||
<p><small><?=_('Level')?> <?=$character['xplevel']['level']?> (<?=sprintf(_('%d XPs'), $character['xps'])?>)</small></p>
|
||||
</li>
|
||||
<?php foreach($ranking['inferior'] as $index => &$rankCharacter) : ?>
|
||||
<li>
|
||||
<a href="<?=$linker->link($rankCharacter['url'],3)?>"><img src="<?=$linker->link(array('media','avatar',$seminary['url'],$rankCharacter['charactertype_url'],$rankCharacter['xplevel'],'portrait'))?>"></a>
|
||||
<p><?=$character['rank']+$index+1?>. <a href="<?=$linker->link($rankCharacter['url'],3)?>"><?=$rankCharacter['name']?></a></p>
|
||||
<p><small><?=_('Level')?> <?=$rankCharacter['xplevel']?> (<?=sprintf(_('%d XPs'), $rankCharacter['xps'])?>)</small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="flr48">
|
||||
<h2><i class="fa fa-users fa-fw"></i><?=_('Character Groups')?></h2>
|
||||
<ul class="cranks">
|
||||
<?php foreach($groups as &$group) : ?>
|
||||
<li>
|
||||
<a href="<?=$linker->link(array('charactergroups','group',$seminary['url'],$group['charactergroupsgroup_url'],$group['url']))?>">
|
||||
<img src="<?=$linker->link(array('media','charactergroup',$seminary['url'],$group['groupsgroup']['url'],$group['url']))?>" class="gbanner">
|
||||
</a>
|
||||
<p><a href="<?=$linker->link(array('charactergroups','group',$seminary['url'],$group['charactergroupsgroup_url'],$group['url']))?>"><?=$group['name']?></a></p>
|
||||
<p><small><?=sprintf(_('%d XPs'), $group['xps'])?></small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<?php if(!is_null($lastQuest)) : ?>
|
||||
<section>
|
||||
<h2><i class="fa fa-share-square fa-fw"></i><?=_('Last Quest')?></h2>
|
||||
<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 ?>
|
||||
|
||||
<section>
|
||||
<h2><i class="fa fa-book fa-fw"></i><?=_('Topic progress')?></h2>
|
||||
<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>
|
||||
|
||||
19
views/html/characters/delete.tpl
Normal file
19
views/html/characters/delete.tpl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?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>
|
||||
<li>
|
||||
<i class="fa fa-chevron-right fa-fw"></i>
|
||||
<a href="<?=$linker->link(array('characters','index',$seminary['url']))?>"><?=_('Characters')?></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Delete Character')?></h1>
|
||||
<?=sprintf(_('Should the Character “%s” of user “%s” (%s) really be deleted?'), $character['name'], $user['username'], $user['email'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
109
views/html/characters/edit.tpl
Normal file
109
views/html/characters/edit.tpl
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
<?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>
|
||||
<li>
|
||||
<i class="fa fa-chevron-right fa-fw"></i>
|
||||
<?php if(count(array_intersect(array('admin','moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<a href="<?=$linker->link(array('index',$seminary['url']), 1)?>"><?=_('Characters')?></a>
|
||||
<?php else : ?>
|
||||
<?=_('Characters')?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Edit Character')?></h1>
|
||||
<form method="post" action="" class="logreg">
|
||||
<?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 class="fwb"><?=_('Character properties')?></legend>
|
||||
<label for="charactername"><?=_('Character name')?>:</label>
|
||||
<?php if(count(array_intersect(array('admin','moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<input type="text" name="charactername" placeholder="<?=_('Character name')?>" required="required" value="<?=$charactername?>" maxlength="<?=$validationSettings['charactername']['maxlength']?>" <?=(array_key_exists('charactername', $validation)) ? 'class="invalid"' : null ?>/>
|
||||
<?php else : ?>
|
||||
<input type="text" name="charactername" placeholder="<?=_('Character name')?>" disabled="disabled" value="<?=$charactername?>" />
|
||||
<input type="hidden" name="charactername" value="<?=$charactername?>" />
|
||||
<?php endif ?><br />
|
||||
<ul class="avatar">
|
||||
<?php foreach($types as &$type) : ?>
|
||||
<li>
|
||||
<label for="type-<?=$type['id']?>">
|
||||
<p><?=$type['name']?></p>
|
||||
<img id="avatar" src="<?=$linker->link(array('media','avatar',$seminary['url'],$type['url'],$xplevels[0]['level'],'portrait'))?>" />
|
||||
</label>
|
||||
<?php if(count(array_intersect(array('admin','moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<input id="type-<?=$type['id']?>" name="type" type="radio" value="<?=$type['url']?>" <?php if(array_key_exists('selected', $type) && $type['selected']) : ?>checked="checked"<?php endif ?> />
|
||||
<?php else : ?>
|
||||
<input id="type-<?=$type['id']?>" name="type" type="radio" disabled="disabled" value="<?=$type['url']?>" <?php if(array_key_exists('selected', $type) && $type['selected']) : ?>checked="checked"<?php endif ?> />
|
||||
<?php if(array_key_exists('selected', $type) && $type['selected']) : ?>
|
||||
<input name="type" type="hidden" value="<?=$type['url']?>" />
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</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 class="fwb"><?=_('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(array_key_exists('uservalue', $field)) : ?>value="<?=$field['uservalue']?>"<?php endif ?> <?php if($field['required']) : ?>required="required"<?php endif ?>/>
|
||||
<?php break;
|
||||
case 'Text': ?>
|
||||
<textarea name="fields[<?=$field['url']?>]"><?=(array_key_exists('uservalue', $field) ? $field['uservalue'] : null)?></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)?>" <?php if(array_key_exists('uservalue', $field) && $field['uservalue'] == mb_eregi_replace('\\\\','',$option)) : ?>selected="selected"<?php endif ?>><?=mb_eregi_replace('\\\\','',$option)?></option>
|
||||
<?php endforeach?>
|
||||
</select>
|
||||
<?php break;
|
||||
} ?>
|
||||
<br />
|
||||
<?php endforeach ?>
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
</form>
|
||||
48
views/html/characters/index.tpl
Normal file
48
views/html/characters/index.tpl
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?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><?=_('Characters')?></h1>
|
||||
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('manage',$seminary['url']),1)?>"><?=_('Manage')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
||||
<form method="get">
|
||||
<fieldset class="filter">
|
||||
<p><small>Sortierung:</small></p>
|
||||
<select name="sortorder" onchange="this.form.submit();">
|
||||
<option value="charactername" <?php if($sortorder == 'charactername') : ?>selected="selected"<?php endif ?>><?=_('Character name')?></option>
|
||||
<option value="xps" <?php if($sortorder == 'xps') : ?>selected="selected"<?php endif ?>><?=_('XPs')?></option>
|
||||
<option value="role" <?php if($sortorder == 'role') : ?>selected="selected"<?php endif ?>><?=_('Role')?></option>
|
||||
<option value="date" <?php if($sortorder == 'date') : ?>selected="selected"<?php endif ?>><?=_('Date of registration')?></option>
|
||||
<?php foreach($characterfields as &$characterfield) : ?>
|
||||
<option value="<?=$characterfield['url']?>" <?php if($sortorder == $characterfield['url']) : ?>selected="selected"<?php endif ?>><?=$characterfield['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<noscript><input type="submit" value="<?=_('Sort list')?>" /></noscript>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<ul class="admnql">
|
||||
<?php foreach($characters as &$character) : ?>
|
||||
<li class="cf">
|
||||
<img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level'],'portrait'))?>">
|
||||
<p><a href="<?=$linker->link(array('characters','character',$seminary['url'],$character['url']))?>"><?=$character['name']?></a><span><?=$character['xps']?> XP</span></p>
|
||||
<p><small><a href="<?=$linker->link(array('users','user',$character['user']['url']))?>"><?=$character['user']['username']?></a></small>
|
||||
<?php if(in_array('admin', $character['characterroles'])) : ?><small>(<?=_('Admin')?>)</small><?php endif ?>
|
||||
<?php if(in_array('moderator', $character['characterroles'])) : ?><small>(<?=_('Moderator')?>)</small><?php endif ?>
|
||||
<?php if(in_array('user', $character['characterroles'])) : ?><small>(<?=_('User')?>)</small><?php endif ?>
|
||||
</p>
|
||||
<?php foreach($character['characterfields'] as &$characterfield) : ?>
|
||||
<p class="chrflds"><?=$characterfield['value']?></p>
|
||||
<?php endforeach ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
63
views/html/characters/manage.tpl
Normal file
63
views/html/characters/manage.tpl
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?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>
|
||||
<li><i class="fa fa-chevron-right fa-fw"></i><a href="<?=$linker->link(array('characters','index',$seminary['url']))?>"><?=_('Characters')?></a></li>
|
||||
</ul>
|
||||
<h1><?=_('Manage Characters')?></h1>
|
||||
|
||||
<form method="post">
|
||||
<fieldset class="filter">
|
||||
<p><small>Sortierung:</small></p>
|
||||
<select name="sortorder" onchange="this.form.submit();">
|
||||
<option value="charactername" <?php if($sortorder == 'charactername') : ?>selected="selected"<?php endif ?>><?=_('Character name')?></option>
|
||||
<option value="xps" <?php if($sortorder == 'xps') : ?>selected="selected"<?php endif ?>><?=_('XPs')?></option>
|
||||
<option value="role" <?php if($sortorder == 'role') : ?>selected="selected"<?php endif ?>><?=_('Role')?></option>
|
||||
<option value="date" <?php if($sortorder == 'date') : ?>selected="selected"<?php endif ?>><?=_('Date of registration')?></option>
|
||||
<?php foreach($characterfields as &$characterfield) : ?>
|
||||
<option value="<?=$characterfield['url']?>" <?php if($sortorder == $characterfield['url']) : ?>selected="selected"<?php endif ?>><?=$characterfield['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<noscript><input type="submit" value="<?=_('Sort list')?>" /></noscript>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<ul class="admnql">
|
||||
<?php foreach($characters as &$character) : ?>
|
||||
<li class="cf">
|
||||
<input type="checkbox" id="characters-<?=$character['id']?>" name="characters[]" value="<?=$character['id']?>" <?php if(in_array($character['id'], $selectedCharacters)) : ?>checked="checked"<?php endif ?> <?php if($character['id'] == \hhu\z\controllers\SeminaryController::$character['id']) : ?>disabled="disabled"<?php endif ?>/>
|
||||
<label for="characters-<?=$character['id']?>">
|
||||
<img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level'],'portrait'))?>">
|
||||
<p><a href="<?=$linker->link(array('characters','character',$seminary['url'],$character['url']))?>"><?=$character['name']?></a><span><?=$character['xps']?> XP</span></p>
|
||||
<p><small><a href="<?=$linker->link(array('users','user',$character['user']['url']))?>"><?=$character['user']['username']?></a></small>
|
||||
<?php if(in_array('admin', $character['characterroles'])) : ?><small>(<?=_('Admin')?>)</small><?php endif ?>
|
||||
<?php if(in_array('moderator', $character['characterroles'])) : ?><small>(<?=_('Moderator')?>)</small><?php endif ?>
|
||||
<?php if(in_array('user', $character['characterroles'])) : ?><small>(<?=_('User')?>)</small><?php endif ?>
|
||||
</p>
|
||||
<?php foreach($character['characterfields'] as &$characterfield) : ?>
|
||||
<p class="chrflds"><?=$characterfield['value']?></p>
|
||||
<?php endforeach ?>
|
||||
</label>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?=_('Add role')?></legend>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\IntermediateController::$user['roles'])) > 0 || !in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<input type="submit" name="actions[addrole]" value="<?=_('Admin')?>" />
|
||||
<input type="submit" name="actions[addrole]" value="<?=_('Moderator')?>" />
|
||||
<?php endif ?>
|
||||
<input type="submit" name="actions[addrole]" value="<?=_('User')?>" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?=_('Remove role')?></legend>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\IntermediateController::$user['roles'])) > 0 || !in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<input type="submit" name="actions[removerole]" value="<?=_('Admin')?>" />
|
||||
<input type="submit" name="actions[removerole]" value="<?=_('Moderator')?>" />
|
||||
<?php endif ?>
|
||||
<input type="submit" name="actions[removerole]" value="<?=_('User')?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
95
views/html/characters/register.tpl
Normal file
95
views/html/characters/register.tpl
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<?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><?=$seminary['title']?></li>
|
||||
<li><i class="fa fa-chevron-right fa-fw"></i><?=_('Characters')?></li>
|
||||
</ul>
|
||||
<h1><?=_('Create Character')?></h1>
|
||||
<form method="post" action="" class="logreg">
|
||||
<?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;
|
||||
case 'type':
|
||||
switch($setting) {
|
||||
case 'exist': echo _('Please choose an avatar');
|
||||
break;
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<fieldset>
|
||||
<legend class="fwb"><?=_('Character properties')?></legend>
|
||||
<label for="charactername"><?=_('Character name')?>:</label>
|
||||
<input type="text" name="charactername" placeholder="<?=_('Character name')?>" required="required" value="<?=$charactername?>" /><br />
|
||||
<ul class="avatar">
|
||||
<?php foreach($types as &$type) : ?>
|
||||
<li>
|
||||
<label for="type-<?=$type['id']?>">
|
||||
<p><?=$type['name']?></p>
|
||||
<img id="avatar" src="<?=$linker->link(array('media','avatar',$seminary['url'],$type['url'],$xplevels[0]['level'],'portrait'))?>" />
|
||||
</label>
|
||||
<input id="type-<?=$type['id']?>" name="type" type="radio" value="<?=$type['url']?>" <?php if(array_key_exists('selected', $type) && $type['selected']) : ?>checked="checked"<?php endif ?> />
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</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 class="fwb"><?=_('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(array_key_exists('uservalue', $field)) : ?>value="<?=$field['uservalue']?>"<?php endif ?> <?php if($field['required']) : ?>required="required"<?php endif ?>/>
|
||||
<?php break;
|
||||
case 'Text': ?>
|
||||
<textarea name="fields[<?=$field['url']?>]"><?=(array_key_exists('uservalue', $field) ? $field['uservalue'] : null)?></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)?>" <?php if(array_key_exists('uservalue', $field) && $field['uservalue'] == mb_eregi_replace('\\\\','',$option)) : ?>selected="selected"<?php endif ?>><?=mb_eregi_replace('\\\\','',$option)?></option>
|
||||
<?php endforeach?>
|
||||
</select>
|
||||
<?php break;
|
||||
} ?>
|
||||
<br />
|
||||
<?php endforeach ?>
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
17
views/html/error/index.tpl
Normal file
17
views/html/error/index.tpl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<h1><?=_('Error')?></h1>
|
||||
<p class="error"><?=$code?>: <?=$string?></p>
|
||||
|
||||
<?php if($code == 403 && $userId <= 0) : ?>
|
||||
<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" autofocus="autofocus" /><br />
|
||||
<label for="password"><?=_('Password')?>:</label>
|
||||
<input name="password" type="password" placeholder="<?=_('Password')?>" title="<?=_('Password')?>" required="required" /><br />
|
||||
</fieldset>
|
||||
<input type="hidden" name="referrer" value="<?=$linker->link(null, null, false)?>" />
|
||||
<input type="submit" name="login" class="cta" value="<?=_('Login')?>" />
|
||||
<?=_('or')?> <a href="<?=$linker->link(array('users','register'))?>"><?=_('register yourself')?></a>
|
||||
</form>
|
||||
<?php endif ?>
|
||||
120
views/html/html.tpl
Normal file
120
views/html/html.tpl
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title><?=(isset($title)) ? $title : \nre\configs\AppConfig::$app['name']?></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>
|
||||
<script src="/js/imagelightbox.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$( function()
|
||||
{
|
||||
$( 'a' ).imageLightbox();
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
setTimeout(function() { $(".notify").fadeOut(1500); }, 5000);
|
||||
$('body').click(function() { $(".notify").fadeOut(200); });
|
||||
});
|
||||
</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">
|
||||
<link rel="icon" href="favicon.ico" type="image/x-icon">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<nav class="cf">
|
||||
<input type="checkbox" id="toggle">
|
||||
<label for="toggle" class="toggle" onclick><i class="fa fa-bars"></i>Menü</label>
|
||||
<div id="home">
|
||||
<a href="<?=$linker->link(array(), 0, true, array(), true)?>"><?=\nre\configs\AppConfig::$app['name']?></a>
|
||||
</div>
|
||||
<?php if(!is_null($loggedUser)) : ?>
|
||||
<div id="profile" class="cf">
|
||||
<?php if(!is_null($loggedCharacter)) : ?>
|
||||
<a href="<?=$linker->link(array('characters','character',$loggedSeminary['url'],$loggedCharacter['url']))?>">
|
||||
<img src="<?=$linker->link(array('media','avatar',$loggedSeminary['url'],$loggedCharacter['charactertype_url'],$loggedCharacter['xplevel'],'portrait'))?>" />
|
||||
<span><?=$loggedCharacter['name']?></span><span class="lvlname">Level <?=$loggedCharacter['xplevel']?></span>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<a href="<?=$linker->link(array('users',$loggedUser['url']))?>"><?=$loggedUser['username']?><span class="lvlname"><?=$loggedUser['prename']?> <?=$loggedUser['surname']?></span></a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<ul id="mainmenu">
|
||||
<?=$menu?>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<article class="wrap">
|
||||
<?php if(count($notifications) > 0) : ?>
|
||||
<ul class="notify">
|
||||
<?php foreach($notifications as &$notification) : ?>
|
||||
<?php if($notification['type'] == \hhu\z\controllers\components\NotificationComponent::TYPE_ACHIEVEMENT) : ?>
|
||||
<li class="cf">
|
||||
<?php if(!is_null($notification['image'])) : ?>
|
||||
<img src="<?=$notification['image']?>" />
|
||||
<?php endif ?>
|
||||
<p class="announce"><i class="fa fa-trophy fa-fw"></i><?=_('Achievement')?>:<i class="fa fa-times fa-fw"></i></p>
|
||||
<?php if(!is_null($notification['link'])) : ?>
|
||||
<p class="fwb"><a href="<?=$notification['link']?>"><?=$notification['message']?></a></p>
|
||||
<?php else : ?>
|
||||
<p class="fwb"><?=$notification['message']?></p>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php else : ?>
|
||||
<li class="cf">
|
||||
<img src="<?=$linker->link(array('grafics','lvlup.jpg'))?>">
|
||||
<p class="announce"><i class="fa fa-arrow-up fa-fw"></i><?=_('Level-up')?>:<i class="fa fa-times fa-fw"></i></p>
|
||||
<?php if(!is_null($notification['link'])) : ?>
|
||||
<p class="fwb"><a href="<?=$notification['link']?>"><?=sprintf(_('You have reached level %d'), $notification['message'])?></a></p>
|
||||
<?php else : ?>
|
||||
<p class="fwb"><?=sprintf(_('You have reached level %d'), $notification['message'])?></p>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<?=$intermediate?>
|
||||
</article>
|
||||
<aside>
|
||||
<?php if(!is_null($loggedCharacter) && count($loggedCharacter['characterroles']) > 0) : ?>
|
||||
<?=$seminarybar?>
|
||||
<?php endif ?>
|
||||
</aside>
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://" + document.location.hostname + "/analytics/";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(['setSiteId', 1]);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
|
||||
g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<noscript><p><img src="/analytics/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
50
views/html/introduction/index.tpl
Normal file
50
views/html/introduction/index.tpl
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
|
||||
</div>
|
||||
<?php if(is_null($userId)) : ?>
|
||||
<form method="post" action="<?=$linker->link(array('users','login'))?>" class="logreg front">
|
||||
<fieldset>
|
||||
<p><label for="username"><?=_('Username')?>:</label><input name="username" type="text" placeholder="<?=_('Username')?>" title="<?=_('Username')?>" required="required" autofocus="autofocus" /></p>
|
||||
<p><label for="password"><?=_('Password')?>:</label><input name="password" type="password" placeholder="<?=_('Password')?>" title="<?=_('Password')?>" required="required" /></p>
|
||||
<input type="submit" name="login" class="cta" value="<?=_('Login')?>" />
|
||||
</fieldset>
|
||||
<p class="register"><?=_('or')?> <a href="<?=$linker->link(array('users','register'))?>"><?=_('register yourself')?></a></p>
|
||||
</form>
|
||||
<?php endif ?>
|
||||
<h1><?=\nre\configs\AppConfig::$app['name']?></h1>
|
||||
<h2><?=_('Introduction')?></h2>
|
||||
<p itemscope itemtype="http://schema.org/CollegeOrUniversity">Bereits im Sommersemester 2013 wurde das Projekt „Die Legende von Zyren“ unterstützt durch den Lehrförderungsfond der <a itemprop="name" href="http://www.uni-duesseldorf.de">Heinrich-Heine-Universität Düsseldorf</a> ins Leben gerufen, um die Inhalte der Vorlesung „Wissensrepräsentation“ den Studierenden des Faches Informationswissenschaft mit Hilfe von Spielelementen und -modellen zu vermitteln. Die innovative Lernumgebung besteht aus einem virtuellen Textadventure, dass über eine webbasierte Plattform zugänglich ist und realen Spielen in einer Präsenzveranstaltung, in denen die Studierenden unmittelbar in das Abenteuer eintauchen und in Teams spielerisch gegeneinander antreten.</p>
|
||||
<p>Auf der Plattform spielt sich jeder der Studierenden mit seinem virtuellen Avatar durch das Reich von Zyren und erlernt und vertieft auf spielerische Weise die Inhalte der Vorlesung „Wissensrepräsentation“, die in Form von Herausforderungen oder Rätseln in das Abenteuer eingebunden wurden und über den Fortlauf und den Erfolg des Spiels entscheiden.</p>
|
||||
<p>In der zusätzlichen Präsenzveranstaltung tauchen die Studierenden direkt in das Abenteuer ein und die vertiefen die Inhalte spielerisch. Hier schließen sich die Studierenden in Teams (Gilden) zusammen, müssen eigenverantwortlich Lerninhalte erarbeiten, Probleme lösen und in speziellen Gildenaufgaben gegen andere Teams antreten, um ihr kollaborativ erarbeitetes Wissen auf die Probe zu stellen.</p>
|
||||
<p>Für jede erfolgreiche absolvierte Herausforderung auf der Plattform oder in der Übung erhalten die Studierenden Erfahrungspunkte und Belohnungen.</p>
|
||||
<p>Um das Konzept auch anderen Fachbereichen und Lehrveranstaltungen zugänglich zu machen, wurde im Frühjahr 2014 das Projekt Questlab (Arbeitstitel „The Legend of Z“) gestartet um das Konzept zu generalisieren. Lehrende können die Plattform nun nutzen um eigene Aufgaben (Quests) zu kreieren und hochzuladen und sie optional in eine Geschichte einzubinden, die sie selbst gestalten können. Zudem wurde das Responsive Design überarbeitet und bietet nun optimalen Zugriff auf die Plattform über alle mobilen Endgeräte.</p>
|
||||
|
||||
<h2>Die Legende von Zyren in der Presse</h2>
|
||||
<ul>
|
||||
<li><a href="http://www.uni-duesseldorf.de/home/nc/startseite/news-detailansicht/article/erstmals-an-einer-deutschen-hochschule-gamification-und-interaktive-textadventures.html">Pressemitteilung der Heinrich-Heine-Universität Düsseldorf vom 12.7.13</a></li>
|
||||
<li><a href="">Artikel in der Rheinischen Post (Print-Version) vom 23.7.13</a></li>
|
||||
<li><a href="http://www.welt.de/regionales/duesseldorf/article120340979/Mit-Computer-spielend-zum-Uni-Abschluss.html">Artikel in der Zeitschrift Welt (Print- und Online-Version) vom 24.9.13</a></li>
|
||||
<li><a href="http://www.heise.de/tp/artikel/40/40838/1.html">Artikel auf Heise Online</a></li>
|
||||
<li><a href="http://www.faz.net/aktuell/beruf-chance/fantasy-an-der-uni-spielend-durchs-studium-12735331.html">Artikel in der Frankfurter Allgemeinen Zeitung</a></li>
|
||||
<li><a href="http://www.wdr5.de/sendungen/leonardo/rollenspieluniduesseldorf100.html">Radiobeitrag im Deutschlandfunk vom 5.8.13</a></li>
|
||||
<li>Diverse Beiträge in Blogs, Wikis und anderen sozialen Plattformen, wie beispielweise <a href="http://www.mittelstandswiki.de/wissen/Gamification,_Teil_1">www.mittelstandswiki.de</a> oder <a href="http://www.scoop.it/t/digitale-spiel-und-lernwelten/p/4005676096/2013/08/05/die-legende-von-zyren">www.scoop.it</a></li>
|
||||
<li>Teilnahme am Finale des studentischen Video-Wettbewerb der DINI „Study Fiction – Videoclips zur Zukunft von Studium und Lehre“ mit dem Beitrag <a href="http://dini.de/wettbewerbe/study-fiction/preisverleihung/">„Always Online – Die Zukunft des Lernens“</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Das Team</h2>
|
||||
<h3>Projektleitung:</h3>
|
||||
<ul>
|
||||
<li itemscope itemtype="http://schema.org/Person"><span itemprop="name">Kathrin Knautz</span></li>
|
||||
</ul>
|
||||
<h3>Entwicklung und Evaluation des Prototypens:</h3>
|
||||
<ul>
|
||||
<li itemscope itemtype="http://schema.org/Person"><span itemprop="name">Lisa Orszullok</span></li>
|
||||
<li itemscope itemtype="http://schema.org/Person"><span itemprop="name">Simone Soubusta</span></li>
|
||||
<li itemscope itemtype="http://schema.org/Person"><span itemprop="name">Julia Göretz</span></li>
|
||||
<li itemscope itemtype="http://schema.org/Person"><span itemprop="name">Anja Wintermeyer</span></li>
|
||||
</ul>
|
||||
<h3>Entwicklung „Questlab“:</h3>
|
||||
<ul>
|
||||
<li itemscope itemtype="http://schema.org/Person"><span itemprop="name">Oliver Hanraths</span></li>
|
||||
<li itemscope itemtype="http://schema.org/Person"><span itemprop="name">Daniel Miskovic</span></li>
|
||||
</ul>
|
||||
47
views/html/library/create.tpl
Normal file
47
views/html/library/create.tpl
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?php if(!is_null($seminary['library_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'library'))?>">
|
||||
</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)?>"><?=_('Library')?></a></li>
|
||||
</ul>
|
||||
<h1><i class="fa fa-book fa-fw"></i><?=_('New Questtopic')?></h1>
|
||||
|
||||
<?php if($validation !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'title':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Title contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Title already exists');
|
||||
break;
|
||||
default: echo _('Title invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<label for="title"><?=_('Title')?>:</label>
|
||||
<input id="title" type="text" name="title" placeholder="<?=_('Title')?>" title="<?=_('Title')?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$title?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> />
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
16
views/html/library/delete.tpl
Normal file
16
views/html/library/delete.tpl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php if(!is_null($seminary['library_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'library'))?>">
|
||||
</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)?>"><?=_('Library')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><i class="fa fa-book fa-fw"></i><?=_('Delete Questtopic')?></h1>
|
||||
<?=sprintf(_('Should the Questtopic “%s” really be deleted?'), $questtopic['title'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
125
views/html/library/edit.tpl
Normal file
125
views/html/library/edit.tpl
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
<?php if(!is_null($seminary['library_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'library'))?>">
|
||||
</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)?>"><?=_('Library')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><i class="fa fa-book fa-fw"></i><?=_('Edit Questtopic')?></h1>
|
||||
<?php if($validations['edit'] !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validations['edit'] as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'title':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Title contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Title already exists');
|
||||
break;
|
||||
default: echo _('Title invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<label for="title"><?=_('Title')?>:</label>
|
||||
<input id="title" type="text" name="title" placeholder="<?=_('Title')?>" title="<?=_('Title')?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$questtopicTitle?>" <?=($validations['edit'] !== true && array_key_exists('title', $validations['edit'])) ? 'class="invalid"' : null?> />
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('save')?>" />
|
||||
</form>
|
||||
|
||||
<h2><?=_('Edit Questsubtopics')?></h2>
|
||||
<form method="post">
|
||||
<?php foreach($subtopicsTitles as $subtopicId => &$title) : ?>
|
||||
<?php if($validations['edit-subtopics'] !== true && array_key_exists($subtopicId, $validations['edit-subtopics']) && $validations['edit-subtopics'][$subtopicId] !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validations['edit-subtopics'][$subtopicId] as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'title':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Title contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Title already exists');
|
||||
break;
|
||||
default: echo _('Title invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<input id="subtopic-<?=$subtopicId?>" type="text" name="subtopics[<?=$subtopicId?>]" placeholder="<?=$title?>" title="<?=$title?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$title?>" <?=($validations['edit-subtopics'] !== true && array_key_exists($subtopicId, $validations['edit-subtopics']) && $validations['edit-subtopics'][$subtopicId] !== true && array_key_exists('title', $validations['edit-subtopics'][$subtopicId])) ? 'class="invalid"' : null?>/>
|
||||
<input id="subtopic-<?=$subtopicId?>-delete" type="checkbox" name="delete-subtopics[<?=$subtopicId?>]" <?php if(!is_null($deleteSubtopics) && array_key_exists($subtopicId, $deleteSubtopics)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="subtopic-<?=$subtopicId?>-delete"><?=_('delete')?></label><br />
|
||||
<?php endforeach ?>
|
||||
|
||||
<input type="submit" name="edit-subtopics" value="<?=_('save')?>" />
|
||||
</form>
|
||||
|
||||
<h2><?=_('Create new Questsubtopic')?></h2>
|
||||
<?php if($validations['create-subtopic'] !== true) : ?>
|
||||
<ul>
|
||||
<?php foreach($validations['create-subtopic'] as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'title':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'regex': echo _('Title contains illegal characters');
|
||||
break;
|
||||
case 'exist': echo _('Title already exists');
|
||||
break;
|
||||
default: echo _('Title invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<label for="subtopictitle"><?=_('Title')?>:</legend>
|
||||
<input id="subtopictitle" type="text" name="title" placeholder="<?=_('Title')?>" title="<?=_('Title')?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$subtopicTitle?>" <?=($validations['create-subtopic'] !== true && array_key_exists('title', $validations['create-subtopic'])) ? 'class="invalid"' : null?> />
|
||||
</fieldset>
|
||||
<input type="submit" name="create-subtopic" value="<?=_('create')?>" />
|
||||
</form>
|
||||
33
views/html/library/index.tpl
Normal file
33
views/html/library/index.tpl
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php if(!is_null($seminary['library_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'library'))?>">
|
||||
</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><?=_('Library')?></h1>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('create',$seminary['url']),1)?>"><?=_('Create new Questtopic')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<p><?=sprintf(_('Library description, %s, %s'), $seminary['course'], $seminary['title'])?></p>
|
||||
<div class="libindxpr cf">
|
||||
<p><small><?=sprintf(_('Total progress: %d %%'), ($totalQuestcount > 0) ? round($totalCharacterQuestcount/$totalQuestcount*100) : 0) ?></small></p>
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=($totalQuestcount > 0) ? round($totalCharacterQuestcount/$totalQuestcount*100) : 0 ?>%"></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>
|
||||
40
views/html/library/manage.tpl
Normal file
40
views/html/library/manage.tpl
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php if(!is_null($seminary['library_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'library'))?>">
|
||||
</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)?>"><?=_('Library')?></a></li>
|
||||
</ul>
|
||||
<h1><i class="fa fa-book fa-fw"></i><?=$questtopic['title']?></h1>
|
||||
|
||||
<h2>Quests zu diesem Thema:</h2>
|
||||
<form method="post">
|
||||
<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>
|
||||
<?php foreach($questsubtopics as &$subtopic) : ?>
|
||||
<input id="subtopic-<?=$quest['id']?>-<?=$subtopic['id']?>" type="checkbox" name="questsubtopics[<?=$quest['id']?>][<?=$subtopic['id']?>]" <?php if(in_array($subtopic['id'], $quest['subtopics'])) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="subtopic-<?=$quest['id']?>-<?=$subtopic['id']?>"><?=$subtopic['title']?></label><br />
|
||||
<?php endforeach ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<li>
|
||||
<p>
|
||||
<select name="addquest">
|
||||
<option value=""><?=_('Add Quest')?></option>
|
||||
<?php foreach($allQuests as &$quest) : ?>
|
||||
<option value="<?=$quest['id']?>"><?=$quest['title']?></opiton>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</p>
|
||||
<?php foreach($questsubtopics as &$subtopic) : ?>
|
||||
<input id="subtopic-new-<?=$subtopic['id']?>" type="checkbox" name="questsubtopics[addquest][<?=$subtopic['id']?>]" />
|
||||
<label for="subtopic-new-<?=$subtopic['id']?>"><?=$subtopic['title']?></label><br />
|
||||
<?php endforeach ?>
|
||||
</li>
|
||||
</ul>
|
||||
<input type="submit" value="<?=_('Manage')?>" />
|
||||
</form>
|
||||
37
views/html/library/topic.tpl
Normal file
37
views/html/library/topic.tpl
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php if(!is_null($seminary['library_seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url'], 'library'))?>">
|
||||
</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)?>"><?=_('Library')?></a></li>
|
||||
</ul>
|
||||
<h1><i class="fa fa-book fa-fw"></i><?=$questtopic['title']?></h1>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('edit',$seminary['url'],$questtopic['url']),1)?>"><?=_('Edit Questtopic')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('delete',$seminary['url'],$questtopic['url']),1)?>"><?=_('Delete Questtopic')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('manage',$seminary['url'],$questtopic['url']),1)?>"><?=_('Manage Questtopic')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<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)?>"><?=\nre\configs\AppConfig::$app['name']?></a></li>
|
||||
<?php if(!is_null($loggedUser) && count(array_intersect(array('admin','moderator'),$loggedUser['roles'])) > 0) : ?><li><a href="<?=$linker->link('users')?>"><?=_('Users')?></a></li><?php endif ?>
|
||||
<?php if(!is_null($loggedUser)) : ?><li><a href="<?=$linker->link('seminaries')?>"><?=_('Seminaries')?></a></li><?php endif ?>
|
||||
<?php if(!is_null($loggedCharacter) && count($loggedCharacter['characterroles']) > 0) : ?><?=$seminarymenu?><?php endif ?>
|
||||
<?php if(is_null($loggedUser)) : ?>
|
||||
<li><a href="<?=$linker->link(array('users','login'))?>"><?=_('Login')?></a></li>
|
||||
<?php else : ?>
|
||||
<li><a href="<?=$linker->link(array('users','logout'))?>"><?=_('Logout')?></a></li>
|
||||
<?php endif ?>
|
||||
18
views/html/questgroups/create.tpl
Normal file
18
views/html/questgroups/create.tpl
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?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><?=_('Questgroups')?></li>
|
||||
</ul>
|
||||
<h1><?=_('Create Questgroup')?></h1>
|
||||
|
||||
<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>
|
||||
72
views/html/questgroups/questgroup.tpl
Normal file
72
views/html/questgroups/questgroup.tpl
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<?php if(!is_null($picture)) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$picture['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?=$questgroupshierarchypath?>
|
||||
|
||||
<?php if(!is_null($questgroup['hierarchy'])) : ?>
|
||||
<h1><?=$questgroup['hierarchy']['title_singular']?> <?=$questgroup['hierarchy']['questgroup_pos']?>: <?=$questgroup['title']?></h1>
|
||||
<?php else : ?>
|
||||
<h1><?=$questgroup['title']?></h1>
|
||||
<?php endif ?>
|
||||
<?php if(count($texts) > 0): ?>
|
||||
<div class="qtextbox">
|
||||
<?php foreach($texts as &$text) : ?>
|
||||
<p class="qtext"><?=\hhu\z\Utils::t($text['text'])?></p>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?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">
|
||||
<?php if($group['solved']) : ?>
|
||||
<i class="fa fa-check-square-o"></i>
|
||||
<?php else : ?>
|
||||
<i class="fa fa-square-o"></i>
|
||||
<?php endif ?>
|
||||
</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['achievable_xps']*100)?>%"></span>
|
||||
</div>
|
||||
<p class="xpnumeric"><?=$group['character_xps']?> / <?=$group['achievable_xps']?> XP</p>
|
||||
</div>
|
||||
<?php foreach($group['relatedQuestgroups'] as &$relatedGroup) : ?>
|
||||
<div class="qghidden">
|
||||
<p><?=_('Found optional Questline')?>:</p>
|
||||
<p><a href="<?=$linker->link(array($seminary['url'],$relatedGroup['url']),2)?>"><i class="fa fa-star-o fa-fw"></i><?=$relatedGroup['title']?></a></p>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</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-square-o'?> fa-fw"></i><?=$quest['title']?></a>
|
||||
</li>
|
||||
<?php if(count($quest['relatedQuestgroups']) > 0) : ?>
|
||||
<?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"></i><?=$relatedQuestgroup['title']?></a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
16
views/html/questgroupshierarchypath/index.tpl
Normal file
16
views/html/questgroupshierarchypath/index.tpl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<ul class="breadcrumbs">
|
||||
<li><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></li>
|
||||
<?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>
|
||||
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>
|
||||
80
views/html/quests/index.tpl
Normal file
80
views/html/quests/index.tpl
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
<?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="get" class="logreg admnqf">
|
||||
<fieldset>
|
||||
<legend>Filter</legend>
|
||||
<label for="questgroup"><?=_('Questgroup')?>:</label>
|
||||
<select id="questgroup" name="questgroup">
|
||||
<option value=""><?=_('all')?></option>
|
||||
<?php foreach($questgroups as &$questgroup) : ?>
|
||||
<option value="<?=$questgroup['id']?>" <?php if($questgroup['id'] == $selectedQuestgroup) : ?>selected="selected"<?php endif ?>><?=$questgroup['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<label for="questtype"><?=_('Questtype')?>:</label>
|
||||
<select id="questtype" name="questtype">
|
||||
<option value=""><?=_('all')?></option>
|
||||
<?php foreach($questtypes as &$questtype) : ?>
|
||||
<option value="<?=$questtype['id']?>" <?php if($questtype['id'] == $selectedQuesttype) : ?>selected="selected"<?php endif ?>>
|
||||
<?php switch($questtype['classname']) {
|
||||
case null: echo _('Questtype Empty');
|
||||
break;
|
||||
case 'bossfight': echo _('Questtype bossfight');
|
||||
break;
|
||||
case 'choiceinput': echo _('Questtype choiceinput');
|
||||
break;
|
||||
case 'crossword': echo _('Questtype crossword');
|
||||
break;
|
||||
case 'dragndrop': echo _('Questtype dragndrop');
|
||||
break;
|
||||
case 'multiplechoice': echo _('Questtype multiplechoice');
|
||||
break;
|
||||
case 'submit': echo _('Questtype submit');
|
||||
break;
|
||||
case 'textinput': echo _('Questtype textinput');
|
||||
break;
|
||||
} ?>
|
||||
</option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</fieldset>
|
||||
<input type="submit" value="<?=_('Apply 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>
|
||||
<?php switch($quest['questtype']['classname']) {
|
||||
case null: echo _('Questtype Empty');
|
||||
break;
|
||||
case 'bossfight': echo _('Questtype bossfight');
|
||||
break;
|
||||
case 'choiceinput': echo _('Questtype choiceinput');
|
||||
break;
|
||||
case 'crossword': echo _('Questtype crossword');
|
||||
break;
|
||||
case 'dragndrop': echo _('Questtype dragndrop');
|
||||
break;
|
||||
case 'multiplechoice': echo _('Questtype multiplechoice');
|
||||
break;
|
||||
case 'submit': echo _('Questtype submit');
|
||||
break;
|
||||
case 'textinput': echo _('Questtype textinput');
|
||||
break;
|
||||
} ?>, <?=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>
|
||||
<?php if(!is_null($limit)) : ?>
|
||||
<p><a href="<?=$linker->link('all',3)?>"><?=_('Show all')?></a></p>
|
||||
<?php endif ?>
|
||||
137
views/html/quests/quest.tpl
Normal file
137
views/html/quests/quest.tpl
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
<?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>
|
||||
<?php if(!empty($nextquest['entry_text'])) : ?>
|
||||
<i><?=$nextquest['entry_text']?></i>
|
||||
<?php if($nextquest['entered'] || !$charactedHasChoosenNextQuest) : ?>
|
||||
<p><a class="cta orange" href="<?=$linker->link(array($nextquest['questgroup_url'],$nextquest['url']),3)?>"><?=_('Choose')?></a></p>
|
||||
<?php endif ?>
|
||||
<?php else : ?>
|
||||
<p><?=_('Quest')?>: <a href="<?=$linker->link(array($nextquest['questgroup_url'],$nextquest['url']),3)?>"><?=$nextquest['title']?></a></p>
|
||||
<?php if($nextquest['entered'] || !$charactedHasChoosenNextQuest) : ?>
|
||||
<p><a class="cta orange" href="<?=$linker->link(array($nextquest['questgroup_url'],$nextquest['url']),3)?>"><?=_('Go on')?></a></p>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</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></p>
|
||||
<p><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>
|
||||
39
views/html/quests/submissions.tpl
Normal file
39
views/html/quests/submissions.tpl
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?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']?> (<?=_('Submissions')?>)</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>
|
||||
<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><?=_('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>
|
||||
<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>
|
||||
</section>
|
||||
0
views/html/seminaries/calculatexps.tpl
Normal file
0
views/html/seminaries/calculatexps.tpl
Normal file
15
views/html/seminaries/create.tpl
Normal file
15
views/html/seminaries/create.tpl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
|
||||
</div>
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?=$linker->link('index',1)?>"><?=_('Seminaries')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('New seminary')?></h1>
|
||||
<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>
|
||||
15
views/html/seminaries/delete.tpl
Normal file
15
views/html/seminaries/delete.tpl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?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('index',1)?>"><?=_('Seminaries')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Delete seminary')?></h1>
|
||||
<?=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>
|
||||
17
views/html/seminaries/edit.tpl
Normal file
17
views/html/seminaries/edit.tpl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?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('index',1)?>"><?=_('Seminaries')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Edit seminary')?></h1>
|
||||
<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>
|
||||
42
views/html/seminaries/index.tpl
Normal file
42
views/html/seminaries/index.tpl
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
|
||||
</div>
|
||||
<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','seminarymoodpic',$seminary['url']))?>" />
|
||||
<?php endif ?>
|
||||
<section>
|
||||
<p class="fwb">
|
||||
<?php if(array_key_exists('usercharacter', $seminary) && count($seminary['usercharacter']['characterroles']) > 0) : ?>
|
||||
<a href="<?=$linker->link(array('seminary', $seminary['url']), 1)?>"><?=$seminary['title']?></a>
|
||||
<?php else : ?>
|
||||
<?=$seminary['title']?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<?php if(array_key_exists('usercharacter', $seminary)) : ?>
|
||||
<div class="cf">
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round($seminary['usercharacter']['xps'] * 100 / $seminary['xps'])?>%"></span>
|
||||
</div>
|
||||
<p class="xpnumeric"><?=$seminary['usercharacter']['xps']?> / <?=sprintf(_('%d XPs'), $seminary['xps'])?></p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<p><?=\hhu\z\Utils::t($seminary['description'])?></p>
|
||||
<p><small><?=sprintf(_('created by %s on %s'), $seminary['creator']['username'], $dateFormatter->format(new \DateTime($seminary['created'])))?></small></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['usercharacter']['characterroles']) == 0) : ?>
|
||||
<p><?=sprintf(_('Your Character “%s” has not been activated yet'), $seminary['usercharacter']['name'])?></p>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
41
views/html/seminaries/seminary.tpl
Normal file
41
views/html/seminaries/seminary.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 ?>
|
||||
<h1><?=$seminary['title']?></h1>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?><li><a href="<?=$linker->link('edit', 3)?>"><?=_('Edit seminary')?></a></li><?php endif ?>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?><li><a href="<?=$linker->link('delete', 3)?>"><?=_('Delete seminary')?></a></li><?php endif ?>
|
||||
<?php if(count(array_intersect(array('admin','moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?><li><a href="<?=$linker->link(array('quests','index',$seminary['url']))?>"><?=_('Show Quests')?></a></li><?php endif ?>
|
||||
<?php if(count(array_intersect(array('admin','moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?><li><a href="<?=$linker->link(array('calculatexps',$seminary['url']),1)?>"><?=_('Recalculate XPs')?></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['achievable_xps'])?>%"></span>
|
||||
</div>
|
||||
<p class="xpnumeric"><?=$group['character_xps']?> / <?=$group['achievable_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"><?=_('Let’s go')?></a>
|
||||
</section>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
<?php endforeach ?>
|
||||
50
views/html/seminarybar/index.tpl
Normal file
50
views/html/seminarybar/index.tpl
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?php if($render) : ?>
|
||||
<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><?=sprintf(_('%d XPs'), $character['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="<?=$linker->link(array('achievements','index',$seminary['url']),0,true,null,true,$lastAchievement['url'])?>" title="Achievement-Titel"><img src="<?=$linker->link(array('media','achievement',$seminary['url'],$lastAchievement['url']))?>"></a>
|
||||
<?php endif ?>
|
||||
<p><a href="<?=$linker->link(array('achievements','index',$seminary['url']),0,true,null,true,$lastAchievement['url'])?>"><?=$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']?> (<?=sprintf(_('%d XPs'), $member['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>
|
||||
<?php endif ?>
|
||||
9
views/html/seminarymenu/index.tpl
Normal file
9
views/html/seminarymenu/index.tpl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php if(!is_null($loggedCharacter) && count($loggedCharacter['characterroles']) > 0) : ?>
|
||||
<ul id="smnry">
|
||||
<li><a href="<?=$linker->link(array('seminaries',$loggedSeminary['url']))?>"><i class="fa fa-home fa-fw"></i><?=$loggedSeminary['title']?></a></li>
|
||||
<?php if(count(array_intersect(array('admin','moderator'),$loggedUser['roles'])) > 0 || count(array_intersect(array('admin','moderator'),$loggedCharacter['characterroles']))) : ?><li><a href="<?=$linker->link(array('characters',$loggedSeminary['url']))?>"><i class="fa fa-user fa-fw"></i><?=_('Characters')?></a></li><?php endif ?>
|
||||
<li><a href="<?=$linker->link(array('charactergroups','index',$loggedSeminary['url']))?>"><i class="fa fa-users fa-fw"></i><?=_('Character Groups')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('achievements','index',$loggedSeminary['url']))?>"><i class="fa fa-trophy fa-fw"></i><?=_('Achievements')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('library','index',$loggedSeminary['url']))?>"><i class="fa fa-book fa-fw"></i><?=_('Library')?></a></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
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>
|
||||
97
views/html/users/create.tpl
Normal file
97
views/html/users/create.tpl
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
|
||||
</div>
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?=$linker->link('index',1)?>"><?=_('Users')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('New user')?></h1>
|
||||
<?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" class="logreg">
|
||||
<fieldset>
|
||||
<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>
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
13
views/html/users/delete.tpl
Normal file
13
views/html/users/delete.tpl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
|
||||
</div>
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?=$linker->link('index',1)?>"><?=_('Users')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Delete user')?></h1>
|
||||
<?=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>
|
||||
104
views/html/users/edit.tpl
Normal file
104
views/html/users/edit.tpl
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
|
||||
</div>
|
||||
<ul class="breadcrumbs">
|
||||
<?php if(count(array_intersect(array('admin','moderator'),\hhu\z\controllers\IntermediateController::$user['roles'])) > 0) : ?>
|
||||
<li><a href="<?=$linker->link('index',1)?>"><?=_('Users')?></a></li>
|
||||
<?php else : ?>
|
||||
<li><?=_('Users')?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Edit user')?></h1>
|
||||
<?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" class="logreg">
|
||||
<fieldset>
|
||||
<label for="username"><?=_('Username')?>:</label>
|
||||
<?php if(count(array_intersect(array('admin','moderator'),\hhu\z\controllers\IntermediateController::$user['roles'])) > 0) : ?>
|
||||
<input name="username" type="text" placeholder="<?=_('Username')?>" title="<?=_('Username')?>" value="<?=$username?>" required="required" maxlength="<?=$validationSettings['username']['maxlength']?>" <?=(array_key_exists('username', $validation)) ? 'class="invalid"' : null ?> />
|
||||
<?php else : ?>
|
||||
<input name="username" type="text" placeholder="<?=_('Username')?>" title="<?=_('Username')?>" value="<?=$username?>" disabled="disabled" />
|
||||
<input type="hidden" name="username" value="<?=$username?>" />
|
||||
<?php endif ?><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')?>" maxlength="<?=$validationSettings['password']['maxlength']?>" <?=(array_key_exists('password', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="save" value="<?=_('save')?>" />
|
||||
</form>
|
||||
13
views/html/users/index.tpl
Normal file
13
views/html/users/index.tpl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
|
||||
</div>
|
||||
<h1><?=_('Users')?></h1>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link('create', 1)?>"><?=_('Create new user')?></a></li>
|
||||
<li><a href="<?=$linker->link('manage',1)?>"><?=_('Manage')?></a></li>
|
||||
</nav>
|
||||
<ol class="cglist">
|
||||
<?php foreach($users as &$user) : ?>
|
||||
<li><p><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></p></li>
|
||||
<?php endforeach ?>
|
||||
</ol>
|
||||
21
views/html/users/login.tpl
Normal file
21
views/html/users/login.tpl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
|
||||
</div>
|
||||
<h1><?=_('Users')?></h1>
|
||||
|
||||
<h2><?=_('Login')?></h2>
|
||||
<?php if($failed) : ?>
|
||||
<p class="invalid"><?=_('Login failed')?>.</p>
|
||||
<?php endif ?>
|
||||
<form method="post" class="logreg">
|
||||
<fieldset>
|
||||
<label for="username"><?=_('Username')?>:</label>
|
||||
<input name="username" type="text" placeholder="<?=_('Username')?>" value="<?=$username?>" required="required" autofocus="autofocus" /><br />
|
||||
<label for="password"><?=_('Password')?>:</label>
|
||||
<input name="password" type="password" placeholder="<?=_('Password')?>" required="required" /><br />
|
||||
</fieldset>
|
||||
<?php if(!empty($referrer)) : ?>
|
||||
<input type="hidden" name="referrer" value="<?=$referrer?>" />
|
||||
<?php endif ?>
|
||||
<input type="submit" name="login" value="<?=_('Login')?>" />
|
||||
</form>
|
||||
0
views/html/users/logout.tpl
Normal file
0
views/html/users/logout.tpl
Normal file
54
views/html/users/manage.tpl
Normal file
54
views/html/users/manage.tpl
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
|
||||
</div>
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="<?=$linker->link('index',1)?>"><?=_('Users')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Manage users')?></h1>
|
||||
|
||||
<form method="post">
|
||||
<fieldset class="filter">
|
||||
<p><small>Sortierung:</small></p>
|
||||
<select name="sortorder" onchange="this.form.submit();">
|
||||
<option value="username" <?php if($sortorder == 'username') : ?>selected="selected"<?php endif ?>><?=_('Username')?></option>
|
||||
<option value="role" <?php if($sortorder == 'role') : ?>selected="selected"<?php endif ?>><?=_('Role')?></option>
|
||||
<option value="date" <?php if($sortorder == 'date') : ?>selected="selected"<?php endif ?>><?=_('Date of registration')?></option>
|
||||
</select>
|
||||
<noscript><input type="submit" value="<?=_('Sort list')?>" /></noscript>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<ul class="admnql">
|
||||
<?php foreach($users as &$user) : ?>
|
||||
<li class="cf">
|
||||
<input type="checkbox" id="users-<?=$user['id']?>" name="users[]" value="<?=$user['id']?>" <?php if(in_array($user['id'], $selectedUsers)) : ?>checked="checked"<?php endif ?> <?php if($user['id'] == \hhu\z\controllers\SeminaryController::$user['id']) : ?>disabled="disabled"<?php endif ?>/>
|
||||
<label for="users-<?=$user['id']?>">
|
||||
<p>
|
||||
<a href="<?=$linker->link(array('users','user',$user['url']))?>"><?=$user['username']?></a>
|
||||
<?php if(in_array('admin', $user['roles'])) : ?><small>(<?=_('Admin')?>)</small><?php endif ?>
|
||||
<?php if(in_array('moderator', $user['roles'])) : ?><small>(<?=_('Moderator')?>)</small><?php endif ?>
|
||||
<?php if(in_array('user', $user['roles'])) : ?><small>(<?=_('User')?>)</small><?php endif ?>
|
||||
<span class="xp"><small><?=sprintf(_('registered on %s'), $dateFormatter->format(new \DateTime($user['created'])))?></small></span>
|
||||
</p>
|
||||
</label>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?=_('Add role')?></legend>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\IntermediateController::$user['roles'])) : ?>
|
||||
<input type="submit" name="actions[addrole]" value="<?=_('Admin')?>" />
|
||||
<input type="submit" name="actions[addrole]" value="<?=_('Moderator')?>" />
|
||||
<?php endif ?>
|
||||
<input type="submit" name="actions[addrole]" value="<?=_('User')?>" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?=_('Remove role')?></legend>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\IntermediateController::$user['roles'])) : ?>
|
||||
<input type="submit" name="actions[removerole]" value="<?=_('Admin')?>" />
|
||||
<input type="submit" name="actions[removerole]" value="<?=_('Moderator')?>" />
|
||||
<?php endif ?>
|
||||
<input type="submit" name="actions[removerole]" value="<?=_('User')?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
95
views/html/users/register.tpl
Normal file
95
views/html/users/register.tpl
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
|
||||
</div>
|
||||
<ul class="breadcrumbs">
|
||||
<li><?=_('Users')?></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Registration')?></h1>
|
||||
<?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" 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>
|
||||
47
views/html/users/user.tpl
Normal file
47
views/html/users/user.tpl
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('grafics','questlab.jpg'))?>" />
|
||||
</div>
|
||||
<ul class="breadcrumbs">
|
||||
<?php if(count(array_intersect(array('admin','moderator'),\hhu\z\controllers\IntermediateController::$user['roles'])) > 0) : ?>
|
||||
<li><a href="<?=$linker->link('index',1)?>"><?=_('Users')?></a></li>
|
||||
<?php else : ?>
|
||||
<li><?=_('Users')?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
<h1><?=$user['username']?></h1>
|
||||
<nav class="admin">
|
||||
<?php if(count(array_intersect(array('admin','moderator'),\hhu\z\controllers\IntermediateController::$user['roles'])) > 0 || $user['id'] == \hhu\z\controllers\IntermediateController::$user['id']) : ?>
|
||||
<li><a href="<?=$linker->link('edit', 3)?>"><?=_('Edit user')?></a></li>
|
||||
<?php endif ?>
|
||||
<?php if(count(array_intersect(array('admin','moderator'),\hhu\z\controllers\IntermediateController::$user['roles'])) > 0) : ?>
|
||||
<li><a href="<?=$linker->link('delete', 3)?>"><?=_('Delete user')?></a></li>
|
||||
<?php endif ?>
|
||||
</nav>
|
||||
<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['characterroles']) > 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?>
|
||||
1
views/inlineerror.tpl
Normal file
1
views/inlineerror.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<p>Dieser Teil der Anwendung steht zur Zeit leider nicht zur Verfügung.</p>
|
||||
Loading…
Add table
Add a link
Reference in a new issue