improve CRUD for Character types (issue #319) and implement CRUD for Avatars (issue #37)

This commit is contained in:
coderkun 2014-07-10 12:57:25 +02:00
commit 6932e70704
12 changed files with 760 additions and 245 deletions

View file

@ -31,17 +31,22 @@
<?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 elseif(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\IntermediateController::$user['roles'])) > 0) : ?>
<a class="cta orange" href="<?=$linker->link(array('charactertypes','manage',$seminary['url']))?>"><?=_('Manage Charactertypes')?></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 ?>