Skip to content

Commit ae384db

Browse files
committed
close #9
1 parent f27f162 commit ae384db

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

app/code/community/TM/Email/Block/Adminhtml/Gateway/Transport/History/Grid.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,32 @@ protected function _prepareColumns()
5050
'frame_callback' => array($this, 'decorateMime'),
5151
));
5252

53+
$emailTemplates = array();
54+
$_emailTemplates = Mage_Core_Model_Email_Template::getDefaultTemplatesAsOptionsArray();
55+
foreach ($_emailTemplates as $_emailTemplate) {
56+
$emailTemplates[$_emailTemplate['value']] = $_emailTemplate['label'];
57+
}
58+
$_emailTemplates = Mage::getSingleton('adminhtml/system_config_source_email_template')->toOptionArray();
59+
foreach ($_emailTemplates as $_emailTemplate) {
60+
$emailTemplates[$_emailTemplate['value']] = $_emailTemplate['label'];
61+
}
62+
63+
$emailTemplates[''] = 'Default Email Template';
64+
5365
$this->addColumn('template_id', array(
5466
'header' => Mage::helper('tm_email')->__('Template'),
5567
'align' => 'left',
5668
'index' => 'template_id',
69+
'type' => 'options',
70+
'options' => $emailTemplates
71+
));
72+
73+
$this->addColumn('created_at', array(
74+
'header' => Mage::helper('tm_abandoned')->__('Created date'),
75+
'align' => 'left',
76+
'type' => 'date',
77+
'width' => '100px',
78+
'index' => 'created_at',
5779
));
5880

5981
$this->addColumn('actions', array(

app/code/community/TM/Email/Block/Adminhtml/Gateway/Transport/History/Grid/Renderer/Action.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function render(Varien_Object $row)
1515

1616
$title = Mage::helper('tm_email')->__('View Email');
1717
$script = '
18-
var changesUrl = \'' . $this->getUrl('*/*/preview', array('id' => $row->getId())) . '\';
18+
var changesUrl = \'' . $this->getUrl('*/*/view', array('id' => $row->getId())) . '\';
1919
Dialog.info(null, {
2020
draggable:true,
2121
resizable:true,

app/code/community/TM/Email/sql/tm_email_setup/mysql4-upgrade-1.1.9-1.1.10.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@
3838
// 'unsigned' => true,
3939
// 'nullable' => false,
4040
// ), 'Transport ID')
41-
->addColumn('created_at', Varien_Db_Ddl_Table::TYPE_INTEGER, 10, array(
42-
'unsigned' => true,
43-
'nullable' => false,
44-
), 'Created')
41+
->addColumn('created_at', Varien_Db_Ddl_Table::TYPE_DATE, null, array(
42+
), 'Date')
4543
;
4644
$installer->getConnection()->createTable($table);
4745

0 commit comments

Comments
 (0)