<h1>Mis consultas</h1>
<table class="account">
<tr>
<th><?=$_message->get('userName')?></th>
<td><?=$_message->get('product')->get('name')?></td>
<td class="date"><?=$_front->date($_message->get('created'))?></td>
</tr>
<tr>
<td colspan="3"><?=nl2br($_message->get('message'))?></td>
</tr>
<?php foreach($_message->get('messages') as $sub): ?>
<tr>
<th colspan="2"><?=$sub->get('userName')?></th>
<td class="date"><?=$_front->date($sub->get('created'))?></td>
</tr>
<tr>
<td colspan="3"><?=nl2br($sub->get('message'))?></td>
</tr>
<?php endforeach; ?>
</table>
<?php if(!$_message->get('messages_status.closed')): ?>
<form action="<?=$_SERVER['REQUEST_URI']?>" method="post" id="message">
<label>
Responder
<textarea name="answer" rows="10" cols="20"></textarea>
</label>
<button type="submit" class="button btn btn-primary">Enviar</button>
<?php if(isset($_REQUEST['edit'])): ?>
<input type="hidden" name="edit" value="<?=$_REQUEST['edit']?>" />
<?php endif; ?>
</form>
<?php endif; ?>