implement CRUD for Questgroup texts (issue #32)
This commit is contained in:
parent
ce7c688ea0
commit
468e1bc421
8 changed files with 309 additions and 76 deletions
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>
|
||||
|
|
@ -13,7 +13,12 @@
|
|||
<?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 ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue