change user Seminary roles to Character roles
This commit is contained in:
parent
87f58e2c5b
commit
2185a7c2a4
26 changed files with 145 additions and 156 deletions
|
|
@ -54,7 +54,7 @@
|
|||
<?=$intermediate?>
|
||||
</article>
|
||||
<aside>
|
||||
<?php if(!is_null($loggedCharacter) && count($loggedUser['seminaryroles']) > 0) : ?>
|
||||
<?php if(!is_null($loggedCharacter) && count($loggedCharacter['characterroles']) > 0) : ?>
|
||||
<?=$seminarybar?>
|
||||
<?php endif ?>
|
||||
</aside>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<li><a href="<?=$linker->link(array(), 0, true, array(), true)?>"><i class="fa fa-home fa-fw"></i>The Legend of Z</a></li>
|
||||
<?php if(!is_null($loggedUser) && count(array_intersect(array('admin','moderator'),$loggedUser['roles'])) > 0) : ?><li><a href="<?=$linker->link('users')?>"><i class="fa fa-users fa-fw"></i><?=_('Users')?></a></li><?php endif ?>
|
||||
<?php if(!is_null($loggedUser)) : ?><li><a href="<?=$linker->link('seminaries')?>"><i class="fa fa-pencil-square-o fa-fw"></i><?=_('Seminaries')?></a></li><?php endif ?>
|
||||
<?php if(!is_null($loggedCharacter) && count($loggedUser['seminaryroles']) > 0) : ?><?=$seminarymenu?><?php endif ?>
|
||||
<?php if(!is_null($loggedCharacter) && count($loggedCharacter['characterroles']) > 0) : ?><?=$seminarymenu?><?php endif ?>
|
||||
<?php if(is_null($loggedUser)) : ?>
|
||||
<li><a href="<?=$linker->link(array('users','login'))?>"><i class="fa fa-sign-in fa-fw"></i><?=_('Login')?></a></li>
|
||||
<?php else : ?>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<?php endif ?>
|
||||
<section>
|
||||
<p class="fwb">
|
||||
<?php if(count($seminary['userroles']) > 0) : ?>
|
||||
<?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']?>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
<p><?=\hhu\z\Utils::t($seminary['description'])?></p>
|
||||
<?php if(!array_key_exists('usercharacter', $seminary)) : ?>
|
||||
<a href="<?=$linker->link(array('characters','register',$seminary['url']))?>" class="cta orange"><?=_('Create a Character')?></a>
|
||||
<?php elseif(count($seminary['userroles']) == 0) : ?>
|
||||
<?php elseif(count($seminary['usercharacter']['characterroles']) == 0) : ?>
|
||||
<p><?=sprintf(_('Your Character “%s” has not been activated yet'), $seminary['usercharacter']['name'])?></p>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
</div>
|
||||
<?php endif ?>
|
||||
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\IntermediateController::$user['seminaryroles'])) > 0) : ?>
|
||||
<?php if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?>
|
||||
<nav class="admin">
|
||||
<?php if(in_array('admin', \hhu\z\controllers\IntermediateController::$user['seminaryroles'])) : ?><li><a href="<?=$linker->link('edit', 3)?>"><?=_('Edit seminary')?></a></li><?php endif ?>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\IntermediateController::$user['seminaryroles'])) : ?><li><a href="<?=$linker->link('delete', 3)?>"><?=_('Delete seminary')?></a></li><?php endif ?>
|
||||
<?php if(count(array_intersect(array('admin','moderator'), \hhu\z\controllers\IntermediateController::$user['seminaryroles'])) > 0) : ?><li><a href="<?=$linker->link(array('quests','index',$seminary['url']))?>"><?=_('Show Quests')?></a></li><?php endif ?>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?><li><a href="<?=$linker->link('edit', 3)?>"><?=_('Edit seminary')?></a></li><?php endif ?>
|
||||
<?php if(in_array('admin', \hhu\z\controllers\SeminaryController::$character['characterroles'])) : ?><li><a href="<?=$linker->link('delete', 3)?>"><?=_('Delete seminary')?></a></li><?php endif ?>
|
||||
<?php if(count(array_intersect(array('admin','moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) > 0) : ?><li><a href="<?=$linker->link(array('quests','index',$seminary['url']))?>"><?=_('Show Quests')?></a></li><?php endif ?>
|
||||
</nav>
|
||||
<?php endif ?>
|
||||
<p><?=\hhu\z\Utils::t($seminary['description'])?></p>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<p><img src="<?=$linker->link(array('media','seminary',$character['seminary_url'],$character['small_avatar']['url']))?>"></p>
|
||||
<?php endif ?>
|
||||
<p>
|
||||
<?php if(count($character['user_seminaryroles']) > 0) : ?>
|
||||
<?php if(count($character['characterroles']) > 0) : ?>
|
||||
<a href="<?=$linker->link(array('characters','character',$character['seminary_url'],$character['url']))?>"><?=$character['name']?></a>
|
||||
<?php else : ?>
|
||||
<?=$character['name']?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue