Skip to content

Instantly share code, notes, and snippets.

@eminetto
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eminetto/219a41d5be98784c6f89 to your computer and use it in GitHub Desktop.
Save eminetto/219a41d5be98784c6f89 to your computer and use it in GitHub Desktop.
<div class="actions clearfix">
<div class="btns">
<a class="btn btn-primary" href="/post/save" title="Criar Post">
Criar Post
</a>
</div>
</div>
<h3>Lista de Posts</h3>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Título</th>
<th>Texto</th>
<th width="130" class="center">Data</th>
<th width="120" class="center">Opções</th>
</tr>
</thead>
<tbody>
<?php foreach($posts as $post):?>
<tr>
<td><?php echo $this->escapeHtml($post->title);?></td>
<td><?php echo $this->escapeHtml($post->description);?></td>
<td class="center">
<?php
echo $this->dateFormat(
\DateTime::createFromFormat('Y-m-d H:i:s', $post->post_date),
\IntlDateFormatter::SHORT,
\IntlDateFormatter::SHORT,
'pt_BR'
);
?>
</td>
<td class="center">
<a href="/post/save/<?php echo $post->id ;?>"
title="Editar">
Editar
</a>
<a href="/post/delete/<?php echo $post->id;?>"
rel="confirmation"
title="Deseja excluir este registro?">
Remover
</a>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
Copy link

ghost commented Nov 29, 2014

eu Recebo o erro:
/post - Class 'IntlDateFormatter' not found in /var/www/iniciandozf2/module/Application/view/application/post/index.phtml on line 27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment