php-mpos/public/templates/test/admin/news/default.tpl
2013-09-12 10:14:24 +02:00

40 lines
1.5 KiB
Smarty

<article class="module width_full">
<header><h3>News Posts</h3></header>
<form method="POST" action="{$smarty.server.PHP_SELF}">
<input type="hidden" name="page" value="{$smarty.request.page}">
<input type="hidden" name="action" value="{$smarty.request.action}">
<input type="hidden" name="do" value="add">
<div class="module_content">
<fieldset>
<label>Header</label>
<input size="30" type="text" name="data[header]" required />
</fieldset>
<fieldset>
<label>Content</label>
<textarea name="data[content]" rows="5" required></textarea>
</fieldset>
</div>
<footer>
<div class="submit_link">
<input type="submit" value="Add" class="alt_btn">
</div>
</footer>
</form>
</article>
{nocache}
{section name=news loop=$NEWS}
<article class="module width_full">
<header><h3>{$NEWS[news].header} posted {$NEWS[news].time} by {$NEWS[news].author}</h3>
{if $NEWS[news].active == 0}<font size="2px"><font color="red"><b>inactive</b></font><br /><br />{/if}</header>
<div class="module_content">{$NEWS[news].content}</div>
<footer>
<div class="submit_link">
<a href='{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action=news_edit&id={$NEWS[news].id}'><i class="icon-wrench"></i></a>&nbsp;
<a href='{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action={$smarty.request.action}&do=delete&id={$NEWS[news].id}'><i class="icon-trash"></i></a>
</div>
</footer>
</article>
{/section}
{/nocache}