hide map for Character groups Quest Stations when there are no stations
This commit is contained in:
commit
df14dfafc3
4371 changed files with 1220224 additions and 0 deletions
74
views/html/charactergroups/creategroup.tpl
Normal file
74
views/html/charactergroups/creategroup.tpl
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<?=$moodpic?>
|
||||
<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>
|
||||
47
views/html/charactergroups/creategroupsgroup.tpl
Normal file
47
views/html/charactergroups/creategroupsgroup.tpl
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?=$moodpic?>
|
||||
<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>
|
||||
13
views/html/charactergroups/deletegroup.tpl
Normal file
13
views/html/charactergroups/deletegroup.tpl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?=$moodpic?>
|
||||
<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>
|
||||
12
views/html/charactergroups/deletegroupsgroup.tpl
Normal file
12
views/html/charactergroups/deletegroupsgroup.tpl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?=$moodpic?>
|
||||
<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>
|
||||
80
views/html/charactergroups/editgroup.tpl
Normal file
80
views/html/charactergroups/editgroup.tpl
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
<?=$moodpic?>
|
||||
<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>
|
||||
47
views/html/charactergroups/editgroupsgroup.tpl
Normal file
47
views/html/charactergroups/editgroupsgroup.tpl
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?=$moodpic?>
|
||||
<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>
|
||||
93
views/html/charactergroups/group.tpl
Normal file
93
views/html/charactergroups/group.tpl
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
<?=$moodpic?>
|
||||
<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 class="ctitle">
|
||||
<?php if(array_key_exists('title', $character)) : ?>
|
||||
<?=$character['title']?>
|
||||
<?php else : ?>
|
||||
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<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>
|
||||
|
||||
<?php if(!empty($achievements) || count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<section>
|
||||
<h1 id="achievements"><i class="fa fa-trophy fa-fw"></i><?=_('Achievements')?></a></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('charactergroupsachievements','manage',$seminary['url'],$groupsgroup['url']))?>"><?=sprintf(_('Manage %s-Achievements'), $groupsgroup['name'])?></a></li>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<ul class="achmnts">
|
||||
<?php foreach($achievements as &$achievement) : ?>
|
||||
<li class="cf">
|
||||
<?php if(!is_null($achievement['achievementsmedia_id'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','charactergroupsachievement',$seminary['url'],$groupsgroup['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?>
|
||||
</ul>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
68
views/html/charactergroups/groupsgroup.tpl
Normal file
68
views/html/charactergroups/groupsgroup.tpl
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?=$moodpic?>
|
||||
<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) : ?>
|
||||
<?php if($quest['public'] || count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<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 endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
||||
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<h2 id="achievements"><i class="fa fa-trophy fa-fw"></i><?=sprintf(_('%s-Achievements'),$groupsgroup['name'])?></a></h2>
|
||||
<nav class="admin">
|
||||
<li><a href="<?=$linker->link(array('charactergroupsachievements','create',$seminary['url'],$groupsgroup['url']))?>"><?=sprintf(_('Create new %s-Achievement'), $groupsgroup['name'])?></a></li>
|
||||
<li><a href="<?=$linker->link(array('charactergroupsachievements','manage',$seminary['url'],$groupsgroup['url']))?>"><?=sprintf(_('Manage %s-Achievements'), $groupsgroup['name'])?></a></li>
|
||||
</nav>
|
||||
<ul class="achmnts">
|
||||
<?php foreach($achievements as &$achievement) : ?>
|
||||
<li class="cf">
|
||||
<?php if(!is_null($achievement['achievementsmedia_id'])) : ?>
|
||||
<img src="<?=$linker->link(array('media','charactergroupsachievement',$seminary['url'],$groupsgroup['url'],$achievement['url']))?>" />
|
||||
<?php endif ?>
|
||||
<h3 id="<?=$achievement['url']?>"><?=$achievement['title']?></h3>
|
||||
<p class="desc"><?=\hhu\z\Utils::t($achievement['description'])?></p>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
17
views/html/charactergroups/index.tpl
Normal file
17
views/html/charactergroups/index.tpl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?=$moodpic?>
|
||||
<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>
|
||||
107
views/html/charactergroups/managegroup.tpl
Normal file
107
views/html/charactergroups/managegroup.tpl
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
<?=$moodpic?>
|
||||
<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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue