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>

View file

@ -2,7 +2,7 @@
<h2><?=_('New user')?></h2>
<form method="post" action="<?=$linker->link('create', 1)?>">
<filedset>
<fieldset>
<label for="username"><?=_('Username')?>:</label>
<input type="text" name="username" placeholder="<?=_('Username')?>" /><br />
<label for="email"><?=_('EMail-Address')?>:</label>

View file

@ -1,8 +1,8 @@
<h1><?=_('Users')?></h1>
<h2><?=_('Edit user')?></h2>
<form method="post" action="<?=$linker->link('edit', 1)?>">
<filedset>
<form method="post">
<fieldset>
<label for="username"><?=_('Username')?>:</label>
<input type="text" name="username" placeholder="<?=_('Username')?>" value="<?=$user['username']?>" /><br />
<label for="email"><?=_('EMail-Address')?>:</label>
@ -10,5 +10,5 @@
<label for="password"><?=_('Password')?>:</label>
<input type="password" name="password" placeholder="<?=_('Password')?>" /><br />
</fieldset>
<input type="submit" name="create" value="<?=_('create')?>" />
<input type="submit" name="save" value="<?=_('save')?>" />
</form>

View file

@ -1,6 +1,7 @@
<h1><?=_('Users')?></h1>
<h2><?=$user['username']?></h2>
<nav>
<li><a href="<?=$linker->link('edit', 3)?>"><?=_('Edit user')?></a></li>
<li><a href="<?=$linker->link('delete', 3)?>"><?=_('Delete user')?></a></li>
</nav>
<p>