-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pagincaao das postagens e crud funcionando
- Loading branch information
1 parent
cb21e77
commit d1de07b
Showing
8 changed files
with
132 additions
and
42 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,41 @@ | ||
|
||
<div id="listar_posts"> | ||
|
||
<dl class="post"> | ||
<dt>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</dt> | ||
<dd class="data">22 de julho, por Zé - 12 comentários</dd> | ||
<dd class="texto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec commodo, nulla varius imperdiet molestie, ligula dui lobortis lacus, ut elementum purus libero non odio. Suspendisse luctus libero sit amet sem dignissim vel mattis tellus bibendum. Pellentesque malesuada lacus sed neque rhoncus...</dd> | ||
<dd class="mais"><a href="" title="Continuar lendo...">➔</a></dd> | ||
</dl> | ||
|
||
<dl class="post"> | ||
<dt>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</dt> | ||
<dd class="data">22 de julho, por Zé - 12 comentários</dd> | ||
<dd class="texto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec commodo, nulla varius imperdiet molestie, ligula dui lobortis lacus, ut elementum purus libero non odio. Suspendisse luctus libero sit amet sem dignissim vel mattis tellus bibendum. Pellentesque malesuada lacus sed neque rhoncus...</dd> | ||
<dd class="mais"><a href="" title="Continuar lendo...">➔</a></dd> | ||
</dl> | ||
|
||
<dl class="post"> | ||
<dt>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</dt> | ||
<dd class="data">22 de julho, por Zé - 12 comentários</dd> | ||
<dd class="texto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec commodo, nulla varius imperdiet molestie, ligula dui lobortis lacus, ut elementum purus libero non odio. Suspendisse luctus libero sit amet sem dignissim vel mattis tellus bibendum. Pellentesque malesuada lacus sed neque rhoncus...</dd> | ||
<dd class="mais"><a href="" title="Continuar lendo...">➔</a></dd> | ||
</dl> | ||
|
||
|
||
<div class="paginacao">« 1 2 3 4 »</div> | ||
|
||
<!-- Condição para saber se tem postagens cadastradas --> | ||
<?php if (!empty($posts)): ?> | ||
|
||
<?php foreach ($posts as $post): ?> | ||
|
||
<dl class="post"> | ||
<dt><?php echo $post->titulo; ?></dt> | ||
<dd class="data"><?php $data_registro = new DateTime($post->data_registro); | ||
$data_registro = $data_registro->format('d/m/Y'); | ||
|
||
echo $data_registro . ' por Zé - 6 comentários' ; ?></dd> | ||
<dd class="texto"><?php echo $post->chamada ?></dd> | ||
<dd class="mais"><a href="" title="Continuar lendo...">➔</a></dd> | ||
</dl> | ||
|
||
<?php endforeach ?> | ||
|
||
<?php echo $pagination_links; ?> | ||
|
||
<?php else: ?> | ||
<!-- EXEMPLO --> | ||
<dl class="post"> | ||
<dt>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</dt> | ||
<dd class="data">22 de julho, por Zé - 12 comentários</dd> | ||
<dd class="texto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec commodo, nulla varius imperdiet molestie, ligula dui lobortis lacus, ut elementum purus libero non odio. Suspendisse luctus libero sit amet sem dignissim vel mattis tellus bibendum. Pellentesque malesuada lacus sed neque rhoncus...</dd> | ||
<dd class="mais"><a href="" title="Continuar lendo...">➔</a></dd> | ||
</dl> | ||
|
||
<dl class="post"> | ||
<dt>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</dt> | ||
<dd class="data">22 de julho, por Zé - 12 comentários</dd> | ||
<dd class="texto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec commodo, nulla varius imperdiet molestie, ligula dui lobortis lacus, ut elementum purus libero non odio. Suspendisse luctus libero sit amet sem dignissim vel mattis tellus bibendum. Pellentesque malesuada lacus sed neque rhoncus...</dd> | ||
<dd class="mais"><a href="" title="Continuar lendo...">➔</a></dd> | ||
</dl> | ||
|
||
<?php endif ?> | ||
|
||
</div> | ||
|
This file contains 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
This file contains 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
This file contains 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
Submodule pagination
updated
from d1c34d to a0535f