Skip to content

Commit

Permalink
adding filter remove buttons to posts index
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Dec 31, 2009
1 parent 10e098b commit 1f4e4ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/blog/controllers/posts_controller.php
Expand Up @@ -34,7 +34,7 @@ class PostsController extends BlogAppController
* @access public
* @var array
*/
var $helpers = array( 'Core.Geshi' );
var $helpers = array( 'Core.Geshi', 'Filter.Filter' );

/**
* PostsController::beforeFilter()
Expand Down Expand Up @@ -224,9 +224,10 @@ function admin_dashboard()
*/
function admin_index()
{
$filterOptions = $this->Filter->filterOptions;
$this->Post->recursive = 0;
$posts = $this->paginate( null, $this->Filter->filter );
$this->set( compact( 'posts' ) );
$this->set( compact( 'filterOptions', 'posts' ) );
}

/**
Expand Down
2 changes: 2 additions & 0 deletions plugins/blog/views/posts/admin_index.ctp
Expand Up @@ -18,6 +18,8 @@
*/

echo $this->Blog->adminIndexHead( $this, $paginator );

echo $this->Filter->clear( $filterOptions );
?>
<div class="table">
<?php echo $this->Blog->adminTableHeadImages(); ?>
Expand Down

0 comments on commit 1f4e4ec

Please sign in to comment.