Skip to content

Commit

Permalink
adding mass actions to the newsletter templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Jan 4, 2010
1 parent 195c2c2 commit bae4601
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions plugins/newsletter/controllers/templates_controller.php
Expand Up @@ -259,6 +259,10 @@ protected function admin_mass( )
case 'delete':
return parent::__massActionDelete( $this->__canDelete( $ids ) );
break;

default:
parent::admin_mass();
break;
} // switch
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/newsletter/views/helpers/letter.php
Expand Up @@ -28,7 +28,7 @@ class LetterHelper extends AppHelper
'Html',

// core helpers
'Core.Wysiwyg'
'Core.Wysiwyg', 'Design', 'Image', 'Form'
);

var $allowedPreviews = array(
Expand Down
15 changes: 10 additions & 5 deletions plugins/newsletter/views/templates/admin_index.ctp
Expand Up @@ -19,11 +19,18 @@
*/
?>
<?php
echo $this->Letter->adminIndexHead( $this, $paginator, $filterOptions );
echo $this->Form->create( 'Template', array( 'url' => array( 'controller' => 'templates', 'action' => 'mass', 'admin' => 'true' ) ) );
$massActions = $this->Letter->massActionButtons(
array(
'copy',
'export',
'delete'
)
);
echo $this->Letter->adminIndexHead( $this, $paginator, $filterOptions, $massActions );
?>
<div class="table">
<?php echo $this->Letter->adminTableHeadImages(); ?>
<?php echo $this->Form->create( 'Template', array( 'url' => array( 'controller' => 'templates', 'action' => 'mass', 'admin' => 'true' ) ) ); ?>
<table class="listing" cellpadding="0" cellspacing="0">
<?php
echo $this->Letter->adminTableHeader(
Expand Down Expand Up @@ -61,8 +68,7 @@
<td>
<?php

echo $this->Html->link( 'export', array( 'action' => 'export', $template['Template']['id'] ) ), ' ',
$this->Html->link( 'preview', array( 'action' => 'view', $template['Template']['id'] ) ), ' ',
echo $this->Html->link( 'preview', array( 'action' => 'view', $template['Template']['id'] ) ), ' ',
$this->Html->link( 'edit', array( 'action' => 'edit', $template['Template']['id'] ) );
?>
</td>
Expand All @@ -72,7 +78,6 @@
?>
</table>
<?php
echo $this->Form->button( __( 'Delete', true ), array( 'value' => 'delete', 'name' => 'action' ) );
echo $this->Form->end();

?>
Expand Down

0 comments on commit bae4601

Please sign in to comment.