diff --git a/application/bootstrap.php b/application/bootstrap.php index ac09227..1f31457 100644 --- a/application/bootstrap.php +++ b/application/bootstrap.php @@ -105,11 +105,11 @@ // 'auth' => MODPATH.'auth', // Basic authentication // 'cache' => MODPATH.'cache', // Caching with multiple backends // 'codebench' => MODPATH.'codebench', // Benchmarking tool - // 'database' => MODPATH.'database', // Database access + 'database' => MODPATH.'database', // Database access // 'image' => MODPATH.'image', // Image manipulation - // 'orm' => MODPATH.'orm', // Object Relationship Mapping + 'orm' => MODPATH.'orm', // Object Relationship Mapping // 'unittest' => MODPATH.'unittest', // Unit testing - // 'userguide' => MODPATH.'userguide', // User guide and API documentation + 'userguide' => MODPATH.'userguide', // User guide and API documentation )); /** diff --git a/application/classes/controller/postagens.php b/application/classes/controller/postagens.php index 377e791..057b80e 100644 --- a/application/classes/controller/postagens.php +++ b/application/classes/controller/postagens.php @@ -4,10 +4,25 @@ class Controller_Postagens extends Controller_ApplicationBlog { public function action_index(){ + + $content = View::factory('site/postagens/page'); + $this->template->content = $content; + } + + public function action_novo(){ + + $action = $this->request->action(); + + $post = array(); + + $content = View::factory('site/postagens/novo') + ->bind('action', $action) + ->bind('post', $post); $this->template->content = $content; + } } diff --git a/application/views/site/postagens/novo.php b/application/views/site/postagens/novo.php new file mode 100644 index 0000000..ddb3c38 --- /dev/null +++ b/application/views/site/postagens/novo.php @@ -0,0 +1,37 @@ + +
+ +

CRUD Posts

+ + + +

=== ===

+ + + +
+ + 'Titulo')); ?>:
+ 'titulo', 'size' => '60')); ?> +
+ +
+ + 'Chamada')); ?>:
+ 'chamada' , 'rows' => 5, 'cols' => '60' )); ?> +
+ +
+ + 'Texto')); ?>:
+ 'texto' , 'rows' => 12, 'cols' => '60' )); ?> +
+ +
+ + 'salvar')); ?> + 'cancelar')); ?> + + +
+ diff --git a/application/views/site/postagens/page.php b/application/views/site/postagens/page.php index 6719b96..078873e 100644 --- a/application/views/site/postagens/page.php +++ b/application/views/site/postagens/page.php @@ -3,7 +3,7 @@

CRUD Posts

-

=========================== Listar posts ============================

+

=============================== Listar ================================

diff --git a/media/css/style.css b/media/css/style.css index 8a17bdd..9d5c5b8 100644 --- a/media/css/style.css +++ b/media/css/style.css @@ -90,6 +90,8 @@ select:focus { outline: none; } /*==posts==*/ +#listar_posts { margin-bottom: 40px; } + #listar_posts dl.post{ display: block; color: #555; border-bottom:1px solid #ccc; margin-bottom: 8px; } #listar_posts dl.post dt{ font-size: 26px; line-height:28px; } @@ -114,6 +116,8 @@ select:focus { outline: none; } /*==POSTAGENS==*/ +#postagens { margin-bottom: 40px; } + #postagens p{ margin: 10px 0px; } #postagens table{ width:500px; } @@ -122,3 +126,7 @@ select:focus { outline: none; } #postagens .paginacao { font-size: 22px; text-align: center; margin: 20px; } +#postagens input[type="text"]{ font-size: 15px; padding: 4px 2px; } +#postagens textarea{ font-size: 15px; padding: 4px 2px; } +#postagens input[type="submit"]{ font-size: 15px; padding: 6px 6px; } +
titulo cadastro ações