Created
November 4, 2012 13:52
-
-
Save eminetto/4012005 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="actions clearfix"> | |
<div class="btns"> | |
<a class="btn submit" href="/admin/index/save" title="Criar Post">Criar Post</a> | |
</div> | |
</div> | |
<label class="divisor"><span>Lista de Posts</span></label> | |
<table class="datatable"> | |
<thead> | |
<tr> | |
<th>Título</th> | |
<th>Texto</th> | |
<th width="130" class="center">Data de Cadastro</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($post['post_date'], \IntlDateFormatter::SHORT, \IntlDateFormatter::SHORT, 'pt_BR'); | |
?> | |
</td> | |
<td class="center"> | |
<a href="/admin/index/save/id/<?php echo $post['id'] ;?>" title="Editar" class="btn"><i class="icon-edit"></i></a> | |
<a href="/admin/index/delete/id/<?php echo $post['id'];?>" rel="confirmation" title="Deseja excluir este registro?" class="btn"><i class="icon-remove"></i></a> | |
</td> | |
</tr> | |
<?php endforeach;?> | |
</table> |
Não sei porque não foi o código, mas segue novamente:
<a href="/admin/index/save/id/<?php echo $post['id'] ;?>" title="Editar" class="btn"><i class="icon-edit"></i></a>
<a href="/admin/index/delete/id/<?php echo $post['id'];?>" rel="confirmation" title="Deseja excluir este registro?" class="btn"><i class="icon-remove"></i></a>
Obrigado pela correção. Já alterei no livro também
Elton,
Na linha 23 não estava apresentando o resultado em tela, tive de fazer da seguinte forma:
echo $this->dateFormat(
new DateTime($post['post_date']),
\IntlDateFormatter::SHORT,
\IntlDateFormatter::SHORT,
'pt_BR'
);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Elton,
Apenas uma correção nas linhas 27 e 28:
*** Lembrando que no projeto está faltando a pasta de imagens do Bootstrap