merge
This commit is contained in:
commit
046a724272
4209 changed files with 1186656 additions and 0 deletions
1
views/ajax/ajax.tpl
Normal file
1
views/ajax/ajax.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$intermediate?>
|
||||
25
views/ajax/characters/index.tpl
Normal file
25
views/ajax/characters/index.tpl
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
foreach($characters as &$character)
|
||||
{
|
||||
// Role translation
|
||||
foreach($character['characterroles'] as &$role)
|
||||
{
|
||||
switch($role)
|
||||
{
|
||||
case 'admin': $role = _('Admin');
|
||||
break;
|
||||
case 'moderator': $role = _('Moderator');
|
||||
break;
|
||||
case 'user': $role = _('User');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<?=json_encode(array(
|
||||
'seminary' => $seminary,
|
||||
'characters' => $characters,
|
||||
'more' => (($page*$limit) < $charactersCount)
|
||||
))?>
|
||||
37
views/ajax/quests/index.tpl
Normal file
37
views/ajax/quests/index.tpl
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
foreach($quests as &$quest)
|
||||
{
|
||||
// Questtype translation
|
||||
$questtype = $quest['questtype']['title'];
|
||||
switch($quest['questtype']['classname'])
|
||||
{
|
||||
case null: $questtype = _('Questtype Empty');
|
||||
break;
|
||||
case 'bossfight': $questtype = _('Questtype bossfight');
|
||||
break;
|
||||
case 'choiceinput': $questtype = _('Questtype choiceinput');
|
||||
break;
|
||||
case 'crossword': $questtype = _('Questtype crossword');
|
||||
break;
|
||||
case 'dragndrop': $questtype = _('Questtype dragndrop');
|
||||
break;
|
||||
case 'multiplechoice': $questtype = _('Questtype multiplechoice');
|
||||
break;
|
||||
case 'submit': $questtype = _('Questtype submit');
|
||||
break;
|
||||
case 'textinput': $questtype = _('Questtype textinput');
|
||||
break;
|
||||
}
|
||||
$quest['questtype']['title'] = $questtype;
|
||||
|
||||
// XPs translation
|
||||
$quest['xps'] = sprintf(_('%d XPs'), $quest['xps']);
|
||||
}
|
||||
|
||||
?>
|
||||
<?=json_encode(array(
|
||||
'seminary' => $seminary,
|
||||
'quests' => $quests,
|
||||
'more' => (($page*$limit) < $questsCount)
|
||||
))?>
|
||||
27
views/ajax/users/index.tpl
Normal file
27
views/ajax/users/index.tpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
foreach($users as &$user)
|
||||
{
|
||||
// Role translation
|
||||
foreach($user['roles'] as &$role)
|
||||
{
|
||||
switch($role)
|
||||
{
|
||||
case 'admin': $role = _('Admin');
|
||||
break;
|
||||
case 'moderator': $role = _('Moderator');
|
||||
break;
|
||||
case 'user': $role = _('User');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Date formattieng
|
||||
$user['created'] = sprintf(_('registered on %s'), $dateFormatter->format(new \DateTime($user['created'])));
|
||||
}
|
||||
|
||||
?>
|
||||
<?=json_encode(array(
|
||||
'users' => $users,
|
||||
'more' => (($page*$limit) < $usersCount)
|
||||
))?>
|
||||
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/seminarymap.tpl
Normal file
1
views/binary/media/seminarymap.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>
|
||||
152
views/html/achievements/conditions.tpl
Normal file
152
views/html/achievements/conditions.tpl
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
<?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>
|
||||
<li><i class="fa fa-chevron-right fa-fw"></i><a href="<?=$linker->link(array('achievements','index',$seminary['url']))?>"><?=_('Achievements')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Edit Achievement conditions')?></h1>
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<legend><?=_('Conditions')?></legend>
|
||||
<ul>
|
||||
<?php foreach($conditions as &$condition) : ?>
|
||||
<li>
|
||||
<?php if($achievement['condition'] == 'date') : ?>
|
||||
<label for="condition-<?=$condition['id']?>-select"><?=_('Date')?>:</label>
|
||||
<input id="condition-<?=$condition['id']?>-select" type="text" name="conditions[<?=$condition['id']?>][select]" placeholder="SELECT" value="<?=$condition['select']?>" />
|
||||
<?php elseif($achievement['condition'] == 'character') : ?>
|
||||
<label for="condition-<?=$condition['id']?>-value"><?=_('Field')?>:</label>
|
||||
<select id="condition-<?=$condition['id']?>-field" name="conditions[<?=$condition['id']?>][field]">
|
||||
<?php foreach($characterFields as &$field) : ?>
|
||||
<option value="<?=$field?>" <?php if($condition['field'] == $field) : ?>selected="selected"<?php endif ?>><?=$field?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<label for="condition-<?=$condition['id']?>-value"><?=_('Value')?>:</label>
|
||||
<input id="condition-<?=$condition['id']?>-value" type="text" name="conditions[<?=$condition['id']?>][value]" placeholder="<?=_('Value')?>" value="<?=$condition['value']?>" />
|
||||
<?php elseif($achievement['condition'] == 'quest') : ?>
|
||||
<label for="condition-<?=$condition['id']?>-value"><?=_('Field')?>:</label>
|
||||
<select id="condition-<?=$condition['id']?>-field" name="conditions[<?=$condition['id']?>][field]">
|
||||
<?php foreach($questFields as &$field) : ?>
|
||||
<option value="<?=$field?>" <?php if($condition['field'] == $field) : ?>selected="selected"<?php endif ?>><?=$field?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<input id="condition-<?=$condition['id']?>-count" type="checkbox" name="conditions[<?=$condition['id']?>][count]" <?php if($condition['count']) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="condition-<?=$condition['id']?>-count"><?=_('Count')?></label><br />
|
||||
<label for="condition-<?=$condition['id']?>-value"><?=_('Value')?>:</label>
|
||||
<input id="condition-<?=$condition['id']?>-value" type="text" name="conditions[<?=$condition['id']?>][value]" placeholder="<?=_('Value')?>" value="<?=$condition['value']?>" /><br />
|
||||
<label for="condition-<?=$condition['id']?>-quest"><?=_('Quest')?>:</label>
|
||||
<select id="condition-<?=$condition['id']?>-quest" name="conditions[<?=$condition['id']?>][quest]">
|
||||
<option value="" <?php if(is_null($condition['quest_id'])) : ?>selected="selected"<?php endif ?>><?=_('unset')?><option>
|
||||
<?php foreach($quests as &$quest) : ?>
|
||||
<option value="<?=$quest['url']?>" <?php if($condition['quest_id'] == $quest['id']) : ?>selected="selected"<?php endif ?>><?=$quest['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<label for="condition-<?=$condition['id']?>-status"><?=_('Status')?>:</label>
|
||||
<select id="condition-<?=$condition['id']?>-status" name="conditions[<?=$condition['id']?>][status]">
|
||||
<option value="" <?php if(is_null($condition['status'])) : ?>selected="selected"<?php endif ?>><?=_('unset')?></option>
|
||||
<option value="0" <?php if(!is_null($condition['status']) && $condition['status'] == 0) : ?>selected="selected"<?php endif ?>><?=_('entered')?></option>
|
||||
<option value="1" <?php if($condition['status'] == 1) : ?>selected="selected"<?php endif ?>><?=_('submitted')?></option>
|
||||
<option value="2" <?php if($condition['status'] == 2) : ?>selected="selected"<?php endif ?>><?=_('unsolved')?></option>
|
||||
<option value="3" <?php if($condition['status'] == 3) : ?>selected="selected"<?php endif ?>><?=_('solved')?></option>
|
||||
</select><br />
|
||||
<label for="condition-<?=$condition['id']?>-groupby"><?=_('Group by')?>:</label>
|
||||
<input id="condition-<?=$condition['id']?>-groupby" type="text" name="conditions[<?=$condition['id']?>][groupby]" placeholder="<?=_('Group by')?>" value="<?=$condition['groupby']?>" />
|
||||
<?php elseif($achievement['condition'] == 'achievement') : ?>
|
||||
<label for="condition-<?=$condition['id']?>-value"><?=_('Field')?>:</label>
|
||||
<select id="condition-<?=$condition['id']?>-field" name="conditions[<?=$condition['id']?>][field]">
|
||||
<?php foreach($achievementFields as &$field) : ?>
|
||||
<option value="<?=$field?>" <?php if($condition['field'] == $field) : ?>selected="selected"<?php endif ?>><?=$field?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<input id="condition-<?=$condition['id']?>-count" type="checkbox" name="conditions[<?=$condition['id']?>][count]" <?php if($condition['count']) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="condition-<?=$condition['id']?>-count"><?=_('Count')?></label><br />
|
||||
<label for="condition-<?=$condition['id']?>-value"><?=_('Value')?>:</label>
|
||||
<input id="condition-<?=$condition['id']?>-value" type="text" name="conditions[<?=$condition['id']?>][value]" placeholder="<?=_('Value')?>" value="<?=$condition['value']?>" /><br />
|
||||
<label for="condition-<?=$condition['id']?>-achievement"><?=_('Achievement')?>:</label>
|
||||
<select id="condition-<?=$condition['id']?>-achievement" name="conditions[<?=$condition['id']?>][achievement]">
|
||||
<option value="" <?php if(is_null($condition['meta_achievement_id'])) : ?>selected="selected"<?php endif ?>><?=_('unset')?><option>
|
||||
<?php foreach($achievements as &$a) : ?>
|
||||
<option value="<?=$a['url']?>" <?php if($condition['meta_achievement_id'] == $a['id']) : ?>selected="selected"<?php endif ?>><?=$a['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<label for="condition-<?=$condition['id']?>-groupby"><?=_('Group by')?>:</label>
|
||||
<input id="condition-<?=$condition['id']?>-groupby" type="text" name="conditions[<?=$condition['id']?>][groupby]" placeholder="<?=_('Group by')?>" value="<?=$condition['groupby']?>" />
|
||||
<?php endif ?>
|
||||
<br />
|
||||
<input id="delete-<?=$condition['id']?>" type="checkbox" name="deletes[<?=$condition['id']?>]" <?php if(array_key_exists($condition['id'], $deletes)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="delete-<?=$condition['id']?>"><?=_('delete')?></label>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<li>
|
||||
<?php if($achievement['condition'] == 'date') : ?>
|
||||
<label for="condition-new-select"><?=_('Date')?>:</label>
|
||||
<input id="condition-new-select" type="text" name="conditions[new][select]" placeholder="<?=_('New condition')?>" value="" />
|
||||
<?php elseif($achievement['condition'] == 'character') : ?>
|
||||
<label for="condition-new-field"><?=_('Field')?>:</label>
|
||||
<select id="condition-new-field" name="conditions[new][field]">
|
||||
<?php foreach($characterFields as &$field) : ?>
|
||||
<option value="<?=$field?>"><?=$field?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<label for="condition-new-value"><?=_('Value')?>:</label>
|
||||
<input id="condition-new-value" type="text" name="conditions[new][value]" placeholder="<?=_('New condition')?>" value="" />
|
||||
<?php elseif($achievement['condition'] == 'quest') : ?>
|
||||
<label for="condition-new-field"><?=_('Field')?>:</label>
|
||||
<select id="condition-new-field" name="conditions[new][field]">
|
||||
<?php foreach($questFields as &$field) : ?>
|
||||
<option value="<?=$field?>"><?=$field?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<input id="condition-new-count" type="checkbox" name="conditions[new][count]" />
|
||||
<label for="condition-new-count"><?=_('Count')?></label><br />
|
||||
<label for="condition-value"><?=_('Value')?>:</label>
|
||||
<input id="condition-new-value" type="number" name="conditions[new][value]" placeholder="<?=_('Value')?>" value="" /><br />
|
||||
<label for="condition-new-quest"><?=_('Quest')?>:</label>
|
||||
<select id="condition-new-quest" name="conditions[new][quest]">
|
||||
<option value=""><?=_('unset')?><option>
|
||||
<?php foreach($quests as &$quest) : ?>
|
||||
<option value="<?=$quest['url']?>"><?=$quest['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<label for="condition-new-status"><?=_('Status')?>:</label>
|
||||
<select id="condition-new-status" name="conditions[new][status]">
|
||||
<option value=""><?=_('unset')?></option>
|
||||
<option value="0"><?=_('entered')?></option>
|
||||
<option value="1"><?=_('submitted')?></option>
|
||||
<option value="2"><?=_('unsolved')?></option>
|
||||
<option value="3"><?=_('solved')?></option>
|
||||
</select><br />
|
||||
<label for="condition-new-groupby"><?=_('Group by')?>:</label>
|
||||
<input id="condition-new-groupby" type="text" name="conditions[new][groupby]" placeholder="<?=_('Group by')?>" value="" />
|
||||
<?php elseif($achievement['condition'] == 'achievement') : ?>
|
||||
<label for="condition-new-field"><?=_('Field')?>:</label>
|
||||
<select id="condition-new-field" name="conditions[new][field]">
|
||||
<?php foreach($achievementFields as &$field) : ?>
|
||||
<option value="<?=$field?>"><?=$field?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<input id="condition-new-count" type="checkbox" name="conditions[new][count]" />
|
||||
<label for="condition-new-count"><?=_('Count')?></label><br />
|
||||
<label for="condition-new-value"><?=_('Value')?>:</label>
|
||||
<input id="condition-new-value" type="number" name="conditions[new][value]" placeholder="<?=_('Value')?>" value="" /><br />
|
||||
<label for="condition-new-achievement"><?=_('Achievement')?>:</label>
|
||||
<select id="condition-new-achievement" name="conditions[new][achievement]">
|
||||
<option value=""><?=_('unset')?><option>
|
||||
<?php foreach($achievements as &$a) : ?>
|
||||
<option value="<?=$a['url']?>"><?=$a['title']?></option>
|
||||
<?php endforeach ?>
|
||||
</select><br />
|
||||
<label for="condition-new-groupby"><?=_('Group by')?>:</label>
|
||||
<input id="condition-new-groupby" type="text" name="conditions[new][groupby]" placeholder="<?=_('Group by')?>" value="" />
|
||||
<?php else : ?>
|
||||
hallo
|
||||
<?php endif ?>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('save')?>" />
|
||||
</form>
|
||||
109
views/html/achievements/create.tpl
Normal file
109
views/html/achievements/create.tpl
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
<?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>
|
||||
<li><i class="fa fa-chevron-right fa-fw"></i><a href="<?=$linker->link(array('achievements','index',$seminary['url']))?>"><?=_('Achievements')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Create Achievement')?></h1>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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 picture upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Picture has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Picture exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Picture 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 'deadline':
|
||||
switch($setting) {
|
||||
case 'regex': echo _('Deadline has wrong format');
|
||||
break;
|
||||
default: echo _('Deadline invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" class="logreg" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Images')?></legend>
|
||||
<label for="unachievedImage"><?=_('Unachieved')?></label>
|
||||
<input id="unachievedImage" type="file" name="unachieved_image" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" /><br />
|
||||
<label for="achievedImage"><?=_('Achieved')?></label>
|
||||
<input id="achievedImage" type="file" name="achieved_image" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" /><br />
|
||||
<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 id="title" type="text" name="title" placeholder="<?=_('Title')?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$title?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="description"><?=_('Description')?>:</label>
|
||||
<textarea id="description" name="description"><?=$description?></textarea><br />
|
||||
<input id="progress" type="checkbox" name="progress" <?php if($progress) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="progress"><?=_('Show progress')?></label><br />
|
||||
<input id="hidden" type="checkbox" name="hidden" <?php if($hidden) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="hidden"><?=_('Secret Achievement')?></label><br />
|
||||
<input id="onlyOnce" type="checkbox" name="only_once" <?php if($onlyOnce) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="onlyOnce"><?=_('Only achieveable by one Character')?></label><br />
|
||||
<input id="allConditions" type="checkbox" name="all_conditions" <?php if($allConditions) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="allConditions"><?=_('All conditions')?></label><br />
|
||||
<label for="deadline"><?=_('Deadline')?>:</label>
|
||||
<input id="deadline" type="datetime" name="deadline" placeholder="YYYY-MM-DD HH:MM:SS" pattern="<?=substr($validationSettings['deadline']['regex'],1,strrpos($validationSettings['deadline']['regex'],$validationSettings['deadline']['regex'][0])-1)?>" value="<?=$deadline?>" <?=(array_key_exists('deadline', $validation)) ? 'class="invalid"' : null?> />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?=_('Conditions')?></legend>
|
||||
<select name="condition">
|
||||
<?php foreach($conditions as &$c) : ?>
|
||||
<option value="<?=$c['condition']?>" <?php if($c['condition'] == $condition) : ?>selected="selected"<?php endif ?>>
|
||||
<?php switch($c['condition']) {
|
||||
case 'date': echo _('Achievement conditions date');
|
||||
break;
|
||||
case 'character': echo _('Achievement conditions Character');
|
||||
break;
|
||||
case 'quest': echo _('Achievement conditions Quest');
|
||||
break;
|
||||
case 'achievement': echo _('Achievement conditions Achievement');
|
||||
break;
|
||||
} ?>
|
||||
</option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('save and edit conditions')?>" />
|
||||
</form>
|
||||
16
views/html/achievements/delete.tpl
Normal file
16
views/html/achievements/delete.tpl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?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>
|
||||
<li><i class="fa fa-chevron-right fa-fw"></i><a href="<?=$linker->link(array('achievements','index',$seminary['url']))?>"><?=_('Achievements')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Delete Achievement')?></h1>
|
||||
<?=sprintf(_('Should the Achievement “%s” really be deleted?'), $achievement['title'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
113
views/html/achievements/edit.tpl
Normal file
113
views/html/achievements/edit.tpl
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
<?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>
|
||||
<li><i class="fa fa-chevron-right fa-fw"></i><a href="<?=$linker->link(array('achievements','index',$seminary['url']))?>"><?=_('Achievements')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Edit Achievement')?></h1>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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 picture upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Picture has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Picture exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Picture 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 'deadline':
|
||||
switch($setting) {
|
||||
case 'regex': echo _('Deadline has wrong format');
|
||||
break;
|
||||
default: echo _('Deadline invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" class="logreg" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Images')?></legend>
|
||||
<img src="<?=$linker->link(array('media','achievement',$seminary['url'],$achievement['url'],'locked'))?>" />
|
||||
<label for="unachievedImage"><?=_('Unachieved')?></label>
|
||||
<input id="unachievedImage" type="file" name="unachieved_image" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" /><br />
|
||||
<img src="<?=$linker->link(array('media','achievement',$seminary['url'],$achievement['url']))?>" />
|
||||
<label for="achievedImage"><?=_('Achieved')?></label>
|
||||
<input id="achievedImage" type="file" name="achieved_image" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" /><br />
|
||||
<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 id="title" type="text" name="title" placeholder="<?=_('Title')?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$title?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="description"><?=_('Description')?>:</label>
|
||||
<textarea id="description" name="description"><?=$description?></textarea><br />
|
||||
<input id="progress" type="checkbox" name="progress" <?php if($progress) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="progress"><?=_('Show progress')?></label><br />
|
||||
<input id="hidden" type="checkbox" name="hidden" <?php if($hidden) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="hidden"><?=_('Secret Achievement')?></label><br />
|
||||
<input id="onlyOnce" type="checkbox" name="only_once" <?php if($onlyOnce) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="onlyOnce"><?=_('Only achieveable by one Character')?></label><br />
|
||||
<input id="allConditions" type="checkbox" name="all_conditions" <?php if($allConditions) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="allConditions"><?=_('All conditions')?></label><br />
|
||||
<label for="deadline"><?=_('Deadline')?>:</label>
|
||||
<input id="deadline" type="datetime" name="deadline" placeholder="YYYY-MM-DD HH:MM:SS" pattern="<?=substr($validationSettings['deadline']['regex'],1,strrpos($validationSettings['deadline']['regex'],$validationSettings['deadline']['regex'][0])-1)?>" value="<?=$deadline?>" <?=(array_key_exists('deadline', $validation)) ? 'class="invalid"' : null?> />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?=_('Condition')?></legend>
|
||||
<select name="condition">
|
||||
<?php foreach($conditions as &$c) : ?>
|
||||
<option value="<?=$c['condition']?>" <?php if($c['condition'] == $condition) : ?>selected="selected"<?php endif ?>>
|
||||
<?php switch($c['condition']) {
|
||||
case 'date': echo _('Achievement conditions date');
|
||||
break;
|
||||
case 'character': echo _('Achievement conditions Character');
|
||||
break;
|
||||
case 'quest': echo _('Achievement conditions Quest');
|
||||
break;
|
||||
case 'achievement': echo _('Achievement conditions Achievement');
|
||||
break;
|
||||
} ?>
|
||||
</option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<i><?=_('Changing the condition will delete all current conditions')?>.</i>
|
||||
</fieldset>
|
||||
<input type="submit" name="edit-conditions" value="<?=_('edit conditions')?>" />
|
||||
<input type="submit" name="edit" value="<?=_('save')?>" />
|
||||
</form>
|
||||
97
views/html/achievements/index.tpl
Normal file
97
views/html/achievements/index.tpl
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<?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>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link('create', 3)?>"><?=_('Create new Achievement')?></a></li>
|
||||
<li><a href="<?=$linker->link('manage', 3)?>"><?=_('Manage Achievements')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
||||
<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 %%'), ($achievementsCount > 0 ? round(count($achievedAchievements) / $achievementsCount * 100) : 0))?></small></p>
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=($achievementsCount > 0) ? round(count($achievedAchievements) / $achievementsCount * 100) : 0?>%"></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>
|
||||
28
views/html/achievements/manage.tpl
Normal file
28
views/html/achievements/manage.tpl
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?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>
|
||||
<li><i class="fa fa-chevron-right fa-fw"></i><a href="<?=$linker->link(array('achievements','index',$seminary['url']))?>"><?=_('Achievements')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><i class="fa fa-trophy fa-fw"></i><?=_('Manage Achievements')?></h1>
|
||||
<ul class="achmnts">
|
||||
<?php foreach($achievements as $index => &$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']?></h3>
|
||||
<p class="desc"><?=\hhu\z\Utils::t($achievement['description'])?></p>
|
||||
<ul class="admin">
|
||||
<li><a href="<?=$linker->link(array('edit',$seminary['url'],$achievement['url']),1)?>"><?=_('edit')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('delete',$seminary['url'],$achievement['url']),1)?>"><?=_('delete')?></a></li>
|
||||
<?php if($index > 0) : ?><li><a href="<?=$linker->link(array('moveup',$seminary['url'],$achievement['url']),1)?>">↑</a></li><?php endif ?>
|
||||
<?php if($index < count($achievements)-1) : ?><li><a href="<?=$linker->link(array('movedown',$seminary['url'],$achievement['url']),1)?>">↓</a></li><?php endif ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
0
views/html/achievements/movedown.tpl
Normal file
0
views/html/achievements/movedown.tpl
Normal file
0
views/html/achievements/moveup.tpl
Normal file
0
views/html/achievements/moveup.tpl
Normal file
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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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="number" 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>
|
||||
97
views/html/charactergroupsquests/manage.tpl
Normal file
97
views/html/charactergroupsquests/manage.tpl
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<?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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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 ?>
|
||||
<form class="mng" method="post" enctype="multipart/form-data">
|
||||
<ul class="gqgllry mnglst">
|
||||
<?php foreach($uploads as &$upload) : ?>
|
||||
<li>
|
||||
<input type="checkbox" id="upload_<?=$upload['upload']['id']?>" name="uploads[]" value="<?=$upload['upload']['id']?>" />
|
||||
<br />
|
||||
<label for="upload_<?=$upload['upload']['id']?>">
|
||||
<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>
|
||||
<label>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<input type="submit" name="deletemedia" value="<?=_('delete selected')?>" />
|
||||
</form>
|
||||
<form class="mng" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="media" /><br />
|
||||
<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>
|
||||
<input type="submit" name="setmedia" value="<?=_('upload')?>" />
|
||||
</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>
|
||||
<ol 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 ?>
|
||||
</ol>
|
||||
</section>
|
||||
154
views/html/characters/character.tpl
Normal file
154
views/html/characters/character.tpl
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
<?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:<?=($seminary['achievable_xps'] > 0) ? round($character['quest_xps']*100/$seminary['achievable_xps']) : 0?>%"></span>
|
||||
</div>
|
||||
<p><small><?=_('Total progress')?>: <?=($seminary['achievable_xps'] > 0) ? round($character['quest_xps']*100/$seminary['achievable_xps']) : 0?>%</small></p>
|
||||
</div>
|
||||
<?php if(array_key_exists('xplevel', $character) && !is_null($character['xplevel'])) : ?>
|
||||
<div class="cdata square">
|
||||
<p class="value"><?=$character['xplevel']['level']?></p>
|
||||
<p><small><?=_('Level')?></small></p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<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>
|
||||
<?php if(array_key_exists('xplevel', $character) && !is_null($character['xplevel'])) : ?>
|
||||
<div class="cportrait">
|
||||
<img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</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>
|
||||
<?php if(array_key_exists('xplevel', $rankCharacter) && !is_null($rankCharacter['xplevel'])) : ?>
|
||||
<?=_('Level')?> <?=$rankCharacter['xplevel']?> (<?=sprintf(_('%d XPs'), $rankCharacter['xps'])?>)
|
||||
<?php else : ?>
|
||||
<?=sprintf(_('%d XPs'), $rankCharacter['xps'])?>
|
||||
<?php endif ?>
|
||||
</small></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<li>
|
||||
<?php if(array_key_exists('xplevel', $character) && !is_null($character['xplevel'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level'],'portrait'))?>">
|
||||
<?php endif ?>
|
||||
<p class="fwb"><?=$character['rank']?>. <?=$character['name']?></p>
|
||||
<p><small>
|
||||
<?php if(array_key_exists('xplevel', $character) && !is_null($character['xplevel'])) : ?>
|
||||
<?=_('Level')?> <?=$character['xplevel']['level']?> (<?=sprintf(_('%d XPs'), $character['xps'])?>)
|
||||
<?php else : ?>
|
||||
<?=sprintf(_('%d XPs'), $character['xps'])?>
|
||||
<?php endif ?>
|
||||
</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>
|
||||
<?php if(array_key_exists('xplevel', $rankCharacter) && !is_null($rankCharacter['xplevel'])) : ?>
|
||||
<?=_('Level')?> <?=$rankCharacter['xplevel']?> (<?=sprintf(_('%d XPs'), $rankCharacter['xps'])?>)
|
||||
<?php else : ?>
|
||||
<?=sprintf(_('%d XPs'), $rankCharacter['xps'])?>
|
||||
<?php endif ?>
|
||||
</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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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>
|
||||
117
views/html/characters/index.tpl
Normal file
117
views/html/characters/index.tpl
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
<?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('xplevels','manage',$seminary['url']))?>"><?=_('Manage XP-levels')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('charactertypes','index',$seminary['url']))?>"><?=_('Manage Charactertypes')?></a></li>
|
||||
</nav>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('manage',$seminary['url']),1)?>"><?=_('Manage Characters')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
||||
<form method="get" class="logreg admnqf">
|
||||
<fieldset>
|
||||
<legend><?=_('Filters')?></legend>
|
||||
<small><?=_('Sortorder')?>:</small>
|
||||
<select name="sortorder" onchange="this.form.submit();">
|
||||
<option value="name" <?php if($sortorder == 'name') : ?>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="created" <?php if($sortorder == 'created') : ?>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>
|
||||
<label for="charactername"><?=_('Character name')?>:</label>
|
||||
<input id="charactername" type="text" name="charactername" placeholder="<?=_('Character name')?>" value="<?=$charactername?>" />
|
||||
</fieldset>
|
||||
<input type="submit" value="<?=_('Apply filters')?>" />
|
||||
</form>
|
||||
|
||||
<ul id="characterlist" class="admnql">
|
||||
<?php foreach($characters as &$character) : ?>
|
||||
<li class="cf">
|
||||
<?php if(array_key_exists('avatar', $character) && !is_null($character['avatar']['small_avatarpicture_id'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level'],'portrait'))?>">
|
||||
<?php endif ?>
|
||||
<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>
|
||||
|
||||
<?php if(is_null($all) && ($page*$limit) < $charactersCount) : ?>
|
||||
<nav class="admin">
|
||||
<li><a id="show-more" href="<?=$linker->link(null,3,true,array('page'=>$page+1,'sortorder'=>$sortorder))?>"><?=_('Show more')?></a></li>
|
||||
<li><a id="show-all" href="<?=$linker->link('all',3,true,array('sortorder'=>$sortorder))?>"><?=_('Show all')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
||||
<script>
|
||||
var page = 1;
|
||||
var request;
|
||||
var linkAvatar = "<?=$linker->link(array('media','avatar','SEMINARY','CHARACTERTYPE','XPLEVEL','portrait'))?>";
|
||||
var linkCharacter = "<?=$linker->link(array('character','SEMINARY','CHARACTER'),1)?>";
|
||||
var linkUser = "<?=$linker->link(array('users','user','USER'))?>";
|
||||
var linkPage = "<?=$linker->link(null,3,true,array('page'=>'PAGE','sortorder'=>$sortorder))?>";
|
||||
|
||||
$("#show-more").click(function(event) {
|
||||
if(request) {
|
||||
request.abort();
|
||||
}
|
||||
|
||||
page++;
|
||||
request = $.getJSON(linkPage.replace('PAGE', page), function(data) {
|
||||
linkAvatar = linkAvatar.replace('SEMINARY', data['seminary']['url']);
|
||||
linkCharacter = linkCharacter.replace('SEMINARY', data['seminary']['url']);
|
||||
$.each(data['characters'], function(key, character) {
|
||||
var urlAvatar = linkAvatar.replace('CHARACTERTYPE', character['charactertype_url']).replace('XPLEVEL', character['xplevel']['level']);
|
||||
var urlCharacter = linkCharacter.replace('CHARACTER', character['url']);
|
||||
var urlUser = linkUser.replace('USER', character['user']['url']);
|
||||
$("#characterlist").append(
|
||||
"<li class=\"cf\">" +
|
||||
"<img src=\"" + urlAvatar + "\" />" +
|
||||
"<p><a href=\"" + urlCharacter + "\">" + character['name'] + "</a><span>" + character['xps'] + " <?=_('XPs')?></span></p>" +
|
||||
"<p>" +
|
||||
"<small><a href=\"" + urlUser + "\">" + character['user']['username'] + "</a></small>\n" +
|
||||
(character['characterroles'].length > 0 ? "<small>(" + character['characterroles'].join(', ') + ")</small>" : '') +
|
||||
"</p>" +
|
||||
"<p class=\"chrflds\">" + $.map(character['characterfields'], function(val, i) {
|
||||
return val['value'];
|
||||
}).join('</p>\n<p class="chrflds">') + "</p>" +
|
||||
"</li>"
|
||||
);
|
||||
});
|
||||
if(data['more']) {
|
||||
$("#show-more").attr('href', linkPage.replace('PAGE', page+1));
|
||||
}
|
||||
else {
|
||||
$("#show-more").remove();
|
||||
$("#show-all").remove();
|
||||
}
|
||||
});
|
||||
request.fail(function (jqXHR, textStatus, errorThrown) {
|
||||
window.location.href = linkPage.replace('PAGE', page);
|
||||
});
|
||||
|
||||
|
||||
event.preventDefault();
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
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="name" <?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="created" <?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>
|
||||
97
views/html/characters/register.tpl
Normal file
97
views/html/characters/register.tpl
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<?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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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>
|
||||
<?php if(array_key_exists('avatar', $type) && !is_null($type['avatar']['small_avatarpicture_id'])) : ?>
|
||||
<img id="avatar" src="<?=$linker->link(array('media','avatar',$seminary['url'],$type['url'],$xplevels[0]['level'],'portrait'))?>" />
|
||||
<?php endif ?>
|
||||
</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>
|
||||
45
views/html/charactertypes/create.tpl
Normal file
45
views/html/charactertypes/create.tpl
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?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('index',$seminary['url']),1)?>"><?=_('Charactertypes')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Create new Charactertype')?></h1>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'charactertypename':
|
||||
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 'exist': echo _('Name already exists');
|
||||
break;
|
||||
default: echo _('Name invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<label for="name"><?=_('Name')?>:</legend>
|
||||
<input id="name" type="text" name="charactertypename" placeholder="<?=_('Name')?>" title="<?=_('Name')?>" required="required" maxlength="<?=$validationSettings['charactertypename']['maxlength']?>" value="<?=$name?>" <?=($validation !== true && array_key_exists('name', $validation)) ? 'class="invalid"' : null?> />
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
16
views/html/charactertypes/delete.tpl
Normal file
16
views/html/charactertypes/delete.tpl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?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('index',$seminary['url']),1)?>"><?=_('Charactertypes')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Delete Charactertype')?></h1>
|
||||
<?=sprintf(_('Should the Characterytpe “%s” really be deleted?'), $charactertype['name'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
143
views/html/charactertypes/edit.tpl
Normal file
143
views/html/charactertypes/edit.tpl
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
<?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('index',$seminary['url']),1)?>"><?=_('Charactertypes')?></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Edit Charactertype')?></h1>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'charactertypename':
|
||||
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 'exist': echo _('Name already exists');
|
||||
break;
|
||||
default: echo _('Name invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<label for="name"><?=_('Name')?>:</label>
|
||||
<input id="name" type="text" name="charactertypename" placeholder="<?=_('Name')?>" title="<?=_('Name')?>" required="required" maxlength="<?=$validationSettings['charactertypename']['maxlength']?>" value="<?=$name?>" <?=($validation !== true && array_key_exists('name', $validation)) ? 'class="invalid"' : null?> />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?=_('Avatars')?></legend>
|
||||
<table class="avatars">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Level</th>
|
||||
<th>Portrait</th>
|
||||
<th>Avatar</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($xplevels as &$xplevel) : ?>
|
||||
<?php if($avatarsValidation !== true && array_key_exists($xplevel['id'], $avatarsValidation)) : ?>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<?php if(array_key_exists('portrait', $avatarsValidation[$xplevel['id']])) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($avatarsValidation[$xplevel['id']]['portrait'] as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'avatar':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during avatar portrait upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Avatar portrait has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Avatar portrait exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Avatar portrait invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<?php if(array_key_exists('avatar', $avatarsValidation[$xplevel['id']])) : ?>
|
||||
<?php foreach($avatarsValidation[$xplevel['id']]['avatar'] as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'avatar':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during avatar upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Avatar has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Avatar exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Avatar invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<tr>
|
||||
<!--<th><?=_('Level')?> <?=$xplevel['level']?>:</th>-->
|
||||
<th><?=$xplevel['level']?></th>
|
||||
<td>
|
||||
<!--<label for="avatar-<?=$xplevel['id']?>-portrait"><?=_('Protrait')?>:</label><br />-->
|
||||
<?php if(array_key_exists('avatar', $xplevel) && !is_null($xplevel['avatar']['small_avatarpicture_id'])) : ?>
|
||||
<img id="avatar" src="<?=$linker->link(array('media','avatar',$seminary['url'],$charactertype['url'],$xplevel['level'],'portrait'))?>" />
|
||||
<?php endif ?>
|
||||
<input id="avatar-<?=$xplevel['id']?>-portrait" type="file" name="avatars[<?=$xplevel['id']?>][portrait]" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" />
|
||||
</td>
|
||||
<td>
|
||||
<!--<label for="avatar-<?=$xplevel['id']?>-avatar"><?=_('Avatar')?>:</label><br />-->
|
||||
<?php if(array_key_exists('avatar', $xplevel) && !is_null($xplevel['avatar']['avatarpicture_id'])) : ?>
|
||||
<img id="avatar" src="<?=$linker->link(array('media','avatar',$seminary['url'],$charactertype['url'],$xplevel['level']))?>" />
|
||||
<?php endif ?>
|
||||
<input id="avatar-<?=$xplevel['id']?>-avatar" type="file" name="avatars[<?=$xplevel['id']?>][avatar]" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
<input type="submit" name="edit" value="<?=_('save')?>" />
|
||||
</form>
|
||||
29
views/html/charactertypes/index.tpl
Normal file
29
views/html/charactertypes/index.tpl
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?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><?=_('Charactertypes')?></h1>
|
||||
<?php if($seminary['created_user_id'] == \hhu\z\controllers\IntermediateController::$user['id'] || (!is_null(\hhu\z\controllers\SeminaryController::$character) && in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles']))) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('create',$seminary['url']),1)?>"><?=_('Create new Character type')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<ul class="avatar">
|
||||
<?php foreach($charactertypes as &$type) : ?>
|
||||
<li>
|
||||
<p><?=$type['name']?></p>
|
||||
<?php if(array_key_exists('avatar', $type) && !is_null($type['avatar']['small_avatarpicture_id'])) : ?>
|
||||
<img id="avatar" src="<?=$linker->link(array('media','avatar',$seminary['url'],$type['url'],$xplevels[0]['level'],'portrait'))?>" />
|
||||
<?php endif ?>
|
||||
<ul class="admin">
|
||||
<li><a href="<?=$linker->link(array('edit',$seminary['url'],$type['url']),1)?>"><?=_('edit')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('delete',$seminary['url'],$type['url']),1)?>"><?=_('delete')?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
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 ?>
|
||||
128
views/html/html.tpl
Normal file
128
views/html/html.tpl
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
<!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" />
|
||||
<link rel="stylesheet" type="text/css" href="<?=$linker->link(array('css','ol.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="<?=$linker->link(array('js','jquery.nicescroll.min.js'))?>"></script>
|
||||
<script type="text/javascript" src="<?=$linker->link(array('js','ol.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/misc.js"></script>
|
||||
<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>
|
||||
<?php if(!empty($mailcontact)) : ?>
|
||||
<a class="contact" href="mailto:<?=$mailcontact?>"><?=$mailcontact?></a>
|
||||
<?php endif ?>
|
||||
</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']))?>">
|
||||
<?php if(array_key_exists('avatar', $loggedCharacter) && !is_null($loggedCharacter['avatar']['small_avatarpicture_id'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','avatar',$loggedSeminary['url'],$loggedCharacter['charactertype_url'],$loggedCharacter['xplevel']['level'],'portrait'))?>" />
|
||||
<?php endif ?>
|
||||
<span><?=$loggedCharacter['name']?></span><span class="lvlname">Level <?=$loggedCharacter['xplevel']['level']?></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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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 class="validation">
|
||||
<?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 class="validation">
|
||||
<?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 class="validation">
|
||||
<?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:<?=($topic['questcount'] > 0) ? round($topic['characterQuestcount']/$topic['questcount']*100) : 0?>%"></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:<?=($questtopic['questcount'] > 0) ? round($questtopic['characterQuestcount']/$questtopic['questcount']*100) : 0?>%"></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>
|
||||
45
views/html/map/index.tpl
Normal file
45
views/html/map/index.tpl
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?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><i class="fa fa-map-marker fa-fw"></i><?=_('Map')?></h1>
|
||||
<div id="map" class="map" style="background-image:url('<?=$linker->link(array('grafics','paper.jpg'))?>')"></div>
|
||||
<script type="text/javascript">
|
||||
var extent = [0, 0, <?=$map['width']?>, <?=$map['height']?>];
|
||||
var projection = new ol.proj.Projection({
|
||||
code: 'pixel',
|
||||
units: 'pixels',
|
||||
extent: extent
|
||||
});
|
||||
var map;
|
||||
$(document).ready(function() {
|
||||
map = new ol.Map({
|
||||
target: 'map',
|
||||
layers: [
|
||||
new ol.layer.Image({
|
||||
source: new ol.source.ImageStatic({
|
||||
url: '<?=$linker->link(array('media','seminarymap',$seminary['url']))?>',
|
||||
projection: projection,
|
||||
imageExtent: extent
|
||||
})
|
||||
})
|
||||
],
|
||||
controls: ol.control.defaults().extend([
|
||||
new ol.control.OverviewMap({
|
||||
collapsed: true,
|
||||
})
|
||||
]),
|
||||
view: new ol.View({
|
||||
projection: projection,
|
||||
center: ol.extent.getCenter(extent),
|
||||
zoom: 1,
|
||||
extent: extent
|
||||
}),
|
||||
});
|
||||
});
|
||||
</script>
|
||||
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 ?>
|
||||
77
views/html/questgroups/create.tpl
Normal file
77
views/html/questgroups/create.tpl
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<?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><?=_('Questgroups')?></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Create Questgroup')?></h1>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'moodpic':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during moodpic upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Moodpic has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Moodpic exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Moodpic 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;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" class="logreg" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Context')?></legend>
|
||||
<?=_('Questgroupshierarchy')?>: <?=$questgroupshierarchy['title_singular']?><br />
|
||||
<input type="hidden" name="questgroupshierarchy" value="<?=$questgroupshierarchy['url']?>" />
|
||||
<?php if(!is_null($questgroup)) : ?>
|
||||
<?=_('Questgroup')?>: <?=$questgroup['title']?>
|
||||
<input type="hidden" name="questgroup" value="<?=$questgroup['url']?>" />
|
||||
<?php endif ?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?=_('Moodpic')?></legend>
|
||||
<input type="file" name="moodpic" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" />
|
||||
<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" name="title" placeholder="<?=_('Title')?>" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$title?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
19
views/html/questgroups/delete.tpl
Normal file
19
views/html/questgroups/delete.tpl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?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 ?>
|
||||
|
||||
<h1><?=_('Delete Questgroup')?></h1>
|
||||
<?=sprintf(_('Should the Questgroup “%s” really be deleted?'), $questgroup['title'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
65
views/html/questgroups/edit.tpl
Normal file
65
views/html/questgroups/edit.tpl
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<?php if(!is_null($picture)) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$picture['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?=$questgroupshierarchypath?>
|
||||
|
||||
<h1><?=_('Edit Questgroup')?></h1>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'moodpic':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during moodpic upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Moodpic has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Moodpic exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Moodpic 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;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" class="logreg" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Moodpic')?></legend>
|
||||
<input type="file" name="moodpic" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" />
|
||||
<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" name="title" placeholder="<?=_('Title')?>" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$title?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
</form>
|
||||
25
views/html/questgroups/edittexts.tpl
Normal file
25
views/html/questgroups/edittexts.tpl
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php if(!is_null($picture)) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$picture['url']))?>" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?=$questgroupshierarchypath?>
|
||||
|
||||
<h1><?=_('Edit Questgroup texts')?></h1>
|
||||
<form method="post">
|
||||
<fieldset>
|
||||
<ul class="admnql">
|
||||
<?php foreach($questgrouptexts as &$text) : ?>
|
||||
<li class="cf">
|
||||
<textarea name="questgrouptexts[<?=$text['id']?>]"><?=$text['text']?></textarea><br />
|
||||
<input id="deletes[<?=$text['id']?>]" type="checkbox" name="deletes[<?=$text['id']?>]" />
|
||||
<label for="deletes[<?=$text['id']?>]"><?=_('delete')?></label>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<li class="cf">
|
||||
<textarea name="questgrouptexts[]" placeholder="<?=_('New Questgroup text')?>"></textarea>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
</form>
|
||||
19
views/html/questgroups/movedown.tpl
Normal file
19
views/html/questgroups/movedown.tpl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?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 ?>
|
||||
|
||||
<h1><?=_('Move Questgroup')?></h1>
|
||||
<?=sprintf(_('Should the Questgroup “%s” really be moved?'), $questgroup['title'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="move" value="<?=_('move')?>" />
|
||||
<input type="submit" name="not-move" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
19
views/html/questgroups/moveup.tpl
Normal file
19
views/html/questgroups/moveup.tpl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?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 ?>
|
||||
|
||||
<h1><?=_('Move Questgroup')?></h1>
|
||||
<?=sprintf(_('Should the Questgroup “%s” really be moved?'), $questgroup['title'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="move" value="<?=_('move')?>" />
|
||||
<input type="submit" name="not-move" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
123
views/html/questgroups/questgroup.tpl
Normal file
123
views/html/questgroups/questgroup.tpl
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
<?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(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('edit',$seminary['url'],$questgroup['url']),1)?>"><?=_('Edit Questgroup')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('edittexts',$seminary['url'],$questgroup['url']),1)?>"><?=_('Edit Questgroup texts')?></a></li>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<li><a href="<?=$linker->link(array('delete',$seminary['url'],$questgroup['url']),1)?>"><?=_('Delete Questgroup')?></a></li>
|
||||
<?php endif ?>
|
||||
</nav>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('quests','create',$seminary['url'],$questgroup['url']))?>"><?=_('Create new Quest')?></a></li>
|
||||
</nav>
|
||||
<?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 $hierarchyIndex => &$hierarchy) : ?>
|
||||
<?php if(count($hierarchy['questgroups']) > 0 || count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<h3><?=$hierarchy['title_plural']?></h3>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('questgroupshierarchy','edit',$seminary['url'],$hierarchy['url']))?>"><?=_('Edit Questgroupshierarchy')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('questgroupshierarchy','delete',$seminary['url'],$hierarchy['url']))?>"><?=_('Delete Questgroupshierarchy')?></a></li>
|
||||
<?php if($hierarchyIndex > 0) : ?><li><a href="<?=$linker->link(array('questgroupshierarchy','moveup',$seminary['url'],$hierarchy['url']),0,true,array('referer'=>$questgroup['id']))?>">↑</a></li><?php endif ?>
|
||||
<?php if($hierarchyIndex < count($childquestgroupshierarchy)-1) : ?><li><a href="<?=$linker->link(array('questgroupshierarchy','movedown',$seminary['url'],$hierarchy['url']),0,true,array('referer'=>$questgroup['id']))?>">↓</a></li><?php endif ?>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<ul class="qg">
|
||||
<?php foreach($hierarchy['questgroups'] as $questgroupIndex => &$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="qgorder">
|
||||
<?php if($questgroupIndex > 0) : ?><a href="<?=$linker->link(array('questgroups','moveup',$seminary['url'],$group['url']),0,true,array('referer'=>$questgroup['id']))?>">↑</a><?php endif ?>
|
||||
<?php if($questgroupIndex < count($hierarchy['questgroups'])-1) : ?><a href="<?=$linker->link(array('questgroups','movedown',$seminary['url'],$group['url']),0,true,array('referer'=>$questgroup['id']))?>">↓</a><?php endif ?>
|
||||
</div>
|
||||
<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:<?=($group['achievable_xps'] > 0) ? round($group['character_xps']/$group['achievable_xps']*100) : 0?>%"></span>
|
||||
</div>
|
||||
<p class="xpnumeric"><?=$group['character_xps']?> / <?=$group['achievable_xps']?> <?=_('XPs')?></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 ?>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<li class="cf">
|
||||
<span class="qgicon">
|
||||
<i class="fa fa-square-o"></i>
|
||||
</span>
|
||||
<form method="post" action="<?=$linker->link(array('questgroups','create',$seminary['url']))?>" enctype="multipart/form-data">
|
||||
<input type="hidden" name="questgroupshierarchy" value="<?=$hierarchy['url']?>" />
|
||||
<input type="hidden" name="questgroup" value="<?=$questgroup['url']?>" />
|
||||
<input type="file" name="moodpic" /><br />
|
||||
<?=$hierarchy['title_singular']?> <?=count($hierarchy['questgroups'])+1?>:
|
||||
<input type="text" name="title" value="" placeholder="<?=_('Title')?>" /><br />
|
||||
<input type="submit" name="create" value="<?=_('Add new Questgroup')?>" />
|
||||
</form>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<form method="post" action="<?=$linker->link(array('questgroupshierarchy','create',$seminary['url']))?>">
|
||||
<h2><?=_('New Questgroupshierarchy')?></h2>
|
||||
<?=_('Title (singular)')?>: <input type="text" name="title_singular" placeholder="<?=_('Title (singular)')?>" />
|
||||
<?=_('Title (plural)')?>: <input type="text" name="title_plural" placeholder="<?=_('Title (plural)')?>" />
|
||||
<input type="hidden" name="parent" value="<?=$questgroup['hierarchy']['url']?>" />
|
||||
<input type="submit" name="create" value="<?=_('Add new Questgroupshierarchy')?>" />
|
||||
</form>
|
||||
<?php endif ?>
|
||||
<?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 ?>
|
||||
64
views/html/questgroupshierarchy/create.tpl
Normal file
64
views/html/questgroupshierarchy/create.tpl
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<?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><?=_('Questgroupshierarchy')?></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Create Questgroupshierarchy')?></h1>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'titleSingular':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title (singular) is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title (singular) is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'exist': echo _('Title (singular) already exists');
|
||||
break;
|
||||
default: echo _('Title (singular) invalid');
|
||||
}
|
||||
break;
|
||||
case 'titlePlural':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title (plural) is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title (plural) is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'exist': echo _('Title (plural) already exists');
|
||||
break;
|
||||
default: echo _('Title (plural) invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" class="logreg">
|
||||
<fieldset>
|
||||
<label for="title_singular"><?=_('Title (singular)')?>:</label>
|
||||
<input type="text" name="title_singular" placeholder="<?=_('Title (singular)')?>" value="<?=$titleSingular?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" <?=(array_key_exists('titleSingular', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="title_plural"><?=_('Title (plural)')?>:</label>
|
||||
<input type="text" name="title_plural" placeholder="<?=_('Title (plural)')?>" value="<?=$titlePlural?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" <?=(array_key_exists('titlePlural', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<select name="parent">
|
||||
<option value="null"><?=$seminary['title']?></option>
|
||||
<?php foreach($parentQuestgroupshierarchy as &$hierarchy) : ?>
|
||||
<option value="<?=$hierarchy['url']?>" <?php if(array_key_exists('selected', $hierarchy) && $hierarchy['selected']) : ?>selected="selected"<?php endif ?>><?=$hierarchy['title_singular']?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
16
views/html/questgroupshierarchy/delete.tpl
Normal file
16
views/html/questgroupshierarchy/delete.tpl
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?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><?=_('Questgroupshierarchy')?></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Delete Questgroupshierarchy')?></h1>
|
||||
<?=sprintf(_('Should the Questgroupshierarchy “%s” really be deleted?'), $questgroupshierarchy['title_singular'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
58
views/html/questgroupshierarchy/edit.tpl
Normal file
58
views/html/questgroupshierarchy/edit.tpl
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<?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><?=_('Questgroupshierarchy')?></li>
|
||||
</ul>
|
||||
|
||||
<h1><?=_('Edit Questgroupshierarchy')?></h1>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'titleSingular':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title (singular) is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title (singular) is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'exist': echo _('Title (singular) already exists');
|
||||
break;
|
||||
default: echo _('Title (singular) invalid');
|
||||
}
|
||||
break;
|
||||
case 'titlePlural':
|
||||
switch($setting) {
|
||||
case 'minlength': printf(_('Title (plural) is too short (min. %d chars)'), $value);
|
||||
break;
|
||||
case 'maxlength': printf(_('Title (plural) is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
case 'exist': echo _('Title (plural) already exists');
|
||||
break;
|
||||
default: echo _('Title (plural) invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" class="logreg">
|
||||
<fieldset>
|
||||
<label for="title_singular"><?=_('Title (singular)')?>:</label>
|
||||
<input type="text" name="title_singular" placeholder="<?=_('Title (singular)')?>" value="<?=$titleSingular?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" <?=(array_key_exists('titleSingular', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="title_plural"><?=_('Title (plural)')?>:</label>
|
||||
<input type="text" name="title_plural" placeholder="<?=_('Title (plural)')?>" value="<?=$titlePlural?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" <?=(array_key_exists('titlePlural', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
</form>
|
||||
0
views/html/questgroupshierarchy/movedown.tpl
Normal file
0
views/html/questgroupshierarchy/movedown.tpl
Normal file
0
views/html/questgroupshierarchy/moveup.tpl
Normal file
0
views/html/questgroupshierarchy/moveup.tpl
Normal file
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>
|
||||
109
views/html/quests/create.tpl
Normal file
109
views/html/quests/create.tpl
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
<?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><?=_('Create Quest')?></h1>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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 picture upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Picture has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Picture exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Picture 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" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Picture')?></legend>
|
||||
<input type="file" name="media" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" />
|
||||
<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 id="title" type="text" name="title" value="<?=$title?>" placeholder="<?=_('Title')?>" maxlength="<?=$validationSettings['title']['maxlength']?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="xps"><?=_('XPs')?>:</label>
|
||||
<input id="xps" type="number" 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?> /><br />
|
||||
<label for="questtype"><?=('Questtype')?>:</label>
|
||||
<select id="questtype" name="questtype">
|
||||
<?php foreach($questtypes as &$questtype) : ?>
|
||||
<option value="<?=$questtype['url']?>" <?php if($questtype['selected']) : ?>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>
|
||||
<fieldset>
|
||||
<label for="entrytext"><?=('Entry text')?>:</label><br />
|
||||
<textarea name="entrytext" placeholder="<?=_('Entry text')?>" style="width:100%; height:10em;"><?=$entryText?></textarea><br />
|
||||
<label for="task"><?=_('Task')?>:</label><br />
|
||||
<textarea name="task" placeholder="<?=('Task')?>" style="width:100%; height:10em;"><?=$task?></textarea><br />
|
||||
<label for="wrongtext"><?=('Wrong text')?>:</label><br />
|
||||
<textarea name="wrongtext" placeholder="<?=_('Wrong text')?>" style="width:100%; height:10em;"><?=$wrongText?></textarea><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="create" value="<?=_('create')?>" />
|
||||
</form>
|
||||
13
views/html/quests/delete.tpl
Normal file
13
views/html/quests/delete.tpl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php if(!is_null($seminary['seminarymedia_id'])) : ?>
|
||||
<div class="moodpic">
|
||||
<img src="<?=$linker->link(array('media','seminarymoodpic',$seminary['url']))?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?=$questgroupshierarchypath?>
|
||||
|
||||
<h1><?=_('Delete Quest')?></h1>
|
||||
<?=sprintf(_('Should the Quest “%s” really be deleted?'), $quest['title'])?>
|
||||
<form method="post">
|
||||
<input type="submit" name="delete" value="<?=_('delete')?>" />
|
||||
<input type="submit" name="not-delete" value="<?=_('cancel')?>" />
|
||||
</form>
|
||||
115
views/html/quests/edit.tpl
Normal file
115
views/html/quests/edit.tpl
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
<?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><?=_('Edit Quest')?></h1>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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 picture upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Picture has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Picture exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Picture 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" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<?php if(!is_null($media)) : ?>
|
||||
<a href="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>"><img style="width:10em; display:block;" src="<?=$linker->link(array('media','seminary',$seminary['url'],$media['url']))?>" /></a>
|
||||
<?php endif ?>
|
||||
<legend><?=_('Picture')?></legend>
|
||||
<input type="file" name="media" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" />
|
||||
<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 id="title" type="text" name="title" value="<?=$title?>" placeholder="<?=_('Title')?>" maxlength="<?=$validationSettings['title']['maxlength']?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="xps"><?=_('XPs')?>:</label>
|
||||
<input id="xps" type="number" 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?> /><br />
|
||||
<label for="questtype"><?=('Questtype')?>:</label>
|
||||
<select id="questtype" name="questtype">
|
||||
<?php foreach($questtypes as &$questtype) : ?>
|
||||
<option value="<?=$questtype['url']?>" <?php if($questtype['selected']) : ?>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>
|
||||
<fieldset>
|
||||
<label for="entrytext"><?=('Entry text')?>:</label><br />
|
||||
<textarea name="entrytext" placeholder="<?=_('Entry text')?>" style="width:100%; height:10em;"><?=$entryText?></textarea><br />
|
||||
<label for="task"><?=_('Task')?>:</label><br />
|
||||
<textarea name="task" placeholder="<?=('Task')?>" style="width:100%; height:10em;"><?=$task?></textarea><br />
|
||||
<label for="wrongtext"><?=('Wrong text')?>:</label><br />
|
||||
<textarea name="wrongtext" placeholder="<?=_('Wrong text')?>" style="width:100%; height:10em;"><?=$wrongText?></textarea><br />
|
||||
</fieldset>
|
||||
<?php if(!is_null($quest['type']['classname'])) : ?>
|
||||
<input type="submit" name="edit-task" value="<?=_('edit task')?>" />
|
||||
<?php endif ?>
|
||||
<input type="submit" name="edit" value="<?=_('save')?>" />
|
||||
</form>
|
||||
11
views/html/quests/edittask.tpl
Normal file
11
views/html/quests/edittask.tpl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?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><?=_('Edit Quest task')?></h1>
|
||||
<?php if(!is_null($task)) : ?>
|
||||
<?=$task?>
|
||||
<?php endif ?>
|
||||
64
views/html/quests/edittexts.tpl
Normal file
64
views/html/quests/edittexts.tpl
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<?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><?=_('Edit Quest texts')?></h1>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<?php foreach($questtexttypes as &$type) : ?>
|
||||
<fieldset>
|
||||
<legend><?=$type['type']?></legend>
|
||||
<?php if(array_key_exists($type['url'], $validations)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validations[$type['url']] as $textId => &$validation) : ?>
|
||||
<?php if($validation !== true) : ?>
|
||||
<?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 picture upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Picture has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Picture exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Picture invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<ul class="admnql">
|
||||
<?php foreach($type['texts'] as &$text) : ?>
|
||||
<li class="cf">
|
||||
<?php if(array_key_exists('media', $text)) : ?>
|
||||
<a href="<?=$linker->link(array('media','seminary',$seminary['url'],$text['media']['url']))?>"><img src="<?=$linker->link(array('media','seminary',$seminary['url'],$text['media']['url']))?>" /></a><br />
|
||||
<?php endif ?>
|
||||
<input type="file" name="media[<?=$type['url']?>][<?=$text['id']?>]" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" /><br />
|
||||
<textarea name="questtexts[<?=$type['url']?>][<?=$text['id']?>]"><?=$text['text']?></textarea><br />
|
||||
<input id="deletes[<?=$type['url']?>][<?=$text['id']?>]" type="checkbox" name="deletes[<?=$type['url']?>][<?=$text['id']?>]" />
|
||||
<label for="deletes[<?=$type['url']?>][<?=$text['id']?>]"><?=_('delete')?></label>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<li class="cf">
|
||||
<input type="file" name="media[<?=$type['url']?>][new]" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" /><br />
|
||||
<textarea name="questtexts[<?=$type['url']?>][new]" placeholder="<?=_('New Questgroup text')?>"></textarea>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<?php endforeach ?>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
</form>
|
||||
135
views/html/quests/index.tpl
Normal file
135
views/html/quests/index.tpl
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
<?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><?=_('Filters')?></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>
|
||||
<label for="title"><?=_('Title')?>:</label>
|
||||
<input type="text" id="title" name="title" placeholder="<?=_('Title')?>" value="<?=$selectedTitle?>" />
|
||||
</fieldset>
|
||||
<input type="submit" value="<?=_('Apply filters')?>" />
|
||||
</form>
|
||||
|
||||
<ul id="questlist" 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($all) && ($page*$limit) < $questsCount) : ?>
|
||||
<nav class="admin">
|
||||
<li><a id="show-more" href="<?=$linker->link(null,3,true,array('page'=>$page+1,'questgroup'=>$selectedQuestgroup,'questtype'=>$selectedQuesttype,'title'=>$selectedTitle))?>"><?=_('Show more')?></a></li>
|
||||
<li><a id="show-all" href="<?=$linker->link('all',3,true,array('questgroup'=>$selectedQuestgroup,'questtype'=>$selectedQuesttype,'title'=>$selectedTitle))?>"><?=_('Show all')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
||||
<script>
|
||||
var page = 1;
|
||||
var request;
|
||||
var linkSubmissions = "<?=$linker->link(array('submissions','SEMINARY','QUESTGROUP','QUEST'),1)?>";
|
||||
var linkQuestgroup = "<?=$linker->link(array('questgroups','questgroup','SEMINARY','QUESTGROUP'))?>";
|
||||
var linkQuest = "<?=$linker->link(array('quest','SEMINARY','QUESTGROUP','QUEST'),1)?>";
|
||||
var linkPage = "<?=$linker->link(null,3,true,array('page'=>'PAGE','questgroup'=>$selectedQuestgroup,'questtype'=>$selectedQuesttype,'title'=>$selectedTitle))?>";
|
||||
|
||||
$("#show-more").click(function(event) {
|
||||
if(request) {
|
||||
request.abort();
|
||||
}
|
||||
|
||||
page++;
|
||||
request = $.getJSON(linkPage.replace('PAGE', page), function(data) {
|
||||
linkSubmissions = linkSubmissions.replace('SEMINARY', data['seminary']['url']);
|
||||
linkQuestgroup = linkQuestgroup.replace('SEMINARY', data['seminary']['url']);
|
||||
linkQuest = linkQuest.replace('SEMINARY', data['seminary']['url']);
|
||||
$.each(data['quests'], function(key, val) {
|
||||
var urlSubmissions = linkSubmissions.replace('QUESTGROUP', val['questgroup_url']).replace('QUEST', val['url']);
|
||||
var urlQuestgroup = linkQuestgroup.replace('QUESTGROUP', val['questgroup_url']);
|
||||
var urlQuest = linkQuest.replace('QUESTGROUP', val['questgroup_url']).replace('QUEST', val['url']);
|
||||
$("#questlist").append(
|
||||
"<li>" +
|
||||
"<p class=\"fwb\"><a href=\"" + urlQuest + "\">" + val['title'] + "</a><span><a href=\"" + urlSubmissions + "\">" + val['opensubmissionscount'] + " <?=_('open submissions')?></a></span></p>" +
|
||||
"<p><small>" + val['questtype']['title'] + ", " + val['xps'] + "</small></p>" +
|
||||
"<p><small><a href=\"" + urlQuestgroup + "\">" + val['questgroup_title'] + "</a></small></p>" +
|
||||
"</li>"
|
||||
);
|
||||
|
||||
|
||||
});
|
||||
if(data['more']) {
|
||||
$("#show-more").attr('href', linkPage.replace('PAGE', page+1));
|
||||
}
|
||||
else {
|
||||
$("#show-more").remove();
|
||||
$("#show-all").remove();
|
||||
}
|
||||
});
|
||||
request.fail(function (jqXHR, textStatus, errorThrown) {
|
||||
window.location.href = linkPage.replace('PAGE', page);
|
||||
});
|
||||
|
||||
|
||||
event.preventDefault();
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
150
views/html/quests/quest.tpl
Normal file
150
views/html/quests/quest.tpl
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
<?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(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link('edit', 5)?>"><?=_('Edit Quest')?></a></li>
|
||||
<li><a href="<?=$linker->link('edittexts', 5)?>"><?=_('Edit Quest texts')?></a></li>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<li><a href="<?=$linker->link('delete', 5)?>"><?=_('Delete Quest')?></a></li>
|
||||
<?php endif ?>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<?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'],$questtext['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 <?php if(count($nextquests) == 0 && is_null($nextquestgroup)) : ?>class="gameover"<?php endif ?>>
|
||||
<?php if(count($nextquests) == 0 && is_null($nextquestgroup)) : ?>
|
||||
<h1><?=_('Game over')?></h1>
|
||||
<?php else : ?>
|
||||
<h1 id="questtext"><?=_('Epilog')?></h1>
|
||||
<?php endif ?>
|
||||
<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'],$questtext['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 ?>
|
||||
|
||||
<section>
|
||||
<?php if(count($nextquests) > 0 || !is_null($nextquestgroup)) : ?>
|
||||
<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 ?>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
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
116
views/html/seminaries/copy.tpl
Normal file
116
views/html/seminaries/copy.tpl
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
<?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><?=_('Copy seminary')?></h1>
|
||||
<?php if(!is_null($exception)) : ?>
|
||||
<p class="error">
|
||||
<?php if($exception instanceof \hhu\z\exceptions\FileCopyException) : ?>
|
||||
<?=sprintf(_('Copying of files failed: “%s”'), $exception->getNestedError()['message'])?>
|
||||
<?php elseif($exception instanceof \Exception) : ?>
|
||||
<?=sprintf(_('Copying of Seminary failed: “%s”'), $exception->getMessage())?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'moodpic':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during moodpic upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Moodpic has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Moodpic exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Moodpic 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 'course':
|
||||
switch($setting) {
|
||||
case 'maxlength': printf(_('Course is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
default: echo _('Course invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" class="logreg" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<label for="title"><?=_('Title')?>:</label>
|
||||
<input type="text" id="title" name="title" placeholder="<?=_('Title')?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$title?>" <?=($validation !== true && array_key_exists('title', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="course"><?=_('Course')?>:</label>
|
||||
<input type="text" id="course" name="course" placeholder="<?=_('Course')?>" maxlength="<?=$validationSettings['course']['maxlength']?>" value="<?=$course?>" <?=($validation !== true && array_key_exists('course', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="description"><?=_('Description')?>:<br />
|
||||
<textarea id="description" name="description" placeholder="<?=_('Description')?>"><?=$description?></textarea><br />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?=_('Elements')?></legend>
|
||||
<input type="checkbox" id="elements_seminaryfields" name="elements[seminaryfields]" <?php if(array_key_exists('seminaryfields', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_seminaryfields"><?=_('Seminary fields')?></label>
|
||||
<input type="checkbox" id="elements_media" name="elements[media]" <?php if(array_key_exists('media', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_media"><?=_('Media')?></label>
|
||||
<input type="checkbox" id="elements_questgroupshierarchy" name="elements[questgroupshierarchy]" <?php if(array_key_exists('questgroupshierarchy', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_questgroupshierarchy"><?=_('Questgroupshierarchy')?></label>
|
||||
<div class="cond">
|
||||
<input type="checkbox" id="elements_questgroups" name="elements[questgroups]" <?php if(array_key_exists('questgroups', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_questgroups"><?=_('Questgroups')?></label>
|
||||
<div class="cond">
|
||||
<input type="checkbox" id="elements_quests" name="elements[quests]" <?php if(array_key_exists('quests', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_quests"><?=_('Quests')?></label>
|
||||
<div class="cond">
|
||||
<input type="checkbox" id="elements_questtopics" name="elements[questtopics]" <?php if(array_key_exists('questtopics', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_questtopics"><?=_('Library')?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="checkbox" id="elements_charactertypes" name="elements[charactertypes]" <?php if(array_key_exists('charactertypes', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_charactertypes"><?=_('Charactertypes')?></label>
|
||||
<div class="cond">
|
||||
<input type="checkbox" id="elements_xplevels" name="elements[xplevels]" <?php if(array_key_exists('xplevels', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_xplevels"><?=_('XP-Levels')?></label>
|
||||
<div class="cond">
|
||||
<input type="checkbox" id="elements_avatars" name="elements[avatars]" <?php if(array_key_exists('avatars', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_avatars"><?=_('Avatars')?></label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="checkbox" id="elements_achievements" name="elements[achievements]" <?php if(array_key_exists('achievements', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_achievements"><?=_('Achievements')?></label>
|
||||
<input type="checkbox" id="elements_charactergroupsgroups" name="elements[charactergroupsgroups]" <?php if(array_key_exists('charactergroupsgroups', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_charactergroupsgroups"><?=_('Character Groups')?></label>
|
||||
<div class="cond">
|
||||
<input type="checkbox" id="elements_charactergroupsquests" name="elements[charactergroupsquests]" <?php if(array_key_exists('charactergroupsquests', $elements)) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="elements_charactergroupsquests"><?=_('Character Groups Quests')?></label>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('copy')?>" />
|
||||
</form>
|
||||
76
views/html/seminaries/create.tpl
Normal file
76
views/html/seminaries/create.tpl
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<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>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'moodpic':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during moodpic upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Moodpic has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Moodpic exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Moodpic 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 'course':
|
||||
switch($setting) {
|
||||
case 'maxlength': printf(_('Course is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
default: echo _('Course invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" class="logreg" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Moodpic')?></legend>
|
||||
<input type="file" name="moodpic" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" />
|
||||
<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" name="title" placeholder="<?=_('Title')?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$title?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="course"><?=_('Course')?>:</label>
|
||||
<input type="text" name="course" placeholder="<?=_('Course')?>" maxlength="<?=$validationSettings['course']['maxlength']?>" value="<?=$course?>" <?=(array_key_exists('course', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="description"><?=_('Description')?>:<br />
|
||||
<textarea name="description" placeholder="<?=_('Description')?>"><?=$description?></textarea><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>
|
||||
78
views/html/seminaries/edit.tpl
Normal file
78
views/html/seminaries/edit.tpl
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<?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>
|
||||
<?php if($validation !== true && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?php foreach($validation as $field => &$settings) : ?>
|
||||
<li>
|
||||
<ul>
|
||||
<?php foreach($settings as $setting => $value) : ?>
|
||||
<li>
|
||||
<?php switch($field) {
|
||||
case 'moodpic':
|
||||
switch($setting) {
|
||||
case 'error': printf(_('Error during moodpic upload: %s'), $value);
|
||||
break;
|
||||
case 'mimetype': printf(_('Moodpic has wrong type “%s”'), $value);
|
||||
break;
|
||||
case 'size': echo _('Moodpic exceeds size maximum');
|
||||
break;
|
||||
default: echo _('Moodpic 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 'course':
|
||||
switch($setting) {
|
||||
case 'maxlength': printf(_('Course is too long (max. %d chars)'), $value);
|
||||
break;
|
||||
default: echo _('Course invalid');
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<form method="post" class="logreg" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Moodpic')?></legend>
|
||||
<input type="file" name="moodpic" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" />
|
||||
<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" name="title" placeholder="<?=_('Title')?>" required="required" maxlength="<?=$validationSettings['title']['maxlength']?>" value="<?=$title?>" <?=(array_key_exists('title', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="course"><?=_('Course')?>:</label>
|
||||
<input type="text" name="course" placeholder="<?=_('Course')?>" maxlength="<?=$validationSettings['course']['maxlength']?>" value="<?=$course?>" <?=(array_key_exists('course', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<label for="description"><?=_('Description')?>:<br />
|
||||
<textarea name="description" placeholder="<?=_('Description')?>"><?=$description?></textarea><br />
|
||||
</fieldset>
|
||||
<input type="submit" name="edit" value="<?=_('edit')?>" />
|
||||
</form>
|
||||
53
views/html/seminaries/index.tpl
Normal file
53
views/html/seminaries/index.tpl
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<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:<?=($seminary['xps'] > 0) ? round($seminary['usercharacter']['xps'] * 100 / $seminary['xps']) : 0?>%"></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)) : ?>
|
||||
<?php if($seminary['created_user_id'] == \hhu\z\controllers\IntermediateController::$user['id']) : ?>
|
||||
<a class="cta orange" href="<?=$linker->link(array('xplevels','manage',$seminary['url']))?>"><?=_('Manage XP-levels')?></a>
|
||||
<?php if(count($seminary['xplevels']) > 0) : ?>
|
||||
<a class="cta orange" href="<?=$linker->link(array('charactertypes','index',$seminary['url']))?>"><?=_('Manage Charactertypes')?></a>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if(count($seminary['charactertypes']) > 0) : ?>
|
||||
<a class="cta orange" href="<?=$linker->link(array('characters','register',$seminary['url']))?>"><?=_('Create a Character')?></a>
|
||||
<?php endif ?>
|
||||
<?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>
|
||||
84
views/html/seminaries/seminary.tpl
Normal file
84
views/html/seminaries/seminary.tpl
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<?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) : ?>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link('edit', 3)?>"><?=_('Edit seminary')?></a></li>
|
||||
<li><a href="<?=$linker->link('copy', 3)?>"><?=_('Copy seminary')?></a></li>
|
||||
<li><a href="<?=$linker->link('delete', 3)?>"><?=_('Delete seminary')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('quests','index',$seminary['url']))?>"><?=_('Show Quests')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('calculatexps',$seminary['url']),1)?>"><?=_('Recalculate XPs')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<p><?=\hhu\z\Utils::t($seminary['description'])?></p>
|
||||
<?php foreach($questgroupshierarchy as $hierarchyIndex => &$hierarchy) : ?>
|
||||
<h2 id="<?=$hierarchy['url']?>"><?=$hierarchy['title_plural']?></h2>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('questgroupshierarchy','edit',$seminary['url'],$hierarchy['url']))?>"><?=_('Edit Questgroupshierarchy')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('questgroupshierarchy','delete',$seminary['url'],$hierarchy['url']))?>"><?=_('Delete Questgroupshierarchy')?></a></li>
|
||||
<?php if($hierarchyIndex > 0) : ?><li><a href="<?=$linker->link(array('questgroupshierarchy','moveup',$seminary['url'],$hierarchy['url']))?>">↑</a></li><?php endif ?>
|
||||
<?php if($hierarchyIndex < count($questgroupshierarchy)-1) : ?><li><a href="<?=$linker->link(array('questgroupshierarchy','movedown',$seminary['url'],$hierarchy['url']))?>">↓</a></li><?php endif ?>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<ul class="questgroups cf">
|
||||
<?php foreach($hierarchy['questgroups'] as $questgroupIndex => &$group) : ?>
|
||||
<li>
|
||||
<?php if(!is_null($group['picture'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$group['picture']['url']))?>">
|
||||
<?php endif ?>
|
||||
<section>
|
||||
<div class="qgorder">
|
||||
<?php if($questgroupIndex > 0) : ?><a href="<?=$linker->link(array('questgroups','moveup',$seminary['url'],$group['url']))?>">↑</a><?php endif ?>
|
||||
<?php if($questgroupIndex < count($hierarchy['questgroups'])-1) : ?><a href="<?=$linker->link(array('questgroups','movedown',$seminary['url'],$group['url']))?>">↓</a><?php endif ?>
|
||||
</div>
|
||||
<div>
|
||||
<p class="fwb"><?=$hierarchy['title_singular']?> <?=$group['pos']?>:
|
||||
<a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$group['url']))?>"><?=$group['title']?></a></p>
|
||||
</div>
|
||||
<div class="cf">
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=($group['achievable_xps'] > 0) ? round($group['character_xps']*100/$group['achievable_xps']) : 0?>%"></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>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<li>
|
||||
<section>
|
||||
<form method="post" action="<?=$linker->link(array('questgroups','create',$seminary['url']))?>" enctype="multipart/form-data">
|
||||
<input type="hidden" name="questgroupshierarchy" value="<?=$hierarchy['url']?>" />
|
||||
<input type="file" name="moodpic" />
|
||||
<?=$hierarchy['title_singular']?> <?=count($hierarchy['questgroups'])+1?>:
|
||||
<input type="text" name="title" value="" placeholder="<?=_('Title')?>" />
|
||||
<input type="submit" name="create" value="<?=_('Add new Questgroup')?>" />
|
||||
</form>
|
||||
</section>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?>
|
||||
<form method="post" action="<?=$linker->link(array('questgroupshierarchy','create',$seminary['url']))?>">
|
||||
<h2><?=_('New Questgroupshierarchy')?></h2>
|
||||
<?=_('Title (singular)')?>: <input type="text" name="title_singular" placeholder="<?=_('Title (singular)')?>" />
|
||||
<?=_('Title (plural)')?>: <input type="text" name="title_plural" placeholder="<?=_('Title (plural)')?>" />
|
||||
<input type="submit" name="create" value="<?=_('Add new Questgroupshierarchy')?>" />
|
||||
</form>
|
||||
<?php endif ?>
|
||||
60
views/html/seminarybar/index.tpl
Normal file
60
views/html/seminarybar/index.tpl
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?php if($render) : ?>
|
||||
<section class="cf">
|
||||
<h1><?=$character['name']?></h1>
|
||||
<?php if(array_key_exists('avatar', $character) && !is_null($character['avatar']['avatarpicture_id'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level']))?>" class="char">
|
||||
<?php endif ?>
|
||||
<ul class="charstats">
|
||||
<?php if(!is_null($character['xplevel'])) : ?>
|
||||
<li><i class="fa fa-caret-right fa-fw"></i><?=('Level')?> <?=$character['xplevel']['level']?></li>
|
||||
<?php endif ?>
|
||||
<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>
|
||||
<?php if(array_key_exists('xplevel', $member) && !is_null($member['xplevel'])) : ?>
|
||||
<?=_('Level')?> <?=$member['xplevel']?> (<?=sprintf(_('%d XPs'), $member['xps'])?>)
|
||||
<?php else : ?>
|
||||
<?=sprintf(_('%d XPs'), $member['xps'])?>
|
||||
<?php endif ?>
|
||||
</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 ?>
|
||||
10
views/html/seminarymenu/index.tpl
Normal file
10
views/html/seminarymenu/index.tpl
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?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>
|
||||
<li><a href="<?=$linker->link(array('map','index',$loggedSeminary['url']))?>"><i class="fa fa-map-marker fa-fw"></i><?=_('Map')?></a></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
15
views/html/userroles/user.tpl
Normal file
15
views/html/userroles/user.tpl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<ul>
|
||||
<?php foreach($roles as &$role) : ?>
|
||||
<li>
|
||||
<?php switch($role['name']) {
|
||||
case 'admin': echo _('Admin');
|
||||
break;
|
||||
case 'moderator': echo _('Moderator');
|
||||
break;
|
||||
case 'user': echo _('User');
|
||||
break;
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
101
views/html/users/create.tpl
Normal file
101
views/html/users/create.tpl
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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;
|
||||
case 'repeat': printf(_('Passwords does not match'));
|
||||
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 />
|
||||
<label for="passwordrepeat"><?=_('Repeat password')?>:</label>
|
||||
<input name="passwordrepeat" 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>
|
||||
110
views/html/users/edit.tpl
Normal file
110
views/html/users/edit.tpl
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<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 && !empty($validation)) : ?>
|
||||
<ul class="validation">
|
||||
<?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;
|
||||
case 'repeat': printf(_('Passwords does not match'));
|
||||
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 />
|
||||
<label for="passwordrepeat"><?=_('Repeat password')?>:</label>
|
||||
<input name="passwordrepeat" type="password" placeholder="<?=_('Password')?>" title="<?=_('Password')?>" required="required" maxlength="<?=$validationSettings['password']['maxlength']?>" <?=(array_key_exists('password', $validation)) ? 'class="invalid"' : null?> /><br />
|
||||
<input id="mailing" type="checkbox" name="mailing" <?php if($mailing) : ?>checked="checked"<?php endif ?> />
|
||||
<label for="mailing"><?=_('Mail notifications')?></label>
|
||||
</fieldset>
|
||||
<input type="submit" name="save" value="<?=_('save')?>" />
|
||||
</form>
|
||||
95
views/html/users/index.tpl
Normal file
95
views/html/users/index.tpl
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<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>
|
||||
|
||||
<form method="get" class="logreg admnqf">
|
||||
<fieldset>
|
||||
<legend><?=_('Filters')?></legend>
|
||||
<small><?=_('Sortorder')?>:</small>
|
||||
<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="created" <?php if($sortorder == 'created') : ?>selected="selected"<?php endif ?>><?=_('Date of registration')?></option>
|
||||
</select>
|
||||
<label for="username"><?=_('Username')?>:</label>
|
||||
<input id="username" type="text" name="username" placeholder="<?=_('Username')?>" value="<?=$username?>" />
|
||||
<label for="name"><?=_('Name')?>:</label>
|
||||
<input id="name" type="text" name="name" placeholder="<?=_('Name')?>" value="<?=$name?>" />
|
||||
<label for="email"><?=_('E‑mail address')?>:</label>
|
||||
<input id="email" type="text" name="email" placeholder="<?=_('E‑mail address')?>" value="<?=$email?>" />
|
||||
</fieldset>
|
||||
<input type="submit" value="<?=_('Apply filters')?>" />
|
||||
</form>
|
||||
<ol id="userlist" 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>
|
||||
<?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 ?>
|
||||
<br />
|
||||
<small>
|
||||
<?=$user['prename']?> <?=$user['surname']?>,
|
||||
<a href="mailto:<?=$user['email']?>"><?=$user['email']?></a>
|
||||
</small>
|
||||
</p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ol>
|
||||
|
||||
<?php if(is_null($all) && ($page*$limit) < $usersCount) : ?>
|
||||
<nav class="admin">
|
||||
<li><a id="show-more" href="<?=$linker->link(null,1,true,array('page'=>$page+1,'sortorder'=>$sortorder),false)?>"><?=_('Show more')?></a></li>
|
||||
<li><a id="show-all" href="<?=$linker->link('all',1,true,array('sortorder'=>$sortorder))?>"><?=_('Show all')?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
|
||||
<script>
|
||||
var page = 1;
|
||||
var request;
|
||||
var linkUser = "<?=$linker->link(array('users','user','USER'))?>";
|
||||
var linkPage = "<?=$linker->link(null,1,true,array('page'=>'PAGE','sortorder'=>$sortorder),false)?>";
|
||||
|
||||
$("#show-more").click(function(event) {
|
||||
if(request) {
|
||||
request.abort();
|
||||
}
|
||||
|
||||
page++;
|
||||
request = $.getJSON(linkPage.replace('PAGE', page), function(data) {
|
||||
$.each(data['users'], function(key, user) {
|
||||
var urlUser = linkUser.replace('USER', user['url']);
|
||||
$("#userlist").append(
|
||||
"<li><p>" +
|
||||
"<a href=\"" + urlUser + "\">" + user['username'] + "</a><span class=\"xp\"><small>" + user['created'] + "</small></span>\n" +
|
||||
(user['roles'].length > 0 ? "<small>(" + user['roles'].join(', ') + ")</small>" : '') +
|
||||
|
||||
"<br /><small>" + user['prename'] + " " + user['surname'] + ", " +
|
||||
"<a href=\"mailto:" + user['email'] + "\">" + user['email'] + "</a></small>" +
|
||||
|
||||
"</p></li>"
|
||||
);
|
||||
});
|
||||
if(data['more']) {
|
||||
$("#show-more").attr('href', linkPage.replace('PAGE', page+1));
|
||||
}
|
||||
else {
|
||||
$("#show-more").remove();
|
||||
$("#show-all").remove();
|
||||
}
|
||||
});
|
||||
request.fail(function (jqXHR, textStatus, errorThrown) {
|
||||
window.location.href = linkPage.replace('PAGE', page);
|
||||
});
|
||||
|
||||
|
||||
event.preventDefault();
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
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>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue