Skip to content

Commit

Permalink
Unified "action" column
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Oct 5, 2024
1 parent 344739d commit b8de9ca
Show file tree
Hide file tree
Showing 35 changed files with 57 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ protected function _prepareColumns()
]);

$this->addColumn('action', [
'header' => Mage::helper('catalog')->__('Action'),
'type' => 'action',
'getter' => 'getId',
'actions' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('catalog')->__('Action'),
'type' => 'action',
'getter' => 'getId',
'actions' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ protected function _prepareColumns()
]);

$this->addColumn('action', [
'header' => Mage::helper('catalog')->__('Action'),
'type' => 'action',
'getter' => 'getId',
'actions' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('catalog')->__('Action'),
'type' => 'action',
'getter' => 'getId',
'actions' => [
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('catalog')->__('Action'),
'type' => 'action',
'getter' => 'getId',
'actions' => [[
Expand Down
4 changes: 1 addition & 3 deletions app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ protected function _prepareColumns()
]);

$this->addColumn('page_actions', [
'header' => Mage::helper('cms')->__('Action'),
'type' => 'action',
'width' => 10,
'sortable' => false,
'filter' => false,
'renderer' => 'adminhtml/cms_page_grid_renderer_action',
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,9 @@ protected function _prepareColumns()
]);

$this->addColumn('action', [
'header' => Mage::helper('customer')->__('Action'),
'type' => 'action',
'index' => 'quote_item_id',
'renderer' => 'adminhtml/customer_grid_renderer_multiaction',
'filter' => false,
'sortable' => false,
'actions' => [
[
'caption' => Mage::helper('customer')->__('Configure'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,58 +52,56 @@ protected function _prepareCollection()
protected function _prepareColumns()
{
$this->addColumn('queue_id', [
'header' => Mage::helper('customer')->__('ID'),
'align' => 'left',
'index' => 'queue_id',
'width' => 10
'header' => Mage::helper('customer')->__('ID'),
'align' => 'left',
'index' => 'queue_id',
'width' => 10
]);

$this->addColumn('start_at', [
'header' => Mage::helper('customer')->__('Newsletter Start'),
'type' => 'datetime',
'align' => 'center',
'index' => 'queue_start_at',
'default' => ' ---- '
'header' => Mage::helper('customer')->__('Newsletter Start'),
'type' => 'datetime',
'align' => 'center',
'index' => 'queue_start_at',
'default' => ' ---- '
]);

$this->addColumn('finish_at', [
'header' => Mage::helper('customer')->__('Newsletter Finish'),
'type' => 'datetime',
'align' => 'center',
'index' => 'queue_finish_at',
'header' => Mage::helper('customer')->__('Newsletter Finish'),
'type' => 'datetime',
'align' => 'center',
'index' => 'queue_finish_at',
'gmtoffset' => true,
'default' => ' ---- '
'default' => ' ---- '
]);

$this->addColumn('letter_sent_at', [
'header' => Mage::helper('customer')->__('Newsletter Received'),
'type' => 'datetime',
'align' => 'center',
'index' => 'letter_sent_at',
'header' => Mage::helper('customer')->__('Newsletter Received'),
'type' => 'datetime',
'align' => 'center',
'index' => 'letter_sent_at',
'gmtoffset' => true,
'default' => ' ---- '
]);

$this->addColumn('template_subject', [
'header' => Mage::helper('customer')->__('Subject'),
'align' => 'center',
'index' => 'template_subject'
'header' => Mage::helper('customer')->__('Subject'),
'align' => 'center',
'index' => 'template_subject'
]);

$this->addColumn('status', [
'header' => Mage::helper('customer')->__('Status'),
'align' => 'center',
'filter' => 'adminhtml/customer_edit_tab_newsletter_grid_filter_status',
'header' => Mage::helper('customer')->__('Status'),
'align' => 'center',
'filter' => 'adminhtml/customer_edit_tab_newsletter_grid_filter_status',
'index' => 'queue_status',
'renderer' => 'adminhtml/customer_edit_tab_newsletter_grid_renderer_status'
'renderer' => 'adminhtml/customer_edit_tab_newsletter_grid_renderer_status'
]);

$this->addColumn('action', [
'header' => Mage::helper('customer')->__('Action'),
'align' => 'center',
'filter' => false,
'sortable' => false,
'renderer' => 'adminhtml/customer_edit_tab_newsletter_grid_renderer_action'
'type' => 'action',
'align' => 'center',
'renderer' => 'adminhtml/customer_edit_tab_newsletter_grid_renderer_action'
]);

return parent::_prepareColumns();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,9 @@ protected function _prepareColumns()

if (Mage::helper('sales/reorder')->isAllow()) {
$this->addColumn('action', [
'type' => 'action',
'header' => ' ',
'filter' => false,
'sortable' => false,
'width' => '100px',
'width' => '100',
'renderer' => 'adminhtml/sales_reorder_renderer_action'
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,9 @@ protected function _prepareColumns()
'index' => 'created_at',
]);
$this->addColumn('action', [
'header' => Mage::helper('customer')->__('Action'),
'type' => 'action',
'align' => 'center',
'format' => '<a href="' . $this->getUrl('*/sales/edit/id/$entity_id') . '">' . Mage::helper('customer')->__('Edit') . '</a>',
'filter' => false,
'sortable' => false,
'is_system' => true
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,9 @@ protected function _prepareColumns()
}

$this->addColumn('action', [
'type' => 'action',
'header' => ' ',
'filter' => false,
'sortable' => false,
'width' => '100px',
'width' => '100',
'renderer' => 'adminhtml/sales_reorder_renderer_action'
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,9 @@ protected function _prepareColumns()
]);

$this->addColumn('action', [
'header' => Mage::helper('customer')->__('Action'),
'type' => 'action',
'index' => 'wishlist_item_id',
'renderer' => 'adminhtml/customer_grid_renderer_multiaction',
'filter' => false,
'sortable' => false,
'actions' => [
[
'caption' => Mage::helper('customer')->__('Configure'),
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Adminhtml/Block/Customer/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('customer')->__('Action'),
'type' => 'action',
'getter' => 'getId',
'actions' => [
Expand Down
6 changes: 2 additions & 4 deletions app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,9 @@ protected function _prepareColumns()
]);

$this->addColumn('action', [
'header' => Mage::helper('newsletter')->__('Action'),
'filter' => false,
'sortable' => false,
'type' => 'action',
'no_link' => true,
'width' => '100px',
'width' => '100',
'renderer' => 'adminhtml/newsletter_queue_grid_renderer_action'
]);

Expand Down
10 changes: 4 additions & 6 deletions app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,11 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('newsletter')->__('Action'),
'type' => 'action',
'index' => 'template_id',
'sortable' => false,
'filter' => false,
'no_link' => true,
'width' => '170px',
'renderer' => 'adminhtml/newsletter_template_grid_renderer_action'
'no_link' => true,
'width' => '170',
'renderer' => 'adminhtml/newsletter_template_grid_renderer_action'
]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ protected function _prepareColumns()
]);

$this->addColumn('action', [
'header' => Mage::helper('reports')->__('Action'),
'width' => '100px',
'type' => 'action',
'width' => '100',
'align' => 'center',
'filter' => false,
'sortable' => false,
'renderer' => 'adminhtml/report_grid_column_renderer_customer',
'is_system' => true
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ protected function _prepareColumns()
]);

$this->addColumn('action', [
'header' => Mage::helper('reports')->__('Action'),
'width' => '100px',
'type' => 'action',
'width' => '100',
'align' => 'center',
'filter' => false,
'sortable' => false,
'renderer' => 'adminhtml/report_grid_column_renderer_product',
'is_system' => true
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('catalog')->__('Action'),
'width' => '100',
'type' => 'action',
'getter' => 'getId',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('catalog')->__('Action'),
'width' => '100',
'type' => 'action',
'getter' => 'getId',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('catalog')->__('Action'),
'width' => '100',
'type' => 'action',
'getter' => 'getId',
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Adminhtml/Block/Review/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('adminhtml')->__('Action'),
'type' => 'action',
'getter' => 'getReviewId',
'actions' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('sales')->__('Action'),
'type' => 'action',
'getter' => 'getId',
'actions' => [
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('sales')->__('Action'),
'type' => 'action',
'getter' => 'getId',
'actions' => [
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('sales')->__('Action'),
'type' => 'action',
'getter' => 'getId',
'actions' => [
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('sales')->__('Action'),
'type' => 'action',
'getter' => 'getId',
'actions' => [
Expand Down
4 changes: 1 addition & 3 deletions app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ protected function _prepareColumns()
}

$this->addColumn('action', [
'header' => Mage::helper('sitemap')->__('Action'),
'filter' => false,
'sortable' => false,
'type' => 'action',
'width' => '100',
'renderer' => 'adminhtml/sitemap_grid_renderer_action'
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ protected function _prepareColumns()
]);

$this->addColumn('action', [
'header' => Mage::helper('adminhtml')->__('Action'),
'align' => 'center',
'type' => 'action',
'actions' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ protected function _prepareColumns()
]);

$this->addColumn('action', [
'header' => Mage::helper('adminhtml')->__('Action'),
'align' => 'center',
'type' => 'action',
'actions' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,9 @@ protected function _prepareColumns()
$this->addColumn(
'action',
[
'header' => Mage::helper('adminhtml')->__('Action'),
'type' => 'action',
'index' => 'template_id',
'sortable' => false,
'filter' => false,
'width' => '100px',
'width' => '100',
'renderer' => 'adminhtml/system_email_template_grid_renderer_action'
]
);
Expand Down
6 changes: 2 additions & 4 deletions app/code/core/Mage/Adminhtml/Block/Tag/Grid/Customers.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ protected function _prepareColumns()
'renderer' => 'adminhtml/tag_grid_column_renderer_tags',
]);
$this->addColumn('action', [
'header' => Mage::helper('tag')->__('Action'),
'type' => 'action',
'align' => 'center',
'width' => '120px',
'width' => '120',
'format' => '<a href="' . $this->getUrl('*/*/products/customer_id/$entity_id') . '">' . Mage::helper('tag')->__('View Products') . '</a>',
'filter' => false,
'sortable' => false,
'is_system' => true,
]);

Expand Down
Loading

0 comments on commit b8de9ca

Please sign in to comment.