implement CRUD for seminaries and correct typos for users

This commit is contained in:
coderkun 2014-01-25 20:55:10 +01:00
commit 9e21ff9312
15 changed files with 247 additions and 27 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

@ -1,4 +1,7 @@
<h1><?=_('Seminaries')?></h1>
<nav>
<li><a href="<?=$linker->link('create', 1)?>"><?=_('Create new seminary')?></a></li>
</nav>
<ul>
<?php foreach($seminaries as &$seminary) : ?>
<li>

View file

@ -1,5 +1,9 @@
<h1><?=_('Seminaries')?></h1>
<h2><?=$seminary['title']?></h2>
<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>