correctly set and use logged user

This commit is contained in:
coderkun 2014-04-07 23:10:15 +02:00
commit 17946fbcbf
207 changed files with 18910 additions and 0 deletions

View file

@ -0,0 +1,10 @@
<h1><?=_('Seminaries')?></h1>
<h2><?=_('New seminary')?></h2>
<form method="post" action="<?=$linker->link('create', 1)?>">
<fieldset>
<label for="title"><?=_('Title')?>:</label>
<input type="text" name="title" placeholder="<?=_('Title')?>" /><br />
</fieldset>
<input type="submit" name="create" value="<?=_('create')?>" />
</form>

View file

@ -0,0 +1,8 @@
<h1><?=_('Seminaries')?></h1>
<h2><?=_('Delete seminary')?></h2>
<?=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>

View file

@ -0,0 +1,10 @@
<h1><?=_('Seminaries')?></h1>
<h2><?=_('Edit seminary')?></h2>
<form method="post">
<fieldset>
<label for="title"><?=_('Title')?>:</label>
<input type="text" name="title" placeholder="<?=_('Title')?>" value="<?=$seminary['title']?>" /><br />
</fieldset>
<input type="submit" name="save" value="<?=_('save')?>" />
</form>

View file

@ -0,0 +1,17 @@
<h1><?=_('Seminaries')?></h1>
<nav>
<li><a href="<?=$linker->link('create', 1)?>"><?=_('Create new seminary')?></a></li>
</nav>
<ul>
<?php foreach($seminaries as &$seminary) : ?>
<li>
<?php if(array_key_exists('media', $seminary)) : ?>
<img src="<?=$linker->link(array('media','index',$seminary['media']['url']))?>" />
<?php endif ?>
<h2><a href="<?=$linker->link(array('seminary', $seminary['url']), 1)?>"><?=$seminary['title']?></a></h2>
<details>
<summary><?=sprintf(_('created by %s on %s'), $seminary['creator']['username'], $dateFormatter->format(new \DateTime($seminary['created'])))?></summary>
</details>
</li>
<?php endforeach ?>
</ul>

View file

@ -0,0 +1,43 @@
<?php if(!is_null($media)) : ?>
<div class="moodpic">
<img src="<?=$linker->link(array('media','index',$media['url']))?>">
</div>
<?php endif ?>
<h1><a href="<?=$linker->link(array('seminaries',$seminary['url']))?>"><?=$seminary['title']?></a></h1>
<p><?=\hhu\z\Utils::t($seminary['description'])?></p>
<?php foreach($questgroupshierarchy as &$hierarchy) : ?>
<h2><?=$hierarchy['title_plural']?></h2>
<ul class="questgroups cf">
<?php foreach($hierarchy['questgroups'] as &$group) : ?>
<li>
<?php if(!is_null($group['picture'])) : ?>
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$group['picture']['url']))?>">
<?php endif ?>
<section>
<p class="fwb"><?=$hierarchy['title_singular']?> <?=$group['pos']?>:
<a href="<?=$linker->link(array('questgroups','questgroup',$seminary['url'],$group['url']))?>"><?=$group['title']?></a></p>
<div class="cf">
<div class="xpbar">
<span style="width:<?=round($group['character_xps']*100/$group['xps'])?>%"></span>
</div>
<p class="xpnumeric"><?=$group['character_xps']?> / <?=$group['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">Auf ins Abenteuer!</a>
</section>
</li>
<?php endforeach?>
</ul>
<?php endforeach ?>
<nav>
<li><a href="<?=$linker->link('edit', 3)?>"><?=_('Edit seminary')?></a></li>
<li><a href="<?=$linker->link('delete', 3)?>"><?=_('Delete seminary')?></a></li>
</nav>
<p>
<?=sprintf(_('created by %s on %s'), $seminary['creator']['username'], $dateFormatter->format(new \DateTime($seminary['created'])))?>
</p>