-
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.
controllers e views de home, sobre, postagens
- Loading branch information
1 parent
41860ed
commit efda557
Showing
10 changed files
with
157 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php defined('SYSPATH') or die('No direct script access.'); | ||
|
||
class Controller_Postagens extends Controller_ApplicationBlog { | ||
|
||
public function action_index(){ | ||
|
||
$content = View::factory('site/postagens/page'); | ||
|
||
|
||
$this->template->content = $content; | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php defined('SYSPATH') or die('No direct script access.'); | ||
|
||
class Controller_Sobre extends Controller_ApplicationBlog { | ||
|
||
public function action_index(){ | ||
|
||
$content = View::factory('site/sobre/page'); | ||
|
||
|
||
$this->template->content = $content; | ||
} | ||
|
||
} | ||
|
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
Empty file.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
<div id="header"> | ||
<header> | ||
<h1><a href="<?php echo URL::site('home'); ?>" title="Blog">Blog...</a></h1> | ||
</header> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div id="menu"> | ||
<nav> | ||
<ul> | ||
<li><a href="<?php echo URL::site('home'); ?>" title="Página Inicial">HOME</a></li> | ||
<li><a href="<?php echo URL::site('sobre'); ?>" title="Sobre o blog">SOBRE</a></li> | ||
<li><a href="<?php echo URL::site('postagens'); ?>" title="CRUD">CRUD POSTAGENS</a></li> | ||
</ul> | ||
</nav> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
<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> | ||
|
||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
<div id="postagens"> | ||
|
||
<h2>CRUD Posts</h2> | ||
|
||
<p>=========================== Listar posts ============================</p> | ||
|
||
<table cellspacing="0" cellpadding="0"> | ||
<thead><th>nº</th> <th>titulo</th> <th>cadastro</th> <th>ações</th></thead> | ||
<tbody> | ||
<tr> | ||
<td>78</td> | ||
<td>Lorem ipsum dolor sit amet...</td> | ||
<td>23/07/2012</td> | ||
<td> | ||
<a href="<?php echo URL::site('postagens/novo'); ?>" title="novo">novo -</a> | ||
<a href="<?php echo URL::site('postagens/editar'); ?>" title="editar">editar -</a> | ||
<a href="<?php echo URL::site('postagens/excluir'); ?>" title="deletar">excluir</a> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td>78</td> | ||
<td>Lorem ipsum dolor sit amet...</td> | ||
<td>23/07/2012</td> | ||
<td> | ||
<a href="<?php echo URL::site('postagens/novo'); ?>" title="novo">novo -</a> | ||
<a href="<?php echo URL::site('postagens/editar'); ?>" title="editar">editar -</a> | ||
<a href="<?php echo URL::site('postagens/excluir'); ?>" title="deletar">excluir</a> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td>78</td> | ||
<td>Lorem ipsum dolor sit amet...</td> | ||
<td>23/07/2012</td> | ||
<td> | ||
<a href="<?php echo URL::site('postagens/novo'); ?>" title="novo">novo -</a> | ||
<a href="<?php echo URL::site('postagens/editar'); ?>" title="editar">editar -</a> | ||
<a href="<?php echo URL::site('postagens/excluir'); ?>" title="deletar">excluir</a> | ||
</td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> | ||
|
||
|
||
<div class="paginacao">« 1 2 3 4 »</div> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
<div id="sobre"> | ||
|
||
<h2>Apenas um simples exemplo de um blog usando o framework kohana</h2> | ||
|
||
<p>Aqui estarei desenvolvendo um simples exemplo de um blog usando o framework kohana, apenas para apresentação.</p> | ||
|
||
<p>Alguns esclarecimentos:</p> | ||
|
||
<ul> | ||
<li>Não me preocuparei muito com a parte visual, estarei focado apenas no back-end.</li> | ||
<li>O módulo "pagination" não vem nessa versão do kohana(?), utilizo o módulo só que de uma versão anterior que foi customizada, e que customizei tambem.</li> | ||
<li>Sql do banco está no root do repositório.</li> | ||
</ul> | ||
|
||
|
||
</div> | ||
|