From 97d87aa8a6088b12be61549808e64eb93d5734e0 Mon Sep 17 00:00:00 2001 From: dogmatic Date: Mon, 4 Jan 2010 08:50:37 +0200 Subject: [PATCH] adding mass actions to the newsletters [#67] --- plugins/blog/views/posts/admin_index.ctp | 1 + .../controllers/newsletters_controller.php | 4 ++++ plugins/newsletter/views/campaigns/admin_index.ctp | 13 +++++++++++-- .../newsletter/views/newsletters/admin_index.ctp | 13 +++++++++++-- plugins/newsletter/views/templates/admin_index.ctp | 1 + 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/plugins/blog/views/posts/admin_index.ctp b/plugins/blog/views/posts/admin_index.ctp index fe101fcc5..c43341dd8 100644 --- a/plugins/blog/views/posts/admin_index.ctp +++ b/plugins/blog/views/posts/admin_index.ctp @@ -19,6 +19,7 @@ echo $this->Form->create( 'Post', array( 'url' => array( 'controller' => 'posts', 'action' => 'mass', 'admin' => 'true' ) ) ); $massActions = $this->Blog->massActionButtons( array( + 'add', 'toggle', 'copy', 'delete' diff --git a/plugins/newsletter/controllers/newsletters_controller.php b/plugins/newsletter/controllers/newsletters_controller.php index 71efad9ff..2827794cb 100644 --- a/plugins/newsletter/controllers/newsletters_controller.php +++ b/plugins/newsletter/controllers/newsletters_controller.php @@ -327,6 +327,10 @@ protected function admin_mass( ) case 'delete': return parent::__massActionDelete( $this->__canDelete( $ids ) ); break; + + default: + parent::admin_mass(); + break; } // switch } diff --git a/plugins/newsletter/views/campaigns/admin_index.ctp b/plugins/newsletter/views/campaigns/admin_index.ctp index d38a12a0e..71bc0964a 100644 --- a/plugins/newsletter/views/campaigns/admin_index.ctp +++ b/plugins/newsletter/views/campaigns/admin_index.ctp @@ -18,11 +18,20 @@ * @since 0.5a */ - echo $this->Letter->adminIndexHead( $this, $paginator, $filterOptions ); + echo $this->Form->create( 'Campaign', array( 'url' => array( 'controller' => 'campaigns', 'action' => 'mass', 'admin' => 'true' ) ) ); + $massActions = $this->Letter->massActionButtons( + array( + 'add', + 'copy', + 'toggle', + 'delete' + ) + ); + echo $this->Letter->adminIndexHead( $this, $paginator, $filterOptions, $massActions ); + ?>
Letter->adminTableHeadImages(); ?> - Form->create( 'Campaign', array( 'url' => array( 'controller' => 'campaigns', 'action' => 'mass', 'admin' => 'true' ) ) ); ?> Letter->adminTableHeader( diff --git a/plugins/newsletter/views/newsletters/admin_index.ctp b/plugins/newsletter/views/newsletters/admin_index.ctp index e09c796ba..21c59eae2 100644 --- a/plugins/newsletter/views/newsletters/admin_index.ctp +++ b/plugins/newsletter/views/newsletters/admin_index.ctp @@ -18,11 +18,20 @@ * @since 0.5a */ - echo $this->Letter->adminIndexHead( $this, $paginator, $filterOptions ); + echo $this->Form->create( 'Newsletter', array( 'url' => array( 'controller' => 'newsletters', 'action' => 'mass', 'admin' => 'true' ) ) ); + $massActions = $this->Letter->massActionButtons( + array( + 'add', + 'copy', + 'toggle', + 'send', + 'delete' + ) + ); + echo $this->Letter->adminIndexHead( $this, $paginator, $filterOptions, $massActions ); ?>
Letter->adminTableHeadImages(); ?> - Form->create( 'Newsletter', array( 'url' => array( 'controller' => 'newsletters', 'action' => 'mass', 'admin' => 'true' ) ) ); ?>
diff --git a/plugins/newsletter/views/templates/admin_index.ctp b/plugins/newsletter/views/templates/admin_index.ctp index ffe364e82..7a928f886 100644 --- a/plugins/newsletter/views/templates/admin_index.ctp +++ b/plugins/newsletter/views/templates/admin_index.ctp @@ -22,6 +22,7 @@ echo $this->Form->create( 'Template', array( 'url' => array( 'controller' => 'templates', 'action' => 'mass', 'admin' => 'true' ) ) ); $massActions = $this->Letter->massActionButtons( array( + 'add', 'copy', 'export', 'delete'
Form->checkbox( 'all' ); ?>