2023-02-28 21:22:24 +05:00
|
|
|
{if $smarty.session.user_id}
|
|
|
|
<form id="addCommentOnTovar">
|
|
|
|
<input type="hidden" name="tovar_id" value="{$smarty.get.id}">
|
|
|
|
<input type="hidden" name="act" value="addComment">
|
|
|
|
<textarea class="form-control" placeholder="Оставьте отзыв!" style="height: 200px;" name="txt" id="textarea-comment"></textarea>
|
|
|
|
<button class="btn btn-primary" type="submit" style="padding: 10px;">Добавить</button>
|
|
|
|
<div class="alert alert-primary hidden" role="alert" id="comment-result">
|
|
|
|
Коментарий отправлен и будет опубликован после модерации
|
2023-03-05 20:22:21 +05:00
|
|
|
</div>
|
2023-02-28 21:22:24 +05:00
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{/if}
|
|
|
|
<hr>
|
|
|
|
<table class="table">
|
|
|
|
{section name=customer loop=$comments} {if $comments[customer].id}
|
|
|
|
<tr>
|
|
|
|
<td style="width: 250px;">
|
|
|
|
<p><a href="/user/{$comments[customer].user_id}" style="color: black;"><b>{$comments[customer].fio}</b></a></p>
|
|
|
|
<p>{$comments[customer].t|t}</p>
|
|
|
|
</td>
|
|
|
|
<td>{$comments[customer].txt}</td>
|
|
|
|
</tr>
|
2023-03-05 20:22:21 +05:00
|
|
|
|
2023-02-28 21:22:24 +05:00
|
|
|
{/if} {/section}
|
2023-03-05 20:22:21 +05:00
|
|
|
</table>
|
2023-02-28 21:22:24 +05:00
|
|
|
|