Version Notes
Initial Stable release
Download this release
Release Info
Developer | Chris |
Extension | straker-translations-easy-translation-platform |
Version | 1.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.2.3 to 1.3.2
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Cms/Block/Grid.php +48 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Cms/Page/Grid.php +49 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Job/Cms/Block.php +41 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Job/Cms/Block/Grid.php +141 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Job/Cms/Page.php +41 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Job/Cms/Page/Grid.php +141 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Block.php +47 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Block/Attribute.php +17 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Block/Confirm.php +48 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Block/Confirm/Grid.php +102 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Block/Grid.php +124 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Page.php +47 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Page/Attribute.php +20 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Page/Confirm.php +48 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Page/Confirm/Grid.php +109 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Page/Grid.php +134 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Type.php +1 -1
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Template/Grid/Renderer/Action.php +1 -1
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Template/Grid/Renderer/CmsOriginTitle.php +10 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Template/Grid/Renderer/CmsVersion.php +20 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Template/Grid/Renderer/Status.php +2 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Template/Grid/Renderer/StrakerTranslated.php +14 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Helper/Data.php +27 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Cms/Block/Attributes.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Cms/Block/Translate.php +43 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Cms/Page/Attributes.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Cms/Page/Translate.php +43 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Job.php +177 -3
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Job/Cms/Block.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Job/Cms/Page.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Block/Attributes.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Block/Attributes/Collection.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Block/Translate.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Block/Translate/Collection.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Page/Attributes.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Page/Attributes/Collection.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Page/Translate.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Page/Translate/Collection.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Job/Cms/Block.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Job/Cms/Block/Collection.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Job/Cms/Page.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Job/Cms/Page/Collection.php +16 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/controllers/Adminhtml/Straker/Cms/BlockController.php +186 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/controllers/Adminhtml/Straker/Cms/PageController.php +186 -0
- app/code/community/StrakerTranslations/EasyTranslationPlatform/controllers/Adminhtml/Straker/NewController.php +0 -10
- app/code/community/StrakerTranslations/EasyTranslationPlatform/etc/config.xml +25 -1
- app/code/community/StrakerTranslations/EasyTranslationPlatform/sql/strakertranslations_easytranslationplatform_setup/mysql4-upgrade-1.3.0-1.3.1.php +127 -0
- app/design/adminhtml/default/straker/layout/straker.xml +32 -0
- app/design/adminhtml/default/straker/template/cms/form/container.phtml +47 -0
- app/design/adminhtml/default/straker/template/straker/job/cms/block.phtml +39 -0
- app/design/adminhtml/default/straker/template/straker/job/cms/block/massaction.phtml +87 -0
- app/design/adminhtml/default/straker/template/straker/job/cms/page.phtml +39 -0
- app/design/adminhtml/default/straker/template/straker/job/cms/page/massaction.phtml +87 -0
- app/design/adminhtml/default/straker/template/straker/new/cms/block.phtml +31 -0
- app/design/adminhtml/default/straker/template/straker/new/cms/block/attributes.phtml +28 -0
- app/design/adminhtml/default/straker/template/straker/new/cms/block/confirm.phtml +38 -0
- app/design/adminhtml/default/straker/template/straker/new/cms/block/massaction.phtml +87 -0
- app/design/adminhtml/default/straker/template/straker/new/cms/page.phtml +31 -0
- app/design/adminhtml/default/straker/template/straker/new/cms/page/attributes.phtml +28 -0
- app/design/adminhtml/default/straker/template/straker/new/cms/page/confirm.phtml +38 -0
- app/design/adminhtml/default/straker/template/straker/new/cms/page/massaction.phtml +87 -0
- package.xml +4 -4
- skin/adminhtml/default/straker/css/straker.css +18 -0
- skin/adminhtml/default/straker/css/straker.less +19 -0
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Cms/Block/Grid.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Cms_Block_Grid extends Mage_Adminhtml_Block_Cms_Block_Grid {
|
3 |
+
protected function _prepareCollection()
|
4 |
+
{
|
5 |
+
$collection = Mage::getModel('cms/block')->getCollection();
|
6 |
+
/* @var $collection Mage_Cms_Model_Mysql4_Block_Collection */
|
7 |
+
$prefix = Mage::getConfig()->getTablePrefix()->__toString();
|
8 |
+
$collection->getSelect()->joinLeft(
|
9 |
+
array('straker' => $prefix.'straker_job_cmsblock'),
|
10 |
+
'straker.new_entity_id = main_table.block_id',
|
11 |
+
array('straker_translated' => 'straker.version')
|
12 |
+
);
|
13 |
+
$this->setCollection($collection);
|
14 |
+
|
15 |
+
return Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _prepareColumns()
|
19 |
+
{
|
20 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
21 |
+
$this->addColumnAfter('straker_translated', array(
|
22 |
+
'header' => Mage::helper('strakertranslations_easytranslationplatform')->__('Created by Straker'),
|
23 |
+
'type' => 'options',
|
24 |
+
'options' => array('0' => 'No', '1' => 'Yes'),
|
25 |
+
'renderer' => 'StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Template_Grid_Renderer_StrakerTranslated',
|
26 |
+
'index' => 'straker_translated',
|
27 |
+
'filter_index' => 'straker.version',
|
28 |
+
'filter_condition_callback' => array($this, '_filterStrakerVersion')
|
29 |
+
), 'update_time');
|
30 |
+
}
|
31 |
+
return parent::_prepareColumns();
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function _filterStrakerVersion($collection, $column)
|
35 |
+
{
|
36 |
+
$value = $column->getFilter()->getValue();
|
37 |
+
if ($value == 0) {
|
38 |
+
$this->getCollection()->getSelect()->where(
|
39 |
+
"straker.version IS NULL");
|
40 |
+
}
|
41 |
+
else {
|
42 |
+
$this->getCollection()->getSelect()->where(
|
43 |
+
"straker.version = ".$value);
|
44 |
+
}
|
45 |
+
|
46 |
+
return $this;
|
47 |
+
}
|
48 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Cms/Page/Grid.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Cms_Page_Grid extends Mage_Adminhtml_Block_Cms_Page_Grid {
|
3 |
+
protected function _prepareCollection()
|
4 |
+
{
|
5 |
+
$collection = Mage::getModel('cms/page')->getCollection();
|
6 |
+
/* @var $collection Mage_Cms_Model_Mysql4_Page_Collection */
|
7 |
+
$prefix = Mage::getConfig()->getTablePrefix()->__toString();
|
8 |
+
$collection->getSelect()->joinLeft(
|
9 |
+
array('straker' => $prefix.'straker_job_cmspage'),
|
10 |
+
'straker.new_entity_id = main_table.page_id',
|
11 |
+
array('straker_translated' => 'straker.version')
|
12 |
+
);
|
13 |
+
$collection->setFirstStoreFlag(true);
|
14 |
+
$this->setCollection($collection);
|
15 |
+
|
16 |
+
return Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
|
17 |
+
}
|
18 |
+
|
19 |
+
protected function _prepareColumns()
|
20 |
+
{
|
21 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
22 |
+
$this->addColumnAfter('straker_translated', array(
|
23 |
+
'header' => Mage::helper('strakertranslations_easytranslationplatform')->__('Created by Straker'),
|
24 |
+
'type' => 'options',
|
25 |
+
'options' => array('0' => 'No', '1' => 'Yes'),
|
26 |
+
'renderer' => 'StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Template_Grid_Renderer_StrakerTranslated',
|
27 |
+
'index' => 'straker_translated',
|
28 |
+
'filter_index' => 'straker.version',
|
29 |
+
'filter_condition_callback' => array($this, '_filterStrakerVersion')
|
30 |
+
), 'page_actions');
|
31 |
+
}
|
32 |
+
return parent::_prepareColumns();
|
33 |
+
}
|
34 |
+
|
35 |
+
protected function _filterStrakerVersion($collection, $column)
|
36 |
+
{
|
37 |
+
$value = $column->getFilter()->getValue();
|
38 |
+
if ($value == 0) {
|
39 |
+
$this->getCollection()->getSelect()->where(
|
40 |
+
"straker.version IS NULL");
|
41 |
+
}
|
42 |
+
else {
|
43 |
+
$this->getCollection()->getSelect()->where(
|
44 |
+
"straker.version = ".$value);
|
45 |
+
}
|
46 |
+
|
47 |
+
return $this;
|
48 |
+
}
|
49 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Job/Cms/Block.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Job_Cms_Block extends Mage_Adminhtml_Block_Widget_Container{
|
3 |
+
|
4 |
+
protected $_job;
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setTemplate('straker/job/cms/block.phtml');
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _prepareLayout()
|
13 |
+
{
|
14 |
+
$jobId = $this->getRequest()->getParam('job_id');
|
15 |
+
$jobStatus = $this->getJob()->getStatusId();
|
16 |
+
if ( $jobStatus == '4'){
|
17 |
+
$this->_addButton('publish', array(
|
18 |
+
'label' => Mage::helper('catalog')->__('Publish All Translations'),
|
19 |
+
'onclick' => "setLocation('{$this->getUrl('*/*/copyAll',array('job_id'=>$jobId))}');",
|
20 |
+
'class' => 'task'
|
21 |
+
));
|
22 |
+
}
|
23 |
+
|
24 |
+
$this->setChild('grid', $this->getLayout()->createBlock('strakertranslations_easytranslationplatform/adminhtml_job_cms_block_grid', 'job_cms_block.grid'));
|
25 |
+
$this->getChild('grid')->setStatusId($jobStatus);
|
26 |
+
return parent::_prepareLayout();
|
27 |
+
}
|
28 |
+
|
29 |
+
public function getGridHtml()
|
30 |
+
{
|
31 |
+
return $this->getChildHtml('grid');
|
32 |
+
}
|
33 |
+
|
34 |
+
public function getJob(){
|
35 |
+
if(!$this->_job) {
|
36 |
+
$jobId = $this->getRequest()->getParam('job_id');
|
37 |
+
$this->_job = Mage::getModel('strakertranslations_easytranslationplatform/job')->load($jobId);
|
38 |
+
}
|
39 |
+
return $this->_job;
|
40 |
+
}
|
41 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Job/Cms/Block/Grid.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Job_Cms_Block_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
4 |
+
|
5 |
+
protected $_attributes;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('strakerJobCmsBlockGrid');
|
10 |
+
$this->setSaveParametersInSession(true);
|
11 |
+
}
|
12 |
+
|
13 |
+
protected function _prepareLayout()
|
14 |
+
{
|
15 |
+
$this->setChild('dispute_button',
|
16 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
17 |
+
->setData(array(
|
18 |
+
'label' => Mage::helper('catalog')->__('Feedback'),
|
19 |
+
'onclick' => 'disputeForm.show(\''.$this->getRequest()->getParam('job_id').'\')',
|
20 |
+
'class' => 'feedback'
|
21 |
+
))
|
22 |
+
);
|
23 |
+
|
24 |
+
return parent::_prepareLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
protected function _prepareCollection() {
|
28 |
+
$prefix = Mage::getConfig()->getTablePrefix()->__toString();
|
29 |
+
$job = Mage::getModel('strakertranslations_easytranslationplatform/job')->load($this->getRequest()->getParam('job_id'));
|
30 |
+
|
31 |
+
$collection = Mage::getModel('strakertranslations_easytranslationplatform/job_cms_block')->getCollection()
|
32 |
+
->addFieldToFilter('main_table.job_id', $job->getId());
|
33 |
+
|
34 |
+
//echo $collection->getSelect(); die();
|
35 |
+
$this->setCollection($collection);
|
36 |
+
return parent::_prepareCollection();
|
37 |
+
}
|
38 |
+
|
39 |
+
protected function _prepareColumns() {
|
40 |
+
$this->addColumn('title', array(
|
41 |
+
'header' => Mage::helper('strakertranslations_easytranslationplatform')->__('Title'),
|
42 |
+
'align' => 'center',
|
43 |
+
'index' => 'origin',
|
44 |
+
'renderer' => 'StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Template_Grid_Renderer_CmsOriginTitle',
|
45 |
+
'sortable' => false,
|
46 |
+
'filter' => false,
|
47 |
+
));
|
48 |
+
|
49 |
+
if ($this->getStatusId() == '4' || $this->getStatusId() == '5'){
|
50 |
+
$this->addColumn('version', array(
|
51 |
+
'header' => Mage::helper('strakertranslations_easytranslationplatform')->__('Published'),
|
52 |
+
'renderer' => 'StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Template_Grid_Renderer_CmsVersion',
|
53 |
+
'align' => 'center',
|
54 |
+
'index' => false,
|
55 |
+
'filter' => false,
|
56 |
+
));
|
57 |
+
}
|
58 |
+
|
59 |
+
return parent::_prepareColumns();
|
60 |
+
}
|
61 |
+
|
62 |
+
public function getRowUrl($row) {
|
63 |
+
// return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
64 |
+
return '';
|
65 |
+
}
|
66 |
+
|
67 |
+
protected function _prepareMassaction()
|
68 |
+
{
|
69 |
+
if ($this->getStatusId() == '4') {
|
70 |
+
|
71 |
+
$this->setMassactionIdField('block_id');
|
72 |
+
$this->getMassactionBlock()->setFormFieldName('block_id');
|
73 |
+
|
74 |
+
$this->getMassactionBlock()->addItem('add', array(
|
75 |
+
'label' => Mage::helper('catalog')->__('Publish Translation'),
|
76 |
+
'url' => $this->getUrl('*/*/applyTranslation'),
|
77 |
+
'selected' => 1
|
78 |
+
));
|
79 |
+
|
80 |
+
$this->getMassactionBlock()->setTemplate('straker/job/cms/page/massaction.phtml');
|
81 |
+
|
82 |
+
$hiddenParams = '<input type="hidden" name="job_id" value="' . $this->getRequest()->getParam('job_id') . '" />';
|
83 |
+
$this->getMassactionBlock()->setHiddenParams($hiddenParams);
|
84 |
+
|
85 |
+
|
86 |
+
// Mage::dispatchEvent('adminhtml_strakertranslation_job_product_grid_prepare_massaction', array('block' => $this));
|
87 |
+
return $this;
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
protected function _prepareMassactionColumn()
|
92 |
+
{
|
93 |
+
if ($this->getStatusId() == '4') {
|
94 |
+
$columnId = 'massaction';
|
95 |
+
$massactionColumn = $this->getLayout()->createBlock('adminhtml/widget_grid_column')
|
96 |
+
->setData(array(
|
97 |
+
'index' => $this->getMassactionIdField(),
|
98 |
+
'use_index' => $this->getMassactionIdField(),
|
99 |
+
'filter_index' => $this->getMassactionIdFilter(),
|
100 |
+
'type' => 'massaction',
|
101 |
+
'name' => $this->getMassactionBlock()->getFormFieldName(),
|
102 |
+
'align' => 'center',
|
103 |
+
'is_system' => true
|
104 |
+
));
|
105 |
+
|
106 |
+
if ($this->getNoFilterMassactionColumn()) {
|
107 |
+
$massactionColumn->setData('filter', false);
|
108 |
+
}
|
109 |
+
|
110 |
+
$massactionColumn->setSelected($this->getMassactionBlock()->getSelected())
|
111 |
+
->setGrid($this)
|
112 |
+
->setId($columnId);
|
113 |
+
|
114 |
+
$oldColumns = $this->_columns;
|
115 |
+
$this->_columns = array();
|
116 |
+
$this->_columns[$columnId] = $massactionColumn;
|
117 |
+
$this->_columns = array_merge($this->_columns, $oldColumns);
|
118 |
+
return $this;
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
public function getMainButtonsHtml()
|
123 |
+
{
|
124 |
+
$html = '';
|
125 |
+
if ($this->getStatusId() == '4') {
|
126 |
+
$html .= $this->getChildHtml('dispute_button');
|
127 |
+
}
|
128 |
+
if($this->getFilterVisibility()){
|
129 |
+
$html.= $this->getResetFilterButtonHtml();
|
130 |
+
$html.= $this->getSearchButtonHtml();
|
131 |
+
}
|
132 |
+
return $html;
|
133 |
+
}
|
134 |
+
|
135 |
+
protected function getAttributes(){
|
136 |
+
if(!$this->_attributes){
|
137 |
+
$this->_attributes = Mage::getModel('strakertranslations_easytranslationplatform/cms_block_attributes')->getCollection()->addFieldToFilter('job_id',$this->getRequest()->getParam('job_id'));
|
138 |
+
}
|
139 |
+
return $this->_attributes;
|
140 |
+
}
|
141 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Job/Cms/Page.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Job_Cms_Page extends Mage_Adminhtml_Block_Widget_Container{
|
3 |
+
|
4 |
+
protected $_job;
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setTemplate('straker/job/cms/page.phtml');
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _prepareLayout()
|
13 |
+
{
|
14 |
+
$jobId = $this->getRequest()->getParam('job_id');
|
15 |
+
$jobStatus = $this->getJob()->getStatusId();
|
16 |
+
if ( $jobStatus == '4'){
|
17 |
+
$this->_addButton('publish', array(
|
18 |
+
'label' => Mage::helper('catalog')->__('Publish All Translations'),
|
19 |
+
'onclick' => "setLocation('{$this->getUrl('*/*/copyAll',array('job_id'=>$jobId))}');",
|
20 |
+
'class' => 'task'
|
21 |
+
));
|
22 |
+
}
|
23 |
+
|
24 |
+
$this->setChild('grid', $this->getLayout()->createBlock('strakertranslations_easytranslationplatform/adminhtml_job_cms_page_grid', 'job_cms_page.grid'));
|
25 |
+
$this->getChild('grid')->setStatusId($jobStatus);
|
26 |
+
return parent::_prepareLayout();
|
27 |
+
}
|
28 |
+
|
29 |
+
public function getGridHtml()
|
30 |
+
{
|
31 |
+
return $this->getChildHtml('grid');
|
32 |
+
}
|
33 |
+
|
34 |
+
public function getJob(){
|
35 |
+
if(!$this->_job) {
|
36 |
+
$jobId = $this->getRequest()->getParam('job_id');
|
37 |
+
$this->_job = Mage::getModel('strakertranslations_easytranslationplatform/job')->load($jobId);
|
38 |
+
}
|
39 |
+
return $this->_job;
|
40 |
+
}
|
41 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Job/Cms/Page/Grid.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Job_Cms_Page_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
4 |
+
|
5 |
+
protected $_attributes;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('strakerJobCmsPageGrid');
|
10 |
+
$this->setSaveParametersInSession(true);
|
11 |
+
}
|
12 |
+
|
13 |
+
protected function _prepareLayout()
|
14 |
+
{
|
15 |
+
$this->setChild('dispute_button',
|
16 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
17 |
+
->setData(array(
|
18 |
+
'label' => Mage::helper('catalog')->__('Feedback'),
|
19 |
+
'onclick' => 'disputeForm.show(\''.$this->getRequest()->getParam('job_id').'\')',
|
20 |
+
'class' => 'feedback'
|
21 |
+
))
|
22 |
+
);
|
23 |
+
|
24 |
+
return parent::_prepareLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
protected function _prepareCollection() {
|
28 |
+
$prefix = Mage::getConfig()->getTablePrefix()->__toString();
|
29 |
+
$job = Mage::getModel('strakertranslations_easytranslationplatform/job')->load($this->getRequest()->getParam('job_id'));
|
30 |
+
|
31 |
+
$collection = Mage::getModel('strakertranslations_easytranslationplatform/job_cms_page')->getCollection()
|
32 |
+
->addFieldToFilter('main_table.job_id', $job->getId());
|
33 |
+
|
34 |
+
$this->setCollection($collection);
|
35 |
+
return parent::_prepareCollection();
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _prepareColumns() {
|
39 |
+
|
40 |
+
$this->addColumn('title', array(
|
41 |
+
'header' => Mage::helper('strakertranslations_easytranslationplatform')->__('Title'),
|
42 |
+
'align' => 'center',
|
43 |
+
'index' => 'origin',
|
44 |
+
'renderer' => 'StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Template_Grid_Renderer_CmsOriginTitle',
|
45 |
+
'sortable' => false,
|
46 |
+
'filter' => false,
|
47 |
+
));
|
48 |
+
|
49 |
+
if ($this->getStatusId() == '4' || $this->getStatusId() == '5'){
|
50 |
+
$this->addColumn('version', array(
|
51 |
+
'header' => Mage::helper('strakertranslations_easytranslationplatform')->__('Published'),
|
52 |
+
'renderer' => 'StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Template_Grid_Renderer_CmsVersion',
|
53 |
+
'align' => 'center',
|
54 |
+
'index' => false,
|
55 |
+
'filter' => false,
|
56 |
+
));
|
57 |
+
}
|
58 |
+
|
59 |
+
return parent::_prepareColumns();
|
60 |
+
}
|
61 |
+
|
62 |
+
public function getRowUrl($row) {
|
63 |
+
// return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
64 |
+
return '';
|
65 |
+
}
|
66 |
+
|
67 |
+
protected function _prepareMassaction()
|
68 |
+
{
|
69 |
+
if ($this->getStatusId() == '4') {
|
70 |
+
|
71 |
+
$this->setMassactionIdField('page_id');
|
72 |
+
$this->getMassactionBlock()->setFormFieldName('page_id');
|
73 |
+
|
74 |
+
$this->getMassactionBlock()->addItem('add', array(
|
75 |
+
'label' => Mage::helper('catalog')->__('Publish Translation'),
|
76 |
+
'url' => $this->getUrl('*/*/applyTranslation'),
|
77 |
+
'selected' => 1
|
78 |
+
));
|
79 |
+
|
80 |
+
$this->getMassactionBlock()->setTemplate('straker/job/cms/page/massaction.phtml');
|
81 |
+
|
82 |
+
$hiddenParams = '<input type="hidden" name="job_id" value="' . $this->getRequest()->getParam('job_id') . '" />';
|
83 |
+
$this->getMassactionBlock()->setHiddenParams($hiddenParams);
|
84 |
+
|
85 |
+
|
86 |
+
// Mage::dispatchEvent('adminhtml_strakertranslation_job_product_grid_prepare_massaction', array('block' => $this));
|
87 |
+
return $this;
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
protected function _prepareMassactionColumn()
|
92 |
+
{
|
93 |
+
if ($this->getStatusId() == '4') {
|
94 |
+
$columnId = 'massaction';
|
95 |
+
$massactionColumn = $this->getLayout()->createBlock('adminhtml/widget_grid_column')
|
96 |
+
->setData(array(
|
97 |
+
'index' => $this->getMassactionIdField(),
|
98 |
+
'use_index' => $this->getMassactionIdField(),
|
99 |
+
'filter_index' => $this->getMassactionIdFilter(),
|
100 |
+
'type' => 'massaction',
|
101 |
+
'name' => $this->getMassactionBlock()->getFormFieldName(),
|
102 |
+
'align' => 'center',
|
103 |
+
'is_system' => true
|
104 |
+
));
|
105 |
+
|
106 |
+
if ($this->getNoFilterMassactionColumn()) {
|
107 |
+
$massactionColumn->setData('filter', false);
|
108 |
+
}
|
109 |
+
|
110 |
+
$massactionColumn->setSelected($this->getMassactionBlock()->getSelected())
|
111 |
+
->setGrid($this)
|
112 |
+
->setId($columnId);
|
113 |
+
|
114 |
+
$oldColumns = $this->_columns;
|
115 |
+
$this->_columns = array();
|
116 |
+
$this->_columns[$columnId] = $massactionColumn;
|
117 |
+
$this->_columns = array_merge($this->_columns, $oldColumns);
|
118 |
+
return $this;
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
public function getMainButtonsHtml()
|
123 |
+
{
|
124 |
+
$html = '';
|
125 |
+
if ($this->getStatusId() == '4') {
|
126 |
+
$html .= $this->getChildHtml('dispute_button');
|
127 |
+
}
|
128 |
+
if($this->getFilterVisibility()){
|
129 |
+
$html.= $this->getResetFilterButtonHtml();
|
130 |
+
$html.= $this->getSearchButtonHtml();
|
131 |
+
}
|
132 |
+
return $html;
|
133 |
+
}
|
134 |
+
|
135 |
+
protected function getAttributes(){
|
136 |
+
if(!$this->_attributes){
|
137 |
+
$this->_attributes = Mage::getModel('strakertranslations_easytranslationplatform/cms_page_attributes')->getCollection()->addFieldToFilter('job_id',$this->getRequest()->getParam('job_id'));
|
138 |
+
}
|
139 |
+
return $this->_attributes;
|
140 |
+
}
|
141 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Block.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Cms_Block extends Mage_Adminhtml_Block_Widget_Container
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Set template
|
6 |
+
*/
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
parent::__construct();
|
10 |
+
$this->setTemplate('straker/new/cms/block.phtml');
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Prepare button and grid
|
15 |
+
*
|
16 |
+
* @return Mage_Adminhtml_Block_Catalog_Product
|
17 |
+
*/
|
18 |
+
protected function _prepareLayout()
|
19 |
+
{
|
20 |
+
$this->setChild('grid', $this->getLayout()->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_block_grid', 'cms_block.grid', array('setup_store_id' => $this->getSetupStoreId(), 'attr' => $this->getAttr())));
|
21 |
+
return parent::_prepareLayout();
|
22 |
+
}
|
23 |
+
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Render grid
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
public function getGridHtml()
|
31 |
+
{
|
32 |
+
return $this->getChildHtml('grid');
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Check whether it is single store mode
|
37 |
+
*
|
38 |
+
* @return bool
|
39 |
+
*/
|
40 |
+
public function isSingleStoreMode()
|
41 |
+
{
|
42 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
43 |
+
return false;
|
44 |
+
}
|
45 |
+
return true;
|
46 |
+
}
|
47 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Block/Attribute.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Cms_Block_Attribute extends Mage_Adminhtml_Block_Widget_Container{
|
3 |
+
|
4 |
+
private static $_cmsBlockAttributes = array(
|
5 |
+
'title' => 'Title',
|
6 |
+
'content' => 'Content',
|
7 |
+
);
|
8 |
+
|
9 |
+
protected function _beforeToHtml(){
|
10 |
+
$this->setTemplate('straker/new/cms/block/attributes.phtml');
|
11 |
+
}
|
12 |
+
|
13 |
+
public function getAttributes(){
|
14 |
+
return self::$_cmsBlockAttributes;
|
15 |
+
}
|
16 |
+
|
17 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Block/Confirm.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Cms_Block_Confirm extends Mage_Adminhtml_Block_Widget_Container
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Set template
|
6 |
+
*/
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
parent::__construct();
|
10 |
+
$this->setTemplate('straker/new/cms/block/confirm.phtml');
|
11 |
+
}
|
12 |
+
|
13 |
+
|
14 |
+
protected function _prepareLayout()
|
15 |
+
{
|
16 |
+
$this->_addButton('submit', array(
|
17 |
+
'label' => Mage::helper('catalog')->__('Submit'),
|
18 |
+
'onclick' => "$('submit-new-job-form').submit();",
|
19 |
+
'class' => 'task'
|
20 |
+
));
|
21 |
+
|
22 |
+
$this->setChild('grid', $this->getLayout()->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_block_confirm_grid', 'cms_block.grid', array('store' => $this->getStore(), 'cms_block' => $this->getCmsBlock())));
|
23 |
+
return parent::_prepareLayout();
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Render grid
|
28 |
+
*
|
29 |
+
* @return string
|
30 |
+
*/
|
31 |
+
public function getGridHtml()
|
32 |
+
{
|
33 |
+
return $this->getChildHtml('grid');
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Check whether it is single store mode
|
38 |
+
*
|
39 |
+
* @return bool
|
40 |
+
*/
|
41 |
+
public function isSingleStoreMode()
|
42 |
+
{
|
43 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
44 |
+
return false;
|
45 |
+
}
|
46 |
+
return true;
|
47 |
+
}
|
48 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Block/Confirm/Grid.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Cms_Block_Confirm_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('strakerCmsBlocks');
|
9 |
+
$this->setDefaultSort('identifier');
|
10 |
+
$this->setDefaultDir('ASC');
|
11 |
+
$this->setUseAjax(false);
|
12 |
+
$this->setFilterVisibility(false);
|
13 |
+
}
|
14 |
+
|
15 |
+
|
16 |
+
protected function _prepareCollection()
|
17 |
+
{
|
18 |
+
$collection = Mage::getModel('cms/block')->getCollection()->addFieldToFilter('block_id', $this->getCmsBlock());
|
19 |
+
/* @var $collection Mage_Cms_Model_Mysql4_Block_Collection */
|
20 |
+
$this->setCollection($collection);
|
21 |
+
return parent::_prepareCollection();
|
22 |
+
}
|
23 |
+
|
24 |
+
protected function _prepareColumns()
|
25 |
+
{
|
26 |
+
$baseUrl = $this->getUrl();
|
27 |
+
|
28 |
+
$this->addColumn('title', array(
|
29 |
+
'header' => Mage::helper('cms')->__('Title'),
|
30 |
+
'align' => 'left',
|
31 |
+
'index' => 'title',
|
32 |
+
));
|
33 |
+
|
34 |
+
$this->addColumn('identifier', array(
|
35 |
+
'header' => Mage::helper('cms')->__('Identifier'),
|
36 |
+
'align' => 'left',
|
37 |
+
'index' => 'identifier'
|
38 |
+
));
|
39 |
+
|
40 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
41 |
+
$this->addColumn('store_id', array(
|
42 |
+
'header' => Mage::helper('cms')->__('Store View'),
|
43 |
+
'index' => 'store_id',
|
44 |
+
'type' => 'store',
|
45 |
+
'store_all' => true,
|
46 |
+
'store_view' => true,
|
47 |
+
'sortable' => false,
|
48 |
+
'filter_condition_callback'
|
49 |
+
=> array($this, '_filterStoreCondition'),
|
50 |
+
));
|
51 |
+
}
|
52 |
+
|
53 |
+
$this->addColumn('is_active', array(
|
54 |
+
'header' => Mage::helper('cms')->__('Status'),
|
55 |
+
'index' => 'is_active',
|
56 |
+
'type' => 'options',
|
57 |
+
'options' => array(
|
58 |
+
0 => Mage::helper('cms')->__('Disabled'),
|
59 |
+
1 => Mage::helper('cms')->__('Enabled')
|
60 |
+
),
|
61 |
+
));
|
62 |
+
|
63 |
+
$this->addColumn('creation_time', array(
|
64 |
+
'header' => Mage::helper('cms')->__('Date Created'),
|
65 |
+
'index' => 'creation_time',
|
66 |
+
'type' => 'datetime',
|
67 |
+
));
|
68 |
+
|
69 |
+
$this->addColumn('update_time', array(
|
70 |
+
'header' => Mage::helper('cms')->__('Last Modified'),
|
71 |
+
'index' => 'update_time',
|
72 |
+
'type' => 'datetime',
|
73 |
+
));
|
74 |
+
|
75 |
+
return parent::_prepareColumns();
|
76 |
+
}
|
77 |
+
|
78 |
+
protected function _afterLoadCollection()
|
79 |
+
{
|
80 |
+
$this->getCollection()->walk('afterLoad');
|
81 |
+
parent::_afterLoadCollection();
|
82 |
+
}
|
83 |
+
|
84 |
+
protected function _filterStoreCondition($collection, $column)
|
85 |
+
{
|
86 |
+
if (!$value = $column->getFilter()->getValue()) {
|
87 |
+
return;
|
88 |
+
}
|
89 |
+
|
90 |
+
$this->getCollection()->addStoreFilter($value);
|
91 |
+
}
|
92 |
+
public function getRowUrl($row)
|
93 |
+
{
|
94 |
+
return '';
|
95 |
+
}
|
96 |
+
|
97 |
+
protected function _getStore()
|
98 |
+
{
|
99 |
+
$storeId = (int) $this->getRequest()->getParam('store', 0);
|
100 |
+
return Mage::app()->getStore($storeId);
|
101 |
+
}
|
102 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Block/Grid.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Cms_Block_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('strakerCmsBlocks');
|
9 |
+
$this->setDefaultSort('block_identifier');
|
10 |
+
$this->setDefaultDir('ASC');
|
11 |
+
$this->setSaveParametersInSession(true);
|
12 |
+
$this->setUseAjax(false);
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareCollection()
|
16 |
+
{
|
17 |
+
$collection = Mage::getModel('cms/block')->getCollection();
|
18 |
+
/* @var $collection Mage_Cms_Model_Mysql4_Block_Collection */
|
19 |
+
$this->setCollection($collection);
|
20 |
+
return parent::_prepareCollection();
|
21 |
+
}
|
22 |
+
|
23 |
+
protected function _prepareColumns()
|
24 |
+
{
|
25 |
+
$baseUrl = $this->getUrl();
|
26 |
+
|
27 |
+
$this->addColumn('title', array(
|
28 |
+
'header' => Mage::helper('cms')->__('Title'),
|
29 |
+
'align' => 'left',
|
30 |
+
'index' => 'title',
|
31 |
+
));
|
32 |
+
|
33 |
+
$this->addColumn('identifier', array(
|
34 |
+
'header' => Mage::helper('cms')->__('Identifier'),
|
35 |
+
'align' => 'left',
|
36 |
+
'index' => 'identifier'
|
37 |
+
));
|
38 |
+
|
39 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
40 |
+
$this->addColumn('store_id', array(
|
41 |
+
'header' => Mage::helper('cms')->__('Store View'),
|
42 |
+
'index' => 'store_id',
|
43 |
+
'type' => 'store',
|
44 |
+
'store_all' => true,
|
45 |
+
'store_view' => true,
|
46 |
+
'sortable' => false,
|
47 |
+
'filter_condition_callback'
|
48 |
+
=> array($this, '_filterStoreCondition'),
|
49 |
+
));
|
50 |
+
}
|
51 |
+
|
52 |
+
$this->addColumn('is_active', array(
|
53 |
+
'header' => Mage::helper('cms')->__('Status'),
|
54 |
+
'index' => 'is_active',
|
55 |
+
'type' => 'options',
|
56 |
+
'options' => array(
|
57 |
+
0 => Mage::helper('cms')->__('Disabled'),
|
58 |
+
1 => Mage::helper('cms')->__('Enabled')
|
59 |
+
),
|
60 |
+
));
|
61 |
+
|
62 |
+
$this->addColumn('creation_time', array(
|
63 |
+
'header' => Mage::helper('cms')->__('Date Created'),
|
64 |
+
'index' => 'creation_time',
|
65 |
+
'type' => 'datetime',
|
66 |
+
));
|
67 |
+
|
68 |
+
$this->addColumn('update_time', array(
|
69 |
+
'header' => Mage::helper('cms')->__('Last Modified'),
|
70 |
+
'index' => 'update_time',
|
71 |
+
'type' => 'datetime',
|
72 |
+
));
|
73 |
+
|
74 |
+
return parent::_prepareColumns();
|
75 |
+
}
|
76 |
+
|
77 |
+
protected function _afterLoadCollection()
|
78 |
+
{
|
79 |
+
$this->getCollection()->walk('afterLoad');
|
80 |
+
parent::_afterLoadCollection();
|
81 |
+
}
|
82 |
+
|
83 |
+
protected function _filterStoreCondition($collection, $column)
|
84 |
+
{
|
85 |
+
if (!$value = $column->getFilter()->getValue()) {
|
86 |
+
return;
|
87 |
+
}
|
88 |
+
|
89 |
+
$this->getCollection()->addStoreFilter($value);
|
90 |
+
}
|
91 |
+
|
92 |
+
protected function _prepareMassaction()
|
93 |
+
{
|
94 |
+
$this->setMassactionIdField('entity_id');
|
95 |
+
$this->getMassactionBlock()->setFormFieldName('cms_block');
|
96 |
+
|
97 |
+
$this->getMassactionBlock()->addItem('add', array(
|
98 |
+
'label'=> Mage::helper('catalog')->__('Add to Confirm Page'),
|
99 |
+
'url' => $this->getUrl('*/*/addtoconfirm'),
|
100 |
+
'selected' => 1
|
101 |
+
));
|
102 |
+
$this->getMassactionBlock()->setTemplate('straker/new/cms/page/massaction.phtml');
|
103 |
+
|
104 |
+
//todo: refine this
|
105 |
+
$hiddenParams = '<input type="hidden" name="store" value="'.$this->_getStore()->getId().'" />';
|
106 |
+
$hiddenParams .= '<input type="hidden" name="attr" value="'.$this->getAttr().'" />';
|
107 |
+
$this->getMassactionBlock()->setHiddenParams($hiddenParams);
|
108 |
+
|
109 |
+
|
110 |
+
Mage::dispatchEvent('adminhtml_strakertranslation_new_products_grid_prepare_massaction', array('block' => $this));
|
111 |
+
return $this;
|
112 |
+
}
|
113 |
+
|
114 |
+
public function getRowUrl($row)
|
115 |
+
{
|
116 |
+
return '';
|
117 |
+
}
|
118 |
+
|
119 |
+
protected function _getStore()
|
120 |
+
{
|
121 |
+
$storeId = (int) $this->getRequest()->getParam('store', 0);
|
122 |
+
return Mage::app()->getStore($storeId);
|
123 |
+
}
|
124 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Page.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Cms_Page extends Mage_Adminhtml_Block_Widget_Container
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Set template
|
6 |
+
*/
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
parent::__construct();
|
10 |
+
$this->setTemplate('straker/new/cms/page.phtml');
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Prepare button and grid
|
15 |
+
*
|
16 |
+
* @return Mage_Adminhtml_Block_Catalog_Product
|
17 |
+
*/
|
18 |
+
protected function _prepareLayout()
|
19 |
+
{
|
20 |
+
$this->setChild('grid', $this->getLayout()->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_page_grid', 'cms_page.grid', array('setup_store_id' => $this->getSetupStoreId(), 'attr' => $this->getAttr())));
|
21 |
+
return parent::_prepareLayout();
|
22 |
+
}
|
23 |
+
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Render grid
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
public function getGridHtml()
|
31 |
+
{
|
32 |
+
return $this->getChildHtml('grid');
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Check whether it is single store mode
|
37 |
+
*
|
38 |
+
* @return bool
|
39 |
+
*/
|
40 |
+
public function isSingleStoreMode()
|
41 |
+
{
|
42 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
43 |
+
return false;
|
44 |
+
}
|
45 |
+
return true;
|
46 |
+
}
|
47 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Page/Attribute.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Cms_Page_Attribute extends Mage_Adminhtml_Block_Widget_Container{
|
3 |
+
|
4 |
+
private static $_cmsPageAttributes = array(
|
5 |
+
'title' => 'Title',
|
6 |
+
'meta_keywords' => 'Meta Keywords',
|
7 |
+
'meta_description' => 'Meta Description',
|
8 |
+
'content_heading' => 'Content Heading',
|
9 |
+
'content' => 'Content',
|
10 |
+
);
|
11 |
+
|
12 |
+
protected function _beforeToHtml(){
|
13 |
+
$this->setTemplate('straker/new/cms/page/attributes.phtml');
|
14 |
+
}
|
15 |
+
|
16 |
+
public function getAttributes(){
|
17 |
+
return self::$_cmsPageAttributes;
|
18 |
+
}
|
19 |
+
|
20 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Page/Confirm.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Cms_Page_Confirm extends Mage_Adminhtml_Block_Widget_Container
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Set template
|
6 |
+
*/
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
parent::__construct();
|
10 |
+
$this->setTemplate('straker/new/cms/page/confirm.phtml');
|
11 |
+
}
|
12 |
+
|
13 |
+
|
14 |
+
protected function _prepareLayout()
|
15 |
+
{
|
16 |
+
$this->_addButton('submit', array(
|
17 |
+
'label' => Mage::helper('catalog')->__('Submit'),
|
18 |
+
'onclick' => "$('submit-new-job-form').submit();",
|
19 |
+
'class' => 'task'
|
20 |
+
));
|
21 |
+
|
22 |
+
$this->setChild('grid', $this->getLayout()->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_page_confirm_grid', 'cms_page.grid', array('store' => $this->getStore(), 'cms_page' => $this->getCmsPage(), 'attr' => $this->getAttr())));
|
23 |
+
return parent::_prepareLayout();
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Render grid
|
28 |
+
*
|
29 |
+
* @return string
|
30 |
+
*/
|
31 |
+
public function getGridHtml()
|
32 |
+
{
|
33 |
+
return $this->getChildHtml('grid');
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Check whether it is single store mode
|
38 |
+
*
|
39 |
+
* @return bool
|
40 |
+
*/
|
41 |
+
public function isSingleStoreMode()
|
42 |
+
{
|
43 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
44 |
+
return false;
|
45 |
+
}
|
46 |
+
return true;
|
47 |
+
}
|
48 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Page/Confirm/Grid.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Cms_Page_Confirm_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('strakerCmsPages');
|
9 |
+
$this->setDefaultSort('identifier');
|
10 |
+
$this->setDefaultDir('ASC');
|
11 |
+
$this->setUseAjax(false);
|
12 |
+
$this->setFilterVisibility(false);
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareCollection()
|
16 |
+
{
|
17 |
+
$collection = Mage::getModel('cms/page')->getCollection()->addFieldToFilter('page_id', array('in' => $this->getCmsPage()));
|
18 |
+
/* @var $collection Mage_Cms_Model_Mysql4_Page_Collection */
|
19 |
+
$collection->setFirstStoreFlag(true);
|
20 |
+
$this->setCollection($collection);
|
21 |
+
|
22 |
+
return parent::_prepareCollection();
|
23 |
+
}
|
24 |
+
|
25 |
+
protected function _prepareColumns()
|
26 |
+
{
|
27 |
+
$baseUrl = $this->getUrl();
|
28 |
+
|
29 |
+
$this->addColumn('title', array(
|
30 |
+
'header' => Mage::helper('cms')->__('Title'),
|
31 |
+
'align' => 'left',
|
32 |
+
'index' => 'title',
|
33 |
+
));
|
34 |
+
|
35 |
+
$this->addColumn('identifier', array(
|
36 |
+
'header' => Mage::helper('cms')->__('URL Key'),
|
37 |
+
'align' => 'left',
|
38 |
+
'index' => 'identifier',
|
39 |
+
));
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Check is single store mode
|
43 |
+
*/
|
44 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
45 |
+
$this->addColumn('store_id', array(
|
46 |
+
'header' => Mage::helper('cms')->__('Store View'),
|
47 |
+
'index' => 'store_id',
|
48 |
+
'type' => 'store',
|
49 |
+
'store_all' => true,
|
50 |
+
'store_view' => true,
|
51 |
+
'sortable' => false,
|
52 |
+
));
|
53 |
+
}
|
54 |
+
|
55 |
+
$this->addColumn('is_active', array(
|
56 |
+
'header' => Mage::helper('cms')->__('Status'),
|
57 |
+
'index' => 'is_active',
|
58 |
+
'type' => 'options',
|
59 |
+
'options' => Mage::getSingleton('cms/page')->getAvailableStatuses(),
|
60 |
+
));
|
61 |
+
|
62 |
+
$this->addColumn('creation_time', array(
|
63 |
+
'header' => Mage::helper('cms')->__('Date Created'),
|
64 |
+
'index' => 'creation_time',
|
65 |
+
'type' => 'datetime',
|
66 |
+
));
|
67 |
+
|
68 |
+
$this->addColumn('update_time', array(
|
69 |
+
'header' => Mage::helper('cms')->__('Last Modified'),
|
70 |
+
'index' => 'update_time',
|
71 |
+
'type' => 'datetime',
|
72 |
+
));
|
73 |
+
|
74 |
+
$this->addColumn('page_actions', array(
|
75 |
+
'header' => Mage::helper('cms')->__('Action'),
|
76 |
+
'width' => 10,
|
77 |
+
'sortable' => false,
|
78 |
+
'renderer' => 'adminhtml/cms_page_grid_renderer_action',
|
79 |
+
));
|
80 |
+
|
81 |
+
return parent::_prepareColumns();
|
82 |
+
}
|
83 |
+
|
84 |
+
protected function _afterLoadCollection()
|
85 |
+
{
|
86 |
+
$this->getCollection()->walk('afterLoad');
|
87 |
+
parent::_afterLoadCollection();
|
88 |
+
}
|
89 |
+
|
90 |
+
protected function _filterStoreCondition($collection, $column)
|
91 |
+
{
|
92 |
+
if (!$value = $column->getFilter()->getValue()) {
|
93 |
+
return;
|
94 |
+
}
|
95 |
+
|
96 |
+
$this->getCollection()->addStoreFilter($value);
|
97 |
+
}
|
98 |
+
|
99 |
+
public function getRowUrl($row)
|
100 |
+
{
|
101 |
+
return '';
|
102 |
+
}
|
103 |
+
|
104 |
+
protected function _getStore()
|
105 |
+
{
|
106 |
+
$storeId = (int) $this->getRequest()->getParam('store', 0);
|
107 |
+
return Mage::app()->getStore($storeId);
|
108 |
+
}
|
109 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Cms/Page/Grid.php
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Cms_Page_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('strakerCmsPages');
|
9 |
+
$this->setDefaultSort('identifier');
|
10 |
+
$this->setDefaultDir('ASC');
|
11 |
+
$this->setSaveParametersInSession(true);
|
12 |
+
$this->setUseAjax(false);
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareCollection()
|
16 |
+
{
|
17 |
+
$collection = Mage::getModel('cms/page')->getCollection();
|
18 |
+
/* @var $collection Mage_Cms_Model_Mysql4_Page_Collection */
|
19 |
+
$collection->setFirstStoreFlag(true);
|
20 |
+
$this->setCollection($collection);
|
21 |
+
|
22 |
+
return parent::_prepareCollection();
|
23 |
+
}
|
24 |
+
|
25 |
+
protected function _prepareColumns()
|
26 |
+
{
|
27 |
+
$baseUrl = $this->getUrl();
|
28 |
+
|
29 |
+
$this->addColumn('title', array(
|
30 |
+
'header' => Mage::helper('cms')->__('Title'),
|
31 |
+
'align' => 'left',
|
32 |
+
'index' => 'title',
|
33 |
+
));
|
34 |
+
|
35 |
+
$this->addColumn('identifier', array(
|
36 |
+
'header' => Mage::helper('cms')->__('URL Key'),
|
37 |
+
'align' => 'left',
|
38 |
+
'index' => 'identifier'
|
39 |
+
));
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Check is single store mode
|
43 |
+
*/
|
44 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
45 |
+
$this->addColumn('store_id', array(
|
46 |
+
'header' => Mage::helper('cms')->__('Store View'),
|
47 |
+
'index' => 'store_id',
|
48 |
+
'type' => 'store',
|
49 |
+
'store_all' => true,
|
50 |
+
'store_view' => true,
|
51 |
+
'sortable' => false,
|
52 |
+
'filter_condition_callback'
|
53 |
+
=> array($this, '_filterStoreCondition'),
|
54 |
+
));
|
55 |
+
}
|
56 |
+
|
57 |
+
$this->addColumn('is_active', array(
|
58 |
+
'header' => Mage::helper('cms')->__('Status'),
|
59 |
+
'index' => 'is_active',
|
60 |
+
'type' => 'options',
|
61 |
+
'options' => Mage::getSingleton('cms/page')->getAvailableStatuses()
|
62 |
+
));
|
63 |
+
|
64 |
+
$this->addColumn('creation_time', array(
|
65 |
+
'header' => Mage::helper('cms')->__('Date Created'),
|
66 |
+
'index' => 'creation_time',
|
67 |
+
'type' => 'datetime',
|
68 |
+
));
|
69 |
+
|
70 |
+
$this->addColumn('update_time', array(
|
71 |
+
'header' => Mage::helper('cms')->__('Last Modified'),
|
72 |
+
'index' => 'update_time',
|
73 |
+
'type' => 'datetime',
|
74 |
+
));
|
75 |
+
|
76 |
+
$this->addColumn('page_actions', array(
|
77 |
+
'header' => Mage::helper('cms')->__('Action'),
|
78 |
+
'width' => 10,
|
79 |
+
'sortable' => false,
|
80 |
+
'filter' => false,
|
81 |
+
'renderer' => 'adminhtml/cms_page_grid_renderer_action',
|
82 |
+
));
|
83 |
+
|
84 |
+
return parent::_prepareColumns();
|
85 |
+
}
|
86 |
+
|
87 |
+
protected function _afterLoadCollection()
|
88 |
+
{
|
89 |
+
$this->getCollection()->walk('afterLoad');
|
90 |
+
parent::_afterLoadCollection();
|
91 |
+
}
|
92 |
+
|
93 |
+
protected function _filterStoreCondition($collection, $column)
|
94 |
+
{
|
95 |
+
if (!$value = $column->getFilter()->getValue()) {
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
|
99 |
+
$this->getCollection()->addStoreFilter($value);
|
100 |
+
}
|
101 |
+
|
102 |
+
protected function _prepareMassaction()
|
103 |
+
{
|
104 |
+
$this->setMassactionIdField('entity_id');
|
105 |
+
$this->getMassactionBlock()->setFormFieldName('cms_page');
|
106 |
+
|
107 |
+
$this->getMassactionBlock()->addItem('add', array(
|
108 |
+
'label'=> Mage::helper('catalog')->__('Add to Confirm Page'),
|
109 |
+
'url' => $this->getUrl('*/*/addtoconfirm'),
|
110 |
+
'selected' => 1
|
111 |
+
));
|
112 |
+
$this->getMassactionBlock()->setTemplate('straker/new/cms/page/massaction.phtml');
|
113 |
+
|
114 |
+
//todo: refine this
|
115 |
+
$hiddenParams = '<input type="hidden" name="store" value="'.$this->_getStore()->getId().'" />';
|
116 |
+
$hiddenParams .= '<input type="hidden" name="attr" value="'.$this->getAttr().'" />';
|
117 |
+
$this->getMassactionBlock()->setHiddenParams($hiddenParams);
|
118 |
+
|
119 |
+
|
120 |
+
Mage::dispatchEvent('adminhtml_strakertranslation_new_products_grid_prepare_massaction', array('block' => $this));
|
121 |
+
return $this;
|
122 |
+
}
|
123 |
+
|
124 |
+
public function getRowUrl($row)
|
125 |
+
{
|
126 |
+
return '';
|
127 |
+
}
|
128 |
+
|
129 |
+
protected function _getStore()
|
130 |
+
{
|
131 |
+
$storeId = (int) $this->getRequest()->getParam('store', 0);
|
132 |
+
return Mage::app()->getStore($storeId);
|
133 |
+
}
|
134 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/New/Type.php
CHANGED
@@ -12,7 +12,7 @@ class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Type exten
|
|
12 |
$types = Mage::getModel('strakertranslations_easytranslationplatform/job_type')->getCollection();
|
13 |
$html = '';
|
14 |
foreach ($types as $type){
|
15 |
-
$html .= '<div><a class="job-type-btn" href="' . Mage::helper("adminhtml")->getUrl("adminhtml/straker_".strtolower($type->getTypeName())."/new", array("store" => $storeId)) . '">' . $type->getTypeName() . '</a></div>';
|
16 |
|
17 |
}
|
18 |
return $html;
|
12 |
$types = Mage::getModel('strakertranslations_easytranslationplatform/job_type')->getCollection();
|
13 |
$html = '';
|
14 |
foreach ($types as $type){
|
15 |
+
$html .= '<div><a class="job-type-btn" href="' . Mage::helper("adminhtml")->getUrl("adminhtml/straker_".str_replace(' ','_',strtolower($type->getTypeName()))."/new", array("store" => $storeId)) . '">' . $type->getTypeName() . '</a></div>';
|
16 |
|
17 |
}
|
18 |
return $html;
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Template/Grid/Renderer/Action.php
CHANGED
@@ -8,7 +8,7 @@ class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Template_Grid_
|
|
8 |
|
9 |
$buttonText = $row->getStatusId() == 4 ? $this->__('Confirm') : $this->__('View');
|
10 |
|
11 |
-
$out = '<button id="button-update-'.$row->getId().'" style="margin: 5px; display: block;" onclick="event.stopPropagation(); setLocation(\'' . Mage::helper("adminhtml")->getUrl("adminhtml/straker_".strtolower($row->getTypeName()).'/', array('job_id' => $row->getId())) . '\')" title="View" type="button" style="">'.$buttonText.'</button>';
|
12 |
return $out;
|
13 |
}
|
14 |
}
|
8 |
|
9 |
$buttonText = $row->getStatusId() == 4 ? $this->__('Confirm') : $this->__('View');
|
10 |
|
11 |
+
$out = '<button id="button-update-'.$row->getId().'" style="margin: 5px; display: block;" onclick="event.stopPropagation(); setLocation(\'' . Mage::helper("adminhtml")->getUrl("adminhtml/straker_".str_replace(' ', '_', strtolower($row->getTypeName())).'/', array('job_id' => $row->getId())) . '\')" title="View" type="button" style="">'.$buttonText.'</button>';
|
12 |
return $out;
|
13 |
}
|
14 |
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Template/Grid/Renderer/CmsOriginTitle.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Template_Grid_Renderer_CmsOriginTitle
|
3 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
4 |
+
{
|
5 |
+
public function render(Varien_Object $row)
|
6 |
+
{
|
7 |
+
$origin = $row->getOrigin() ? json_decode($row->getOrigin(), true): array();
|
8 |
+
return $origin['title'] ? $origin['title']:'';
|
9 |
+
}
|
10 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Template/Grid/Renderer/CmsVersion.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Template_Grid_Renderer_CmsVersion
|
3 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
4 |
+
{
|
5 |
+
public function render(Varien_Object $row)
|
6 |
+
{
|
7 |
+
if($row->getVersion()){
|
8 |
+
if($row->getBlockId()){
|
9 |
+
$link = Mage::helper("adminhtml")->getUrl("adminhtml/cms_block/edit",array("block_id"=>$row->getNewEntityId()));
|
10 |
+
}
|
11 |
+
else{
|
12 |
+
$link = Mage::helper("adminhtml")->getUrl("adminhtml/cms_page/edit",array("page_id"=>$row->getNewEntityId()));
|
13 |
+
}
|
14 |
+
return '<a href="'.$link.'">View Published</a>';
|
15 |
+
}
|
16 |
+
else{
|
17 |
+
return 'Not Published';
|
18 |
+
}
|
19 |
+
}
|
20 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Template/Grid/Renderer/Status.php
CHANGED
@@ -4,6 +4,8 @@ class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Template_Grid_
|
|
4 |
{
|
5 |
public function render(Varien_Object $row){
|
6 |
if (get_class($row) == get_class(Mage::getModel('strakertranslations_easytranslationplatform/job') )) {
|
|
|
|
|
7 |
//if status is QUEUED
|
8 |
if ($row->getStatusName() == 'QUEUED') {
|
9 |
$quote = $row->getQuote();
|
4 |
{
|
5 |
public function render(Varien_Object $row){
|
6 |
if (get_class($row) == get_class(Mage::getModel('strakertranslations_easytranslationplatform/job') )) {
|
7 |
+
$html = '';
|
8 |
+
|
9 |
//if status is QUEUED
|
10 |
if ($row->getStatusName() == 'QUEUED') {
|
11 |
$quote = $row->getQuote();
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Block/Adminhtml/Template/Grid/Renderer/StrakerTranslated.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Template_Grid_Renderer_StrakerTranslated
|
3 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
4 |
+
{
|
5 |
+
public function render(Varien_Object $row)
|
6 |
+
{
|
7 |
+
if($row->getStrakerTranslated()){
|
8 |
+
return 'Yes';
|
9 |
+
}
|
10 |
+
else{
|
11 |
+
return 'No';
|
12 |
+
}
|
13 |
+
}
|
14 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Helper/Data.php
CHANGED
@@ -31,4 +31,31 @@ class StrakerTranslations_EasyTranslationPlatform_Helper_Data extends Mage_Core_
|
|
31 |
|
32 |
return $sourceText . ' > ' . $destinationText;
|
33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
31 |
|
32 |
return $sourceText . ' > ' . $destinationText;
|
33 |
}
|
34 |
+
|
35 |
+
public function getCmsCreatedMessage(){
|
36 |
+
$message = '';
|
37 |
+
if (Mage::registry('cms_block')){
|
38 |
+
$strakerCmsBlockModel = Mage::getModel('strakertranslations_easytranslationplatform/job_cms_block')->load(Mage::registry('cms_block')->getId(), 'new_entity_id');
|
39 |
+
if($strakerCmsBlockModel->getId()) {
|
40 |
+
$message = '<div id="straker-cms-title-message">Created by<span id="straker-icon">Straker Translations</span>';
|
41 |
+
$job = Mage::getModel('strakertranslations_easytranslationplatform/job')->load($strakerCmsBlockModel->getJobId());
|
42 |
+
if ($job->getTl()) {
|
43 |
+
$message.= ', Target Language: '.$job->getTl();
|
44 |
+
}
|
45 |
+
$message .= '</div>';
|
46 |
+
}
|
47 |
+
}
|
48 |
+
elseif(Mage::registry('cms_page')) {
|
49 |
+
$strakerCmsPageModel = Mage::getModel('strakertranslations_easytranslationplatform/job_cms_page')->load(Mage::registry('cms_page')->getId(), 'new_entity_id');
|
50 |
+
if($strakerCmsPageModel->getId()){
|
51 |
+
$message = '<div id="straker-cms-title-message">Created by<span id="straker-icon">Straker Translations</span>';
|
52 |
+
$job = Mage::getModel('strakertranslations_easytranslationplatform/job')->load($strakerCmsPageModel->getJobId());
|
53 |
+
if ($job->getTl()) {
|
54 |
+
$message.= ', Target Language: '.$job->getTl();
|
55 |
+
}
|
56 |
+
$message .= '</div>';
|
57 |
+
}
|
58 |
+
}
|
59 |
+
return $message;
|
60 |
+
}
|
61 |
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Cms/Block/Attributes.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 19/05/16
|
6 |
+
* Time: 3:28 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Cms_Block_Attributes extends Mage_Core_Model_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_block_attributes');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Cms/Block/Translate.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:07 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Cms_Block_Translate extends Mage_Core_Model_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_block_translate');
|
14 |
+
}
|
15 |
+
|
16 |
+
public function importTranslation(){
|
17 |
+
|
18 |
+
$newEntityId =Mage::getModel('strakertranslations_easytranslationplatform/job_cms_block')->load($this->getJobCmsId())
|
19 |
+
->getNewEntityId();
|
20 |
+
|
21 |
+
|
22 |
+
if ($this->getTranslate()){
|
23 |
+
|
24 |
+
$writeConnection = $this->_getConnection();
|
25 |
+
|
26 |
+
$query = 'UPDATE `'.Mage::getSingleton('core/resource')->getTableName('cms/block')
|
27 |
+
. '` SET '.$this->getColumnName() .' = \''.addslashes($this->getTranslate()).' \' WHERE block_id = '.$newEntityId;
|
28 |
+
|
29 |
+
|
30 |
+
$writeConnection->query($query);
|
31 |
+
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
$this->setIsImported(1)->save();
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
private function _getConnection() {
|
40 |
+
return Mage::getSingleton('core/resource')->getConnection('core_write');
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Cms/Page/Attributes.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 19/05/16
|
6 |
+
* Time: 3:28 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Cms_Page_Attributes extends Mage_Core_Model_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_page_attributes');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Cms/Page/Translate.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:06 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Cms_Page_Translate extends Mage_Core_Model_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_page_translate');
|
14 |
+
}
|
15 |
+
|
16 |
+
public function importTranslation(){
|
17 |
+
|
18 |
+
$newEntityId =Mage::getModel('strakertranslations_easytranslationplatform/job_cms_page')->load($this->getJobCmsId())
|
19 |
+
->getNewEntityId();
|
20 |
+
|
21 |
+
|
22 |
+
if ($this->getTranslate()){
|
23 |
+
|
24 |
+
$writeConnection = $this->_getConnection();
|
25 |
+
|
26 |
+
$query = 'UPDATE `'.Mage::getSingleton('core/resource')->getTableName('cms/page')
|
27 |
+
. '` SET '.$this->getColumnName() .' = \''.addslashes($this->getTranslate()).' \' WHERE page_id = '.$newEntityId;
|
28 |
+
|
29 |
+
|
30 |
+
$writeConnection->query($query);
|
31 |
+
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
$this->setIsImported(1)->save();
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
private function _getConnection() {
|
40 |
+
return Mage::getSingleton('core/resource')->getConnection('core_write');
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Job.php
CHANGED
@@ -108,6 +108,29 @@ class StrakerTranslations_EasyTranslationPlatform_Model_Job extends Mage_Core_Mo
|
|
108 |
return $this;
|
109 |
}
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
public function array_to_xml( $data, &$xml_data ) {
|
112 |
foreach( $data as $key => $value ) {
|
113 |
if( is_array($value) ) {
|
@@ -290,6 +313,92 @@ class StrakerTranslations_EasyTranslationPlatform_Model_Job extends Mage_Core_Mo
|
|
290 |
return $this;
|
291 |
}
|
292 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
protected function _createProductTranslateFile() {
|
294 |
|
295 |
$_xml = '<?xml version="1.0" encoding="utf-8"?><root>';
|
@@ -456,6 +565,22 @@ class StrakerTranslations_EasyTranslationPlatform_Model_Job extends Mage_Core_Mo
|
|
456 |
return $this;
|
457 |
}
|
458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
public function updateQuote(){
|
460 |
|
461 |
if ($this->getJobKey()){
|
@@ -596,7 +721,7 @@ class StrakerTranslations_EasyTranslationPlatform_Model_Job extends Mage_Core_Mo
|
|
596 |
}
|
597 |
|
598 |
protected function _getType(){
|
599 |
-
return strtolower($this->getTypeName());
|
600 |
}
|
601 |
|
602 |
public function updatePayment(){
|
@@ -626,21 +751,70 @@ class StrakerTranslations_EasyTranslationPlatform_Model_Job extends Mage_Core_Mo
|
|
626 |
$updatedIds = array();
|
627 |
$writeConnection = $this->getWriteAdapter();
|
628 |
|
|
|
|
|
|
|
|
|
629 |
foreach ($collection as $translation) {
|
630 |
$translation->setStoreId($this->getStoreId())->importTranslation();
|
631 |
|
632 |
-
$entityId= call_user_func(array($translation, '
|
633 |
|
634 |
if (empty($updatedIds[$entityId])){
|
635 |
$updatedIds[$entityId] = true;
|
636 |
$prefix = Mage::getConfig()->getTablePrefix()->__toString();
|
637 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
638 |
}
|
639 |
}
|
640 |
|
641 |
return true;
|
642 |
}
|
643 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
644 |
public function isPublished()
|
645 |
{
|
646 |
if ($this->getStatusId() == 5) {
|
108 |
return $this;
|
109 |
}
|
110 |
|
111 |
+
protected function addCmsTranslateOriginal($Column, $cmsDataCollection, $type='page',$jobCmsIds) {
|
112 |
+
|
113 |
+
$writeConnection = $this->getWriteAdapter();
|
114 |
+
|
115 |
+
$query = 'INSERT INTO `'.Mage::getSingleton('core/resource')->getTableName('strakertranslations_easytranslationplatform/cms_'.$type.'_translate').'` (`job_id`, `cms_'.$type.'_id`, `column_name`, `original` , `job_cms_id`) VALUES ';
|
116 |
+
$queryVals = array();
|
117 |
+
foreach ($cmsDataCollection as $cmsData) {
|
118 |
+
|
119 |
+
foreach ($jobCmsIds as $k => $v){
|
120 |
+
if ($cmsData[$type.'_id'] == $v){
|
121 |
+
$jobCmsId = $k;
|
122 |
+
break;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
$queryVals[] = '(' . $this->getId() . ', ' . $cmsData[$type.'_id'] . ', \'' . addslashes($Column). '\', \'' . addslashes($cmsData[$Column]).'\', ' . $jobCmsId . ')';
|
127 |
+
}
|
128 |
+
|
129 |
+
$writeConnection->query( $query . implode(',', $queryVals));
|
130 |
+
|
131 |
+
return $this;
|
132 |
+
}
|
133 |
+
|
134 |
public function array_to_xml( $data, &$xml_data ) {
|
135 |
foreach( $data as $key => $value ) {
|
136 |
if( is_array($value) ) {
|
313 |
return $this;
|
314 |
}
|
315 |
|
316 |
+
|
317 |
+
public function addCmsEntities($ids, $Columns = array(), $type = 'page'){
|
318 |
+
|
319 |
+
if (!$this->getId()){
|
320 |
+
if (!$this->getStoreId()){
|
321 |
+
Mage::throwException('Error: Missing Store Id');
|
322 |
+
}
|
323 |
+
$this->setSourceStore(Mage::getStoreConfig('straker/general/source',$this->getStoreId()));
|
324 |
+
$this->save();
|
325 |
+
}
|
326 |
+
|
327 |
+
foreach ($Columns as $Column) {
|
328 |
+
$this->_attributes[] =
|
329 |
+
Mage::getModel('strakertranslations_easytranslationplatform/cms_'.$type.'_attributes')
|
330 |
+
->setJobId($this->getId())
|
331 |
+
->setColumnName($Column)
|
332 |
+
->save();
|
333 |
+
}
|
334 |
+
|
335 |
+
$writeConnection = $this->getWriteAdapter();
|
336 |
+
|
337 |
+
$searchQuery = 'SELECT * FROM ' .Mage::getSingleton('core/resource')->getTableName('cms/'.$type)
|
338 |
+
.' WHERE '.$type.'_id IN ('.implode(',',$ids).')';
|
339 |
+
|
340 |
+
$cmsDataCollection = $writeConnection->fetchAll($searchQuery);
|
341 |
+
|
342 |
+
$query = 'INSERT INTO `'
|
343 |
+
.Mage::getSingleton('core/resource')->getTableName('strakertranslations_easytranslationplatform/job_cms'.$type)
|
344 |
+
.'` (`'.$type.'_id`, `job_id` , `origin`) VALUES ';
|
345 |
+
|
346 |
+
$queryVals = array();
|
347 |
+
|
348 |
+
foreach ($cmsDataCollection as $cmsData) {
|
349 |
+
$id = $cmsData[$type.'_id'];
|
350 |
+
|
351 |
+
unset($cmsData[$type.'_id']);
|
352 |
+
|
353 |
+
|
354 |
+
$queryVals[] = "(" . (int) $id . ", ". $this->getId() . ", '". addslashes(json_encode($cmsData)) . "')";
|
355 |
+
}
|
356 |
+
|
357 |
+
$writeConnection->query( $query . implode(',', $queryVals));
|
358 |
+
|
359 |
+
$query = 'SELECT id, '.$type.'_id FROM '.Mage::getSingleton('core/resource')->getTableName('strakertranslations_easytranslationplatform/job_cms'.$type)
|
360 |
+
.' WHERE job_id = '. $this->getId();
|
361 |
+
|
362 |
+
$jobCmsIds = $writeConnection->fetchPairs($query);
|
363 |
+
|
364 |
+
foreach ($Columns as $Column) {
|
365 |
+
$this->addCmsTranslateOriginal($Column, $cmsDataCollection, $type,$jobCmsIds);
|
366 |
+
}
|
367 |
+
|
368 |
+
|
369 |
+
$this->_createCMSTranslateFile($type);
|
370 |
+
|
371 |
+
|
372 |
+
return $this;
|
373 |
+
|
374 |
+
|
375 |
+
|
376 |
+
}
|
377 |
+
|
378 |
+
protected function _createCMSTranslateFile($type) {
|
379 |
+
|
380 |
+
$_xml = '<?xml version="1.0" encoding="utf-8"?><root>';
|
381 |
+
|
382 |
+
$cmsTranslateCollection = Mage::getModel('strakertranslations_easytranslationplatform/cms_'.$type.'_translate')->getCollection($this->getWriteAdapter());
|
383 |
+
$cmsTranslateCollection->addFieldToFilter('job_id',$this->getId());
|
384 |
+
|
385 |
+
foreach ($cmsTranslateCollection as $cmsTranslate ){
|
386 |
+
|
387 |
+
$_xml .= '<data name="cms_' .$type. '_' .$cmsTranslate->getCmsId().'_'.$cmsTranslate->getColumnName().'_'.'" ' ;
|
388 |
+
$_xml .= 'content_context="'.$cmsTranslate->getColumnName().'" ';
|
389 |
+
$_xml .= 'content_id="'. $cmsTranslate->getId() .'">';
|
390 |
+
$_xml .= '<value><![CDATA['.$cmsTranslate->getOriginal().']]></value></data>';
|
391 |
+
}
|
392 |
+
$_xml .='</root>';
|
393 |
+
|
394 |
+
file_put_contents(MAGENTO_ROOT.$this->_translateFilePath.'job'.$this->getId().'.xml',$_xml);
|
395 |
+
$this->setSourceFile('job'.$this->getId().'.xml')->save() ;
|
396 |
+
|
397 |
+
return $this;
|
398 |
+
|
399 |
+
|
400 |
+
}
|
401 |
+
|
402 |
protected function _createProductTranslateFile() {
|
403 |
|
404 |
$_xml = '<?xml version="1.0" encoding="utf-8"?><root>';
|
565 |
return $this;
|
566 |
}
|
567 |
|
568 |
+
public function submitCmsPage($cmsIds,$columns = array('title','content')){
|
569 |
+
|
570 |
+
$this->setTypeId(5);
|
571 |
+
$this->addCmsEntities($cmsIds,$columns,'page')
|
572 |
+
->_summitJob();
|
573 |
+
return $this;
|
574 |
+
}
|
575 |
+
|
576 |
+
public function submitCmsblock($cmsIds,$columns = array('title','content')){
|
577 |
+
|
578 |
+
$this->setTypeId(6);
|
579 |
+
$this->addCmsEntities($cmsIds,$columns,'block')
|
580 |
+
->_summitJob();
|
581 |
+
return $this;
|
582 |
+
}
|
583 |
+
|
584 |
public function updateQuote(){
|
585 |
|
586 |
if ($this->getJobKey()){
|
721 |
}
|
722 |
|
723 |
protected function _getType(){
|
724 |
+
return str_replace(' ', '_', strtolower($this->getTypeName()));
|
725 |
}
|
726 |
|
727 |
public function updatePayment(){
|
751 |
$updatedIds = array();
|
752 |
$writeConnection = $this->getWriteAdapter();
|
753 |
|
754 |
+
if (in_array($this->_getType() , array('cms_block','cms_page'))){
|
755 |
+
$this->createNewCms($entityIds);
|
756 |
+
}
|
757 |
+
|
758 |
foreach ($collection as $translation) {
|
759 |
$translation->setStoreId($this->getStoreId())->importTranslation();
|
760 |
|
761 |
+
$entityId= call_user_func(array($translation, 'getData'),strtolower(str_replace(' ','_',$this->getTypeName().'_id')));
|
762 |
|
763 |
if (empty($updatedIds[$entityId])){
|
764 |
$updatedIds[$entityId] = true;
|
765 |
$prefix = Mage::getConfig()->getTablePrefix()->__toString();
|
766 |
+
if (in_array($this->_getType() , array('cms_block','cms_page'))){
|
767 |
+
$cmstableName = str_replace('_','',$this->_getType());
|
768 |
+
$cmsColumnName = str_replace('cms_', '', $this->_getType());
|
769 |
+
$entityId = $translation->getData($this->_getType().'_id');
|
770 |
+
$writeConnection->update($prefix.'straker_job_'.$cmstableName ,array('version' => 1), $cmsColumnName."_id = {$entityId} and job_id ={$this->getId()}" );
|
771 |
+
}else{
|
772 |
+
$writeConnection->update($prefix.'straker_job_'.$this->_getType() ,array('version' => 1), $this->_getType()."_id = {$entityId} and job_id ={$this->getId()}" );
|
773 |
+
}
|
774 |
}
|
775 |
}
|
776 |
|
777 |
return true;
|
778 |
}
|
779 |
|
780 |
+
protected function createNewCms($entityIds){
|
781 |
+
|
782 |
+
|
783 |
+
$cmsType = str_replace('cms_', '', $this->_getType());
|
784 |
+
|
785 |
+
$cmsModelName = str_replace('_', '/', $this->_getType());
|
786 |
+
|
787 |
+
|
788 |
+
$collection = Mage::getModel('strakertranslations_easytranslationplatform/job_'.$this->_getType())->getCollection();
|
789 |
+
|
790 |
+
$collection->addFieldToFilter('job_id',$this->getId());
|
791 |
+
|
792 |
+
if ($entityIds) {
|
793 |
+
$collection->addFieldToFilter($cmsType.'_id', array('in' => $entityIds));
|
794 |
+
}
|
795 |
+
|
796 |
+
foreach ($collection as $jobCms) {
|
797 |
+
|
798 |
+
if (!$jobCms->getNewEntityId()) {
|
799 |
+
|
800 |
+
$cmsModel = Mage::getModel($cmsModelName);
|
801 |
+
|
802 |
+
$cmsData = json_decode($jobCms->getOrigin());
|
803 |
+
|
804 |
+
foreach ($cmsData as $k => $v){
|
805 |
+
$cmsModel->setData($k,$v);
|
806 |
+
}
|
807 |
+
|
808 |
+
$cmsModel->setStores(array())->save();
|
809 |
+
|
810 |
+
$jobCms->setNewEntityId($cmsModel->getId()) ->save();
|
811 |
+
|
812 |
+
}
|
813 |
+
|
814 |
+
}
|
815 |
+
|
816 |
+
}
|
817 |
+
|
818 |
public function isPublished()
|
819 |
{
|
820 |
if ($this->getStatusId() == 5) {
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Job/Cms/Block.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:04 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Job_Cms_Block extends Mage_Core_Model_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/job_cms_block');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Job/Cms/Page.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:02 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Job_Cms_Page extends Mage_Core_Model_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/job_cms_page');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Block/Attributes.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 19/05/16
|
6 |
+
* Time: 3:28 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Cms_Block_Attributes extends Mage_Core_Model_Resource_Db_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_block_attributes', 'id');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Block/Attributes/Collection.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 19/05/16
|
6 |
+
* Time: 3:28 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Cms_Block_Attributes_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_block_attributes');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Block/Translate.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:07 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Cms_Block_Translate extends Mage_Core_Model_Resource_Db_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_block_translate', 'id');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Block/Translate/Collection.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:07 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Cms_Block_Translate_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_block_translate');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Page/Attributes.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 19/05/16
|
6 |
+
* Time: 3:28 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Cms_Page_Attributes extends Mage_Core_Model_Resource_Db_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_page_attributes', 'id');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Page/Attributes/Collection.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 19/05/16
|
6 |
+
* Time: 3:29 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Cms_Page_Attributes_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_page_attributes');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Page/Translate.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:06 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Cms_Page_Translate extends Mage_Core_Model_Resource_Db_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_page_translate', 'id');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Cms/Page/Translate/Collection.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:06 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Cms_Page_Translate_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/cms_page_translate');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Job/Cms/Block.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:04 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Job_Cms_Block extends Mage_Core_Model_Resource_Db_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/job_cmsblock', 'id');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Job/Cms/Block/Collection.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:04 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Job_Cms_Block_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/job_cms_block');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Job/Cms/Page.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:02 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Job_Cms_Page extends Mage_Core_Model_Resource_Db_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/job_cmspage', 'id');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/Model/Resource/Job/Cms/Page/Collection.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: WlliamZhao
|
5 |
+
* Date: 12/05/16
|
6 |
+
* Time: 12:02 PM
|
7 |
+
*/
|
8 |
+
class StrakerTranslations_EasyTranslationPlatform_Model_Resource_Job_Cms_Page_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
protected function _construct()
|
12 |
+
{
|
13 |
+
$this->_init('strakertranslations_easytranslationplatform/job_cms_page');
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/controllers/Adminhtml/Straker/Cms/BlockController.php
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
Class StrakerTranslations_EasyTranslationPlatform_Adminhtml_Straker_Cms_BlockController extends Mage_Adminhtml_Controller_Action{
|
3 |
+
protected function _isAllowed()
|
4 |
+
{
|
5 |
+
return Mage::getSingleton('admin/session')->isAllowed('admin/straker/job');
|
6 |
+
}
|
7 |
+
|
8 |
+
protected function _initAction()
|
9 |
+
{
|
10 |
+
$this
|
11 |
+
->loadLayout()
|
12 |
+
->_setActiveMenu('straker/job')
|
13 |
+
;
|
14 |
+
|
15 |
+
return $this;
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _initNewAction()
|
19 |
+
{
|
20 |
+
$this
|
21 |
+
->loadLayout()
|
22 |
+
->_setActiveMenu('straker/new')
|
23 |
+
;
|
24 |
+
|
25 |
+
return $this;
|
26 |
+
}
|
27 |
+
|
28 |
+
|
29 |
+
public function indexAction(){
|
30 |
+
|
31 |
+
if (!$this->getRequest()->getParam('job_id')){
|
32 |
+
Mage::getSingleton('adminhtml/session')->addError('Job ID missing');
|
33 |
+
$this->_redirect('*/straker_job/');
|
34 |
+
return;
|
35 |
+
}
|
36 |
+
|
37 |
+
$this->_title($this->__('Straker Translations'))
|
38 |
+
->_title($this->__('Manage Jobs'));
|
39 |
+
|
40 |
+
$this->loadLayout()->_setActiveMenu('straker/job');
|
41 |
+
$this->renderLayout();
|
42 |
+
|
43 |
+
}
|
44 |
+
|
45 |
+
public function newAction(){
|
46 |
+
$params = $this->getRequest()->getParams();
|
47 |
+
if (empty($params['store'])) {
|
48 |
+
$this->_redirect('*/straker_new');
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
elseif (empty($params['attr'])) {
|
52 |
+
return $this->_initNewAction()
|
53 |
+
->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_block_attribute','strakertranslations_easytranslationplatform_new_cms_block_attribute',array('setup_store_id' => $params['store'])))
|
54 |
+
->renderLayout();
|
55 |
+
}
|
56 |
+
elseif (empty($params['cms_block'])) {
|
57 |
+
return $this->_initNewAction()
|
58 |
+
->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_block','strakertranslations_easytranslationplatform_new_cms_block',array('setup_store_id' => $params['store'], 'attr' => $params['attr'])))
|
59 |
+
->renderLayout();
|
60 |
+
}
|
61 |
+
else{
|
62 |
+
return $this->_initNewAction()
|
63 |
+
->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_block_confirm','strakertranslations_easytranslationplatform_new_cms_block_confirm',array('store' => $params['store'], 'cms_block' => $params['cms_block'], 'attr' => $params['attr'])))
|
64 |
+
->renderLayout();
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
public function attributeAction(){
|
69 |
+
$data = $this->getRequest()->getParams();
|
70 |
+
if($data['attr'] && $data['store']){
|
71 |
+
$this->_redirect('*/*/new', array('store' => $data['store'], 'attr' => implode(",",array_keys($data['attr']))));
|
72 |
+
}
|
73 |
+
else {
|
74 |
+
$this->_redirect('*/straker_new/');
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
public function addtoconfirmAction(){
|
79 |
+
$data = $this->getRequest()->getParams();
|
80 |
+
$data['store'] = !empty($data['store']) ? $data['store'] : Mage::getSingleton('adminhtml/session')->getData('straker_new_store');
|
81 |
+
$data['attr'] = !empty($data['attr']) ? $data['attr'] : Mage::getSingleton('adminhtml/session')->getData('straker_new_attr');
|
82 |
+
$data['cms_block'] = !empty($data['cms_block']) ? $data['cms_block'] : Mage::getSingleton('adminhtml/session')->getData('straker_new_cms_block');
|
83 |
+
if(!empty($data['attr']) && !empty($data['store']) && !empty($data['cms_block'])){
|
84 |
+
Mage::getSingleton('adminhtml/session')
|
85 |
+
->setData('straker_new_attr', $data['attr'])
|
86 |
+
->setData('straker_new_store', $data['store'])
|
87 |
+
->setData('straker_new_cms_block', $data['cms_block'])
|
88 |
+
;
|
89 |
+
return $this->_initAction()
|
90 |
+
->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_block_confirm', 'strakertranslations_easytranslationplatform_new_cms_block_confirm', array('store' => $data['store'], 'cms_block' => $data['cms_block'], 'attr' => $data['attr'])))
|
91 |
+
->renderLayout();
|
92 |
+
}
|
93 |
+
else {
|
94 |
+
$this->_redirect('*/straker_new/', $data);
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
public function submitjobAction(){
|
99 |
+
$data = $this->getRequest()->getParams();
|
100 |
+
if($data['attr'] && $data['store'] && $data['cms_block']){
|
101 |
+
$jobModel = Mage::getModel('strakertranslations_easytranslationplatform/job');
|
102 |
+
try {
|
103 |
+
$jobModel->checkAndCreateFolder();
|
104 |
+
}
|
105 |
+
catch (Mage_Core_Exception $e){
|
106 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
107 |
+
$this->_redirect('*/*/', array(
|
108 |
+
'store' => $data['store']
|
109 |
+
));
|
110 |
+
return;
|
111 |
+
}
|
112 |
+
$helper = Mage::helper('strakertranslations_easytranslationplatform');
|
113 |
+
$storeSetup = $helper->getStoreSetup($data['store']);
|
114 |
+
$jobModel->setStoreId($data['store']);
|
115 |
+
$jobModel->setSl($storeSetup['from']);
|
116 |
+
$jobModel->setTl($storeSetup['to']);
|
117 |
+
$jobModel->setToken('Token');
|
118 |
+
$jobModel->submitCmsBlock(explode(',',$data['cms_block']),explode(',', $data['attr']));
|
119 |
+
if ($jobModel->getLastStatus()) {
|
120 |
+
Mage::getSingleton('adminhtml/session')
|
121 |
+
->setData('straker_new_store', '')
|
122 |
+
->setData('straker_new_cms_block', '')
|
123 |
+
;
|
124 |
+
Mage::getSingleton('adminhtml/session')->addSuccess('New job created');
|
125 |
+
$this->_redirect('*/straker_job/');
|
126 |
+
}
|
127 |
+
else{
|
128 |
+
Mage::getSingleton('adminhtml/session')->addError($jobModel->getLastMessage());
|
129 |
+
$this->_redirect('*/*/new');
|
130 |
+
}
|
131 |
+
}
|
132 |
+
else {
|
133 |
+
$this->_redirect('*/*/new', $data);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
public function copyAllAction(){
|
138 |
+
$job = Mage::getModel('strakertranslations_easytranslationplatform/job')->load($this->getRequest()->getParam('job_id'));
|
139 |
+
|
140 |
+
if (!$job->getId()){
|
141 |
+
Mage::getSingleton('adminhtml/session')->addError('Job ID missing');
|
142 |
+
$this->_redirect('*/straker_job/');
|
143 |
+
return;
|
144 |
+
}
|
145 |
+
|
146 |
+
if($job->applyTranslation()) {
|
147 |
+
Mage::getSingleton('adminhtml/session')->addSuccess('Translation has been applied.');
|
148 |
+
$this->_redirect('*/straker_job/');
|
149 |
+
return;
|
150 |
+
} else {
|
151 |
+
Mage::getSingleton('adminhtml/session')->addError('Error when applying translation.');
|
152 |
+
$this->_redirect('*/straker_job/');
|
153 |
+
return;
|
154 |
+
}
|
155 |
+
|
156 |
+
}
|
157 |
+
|
158 |
+
public function applyTranslationAction(){
|
159 |
+
$jobId = $this->getRequest()->getParam('job_id');
|
160 |
+
$job = Mage::getModel('strakertranslations_easytranslationplatform/job')->load($jobId);
|
161 |
+
|
162 |
+
if (!$job->getId()){
|
163 |
+
Mage::getSingleton('adminhtml/session')->addError('Job ID missing');
|
164 |
+
$this->_redirect('*/straker_job/');
|
165 |
+
return;
|
166 |
+
}
|
167 |
+
$blockIds = $this->getRequest()->getParam('block_id');
|
168 |
+
if(!empty($blockIds)) {
|
169 |
+
if ($job->applyTranslation($blockIds)) {
|
170 |
+
Mage::getSingleton('adminhtml/session')->addSuccess('Translation has been applied.');
|
171 |
+
$this->_redirect('*/straker_cms_block/',array('job_id' => $jobId));
|
172 |
+
return;
|
173 |
+
} else {
|
174 |
+
Mage::getSingleton('adminhtml/session')->addError('Error when applying translation.');
|
175 |
+
$this->_redirect('*/straker_cms_block/',array('job_id' => $jobId));
|
176 |
+
return;
|
177 |
+
}
|
178 |
+
}
|
179 |
+
else{
|
180 |
+
Mage::getSingleton('adminhtml/session')->addError('Please select products to apply the translation.');
|
181 |
+
$this->_redirect('*/straker_cms_block/',array('job_id' => $jobId));
|
182 |
+
return;
|
183 |
+
}
|
184 |
+
|
185 |
+
}
|
186 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/controllers/Adminhtml/Straker/Cms/PageController.php
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
Class StrakerTranslations_EasyTranslationPlatform_Adminhtml_Straker_Cms_PageController extends Mage_Adminhtml_Controller_Action{
|
3 |
+
protected function _isAllowed()
|
4 |
+
{
|
5 |
+
return Mage::getSingleton('admin/session')->isAllowed('admin/straker/job');
|
6 |
+
}
|
7 |
+
|
8 |
+
protected function _initAction()
|
9 |
+
{
|
10 |
+
$this
|
11 |
+
->loadLayout()
|
12 |
+
->_setActiveMenu('straker/job')
|
13 |
+
;
|
14 |
+
|
15 |
+
return $this;
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _initNewAction()
|
19 |
+
{
|
20 |
+
$this
|
21 |
+
->loadLayout()
|
22 |
+
->_setActiveMenu('straker/new')
|
23 |
+
;
|
24 |
+
|
25 |
+
return $this;
|
26 |
+
}
|
27 |
+
|
28 |
+
|
29 |
+
public function indexAction(){
|
30 |
+
|
31 |
+
if (!$this->getRequest()->getParam('job_id')){
|
32 |
+
Mage::getSingleton('adminhtml/session')->addError('Job ID missing');
|
33 |
+
$this->_redirect('*/straker_job/');
|
34 |
+
return;
|
35 |
+
}
|
36 |
+
|
37 |
+
$this->_title($this->__('Straker Translations'))
|
38 |
+
->_title($this->__('Manage Jobs'));
|
39 |
+
|
40 |
+
$this->loadLayout()->_setActiveMenu('straker/job');
|
41 |
+
$this->renderLayout();
|
42 |
+
|
43 |
+
}
|
44 |
+
|
45 |
+
public function newAction(){
|
46 |
+
$params = $this->getRequest()->getParams();
|
47 |
+
if (empty($params['store'])) {
|
48 |
+
$this->_redirect('*/straker_new');
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
elseif (empty($params['attr'])) {
|
52 |
+
return $this->_initNewAction()
|
53 |
+
->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_page_attribute','strakertranslations_easytranslationplatform_new_cms_page_attribute',array('setup_store_id' => $params['store'])))
|
54 |
+
->renderLayout();
|
55 |
+
}
|
56 |
+
elseif (empty($params['cms_page'])) {
|
57 |
+
return $this->_initNewAction()
|
58 |
+
->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_page','strakertranslations_easytranslationplatform_new_cms_page',array('setup_store_id' => $params['store'], 'attr' => $params['attr'])))
|
59 |
+
->renderLayout();
|
60 |
+
}
|
61 |
+
else{
|
62 |
+
return $this->_initNewAction()
|
63 |
+
->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_page_confirm','strakertranslations_easytranslationplatform_new_cms_page_confirm',array('store' => $params['store'], 'cms_page' => $params['cms_page'], 'attr' => $params['attr'])))
|
64 |
+
->renderLayout();
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
public function attributeAction(){
|
69 |
+
$data = $this->getRequest()->getParams();
|
70 |
+
if($data['attr'] && $data['store']){
|
71 |
+
$this->_redirect('*/*/new', array('store' => $data['store'], 'attr' => implode(",",array_keys($data['attr']))));
|
72 |
+
}
|
73 |
+
else {
|
74 |
+
$this->_redirect('*/straker_new/');
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
public function addtoconfirmAction(){
|
79 |
+
$data = $this->getRequest()->getParams();
|
80 |
+
$data['store'] = !empty($data['store']) ? $data['store'] : Mage::getSingleton('adminhtml/session')->getData('straker_new_store');
|
81 |
+
$data['attr'] = !empty($data['attr']) ? $data['attr'] : Mage::getSingleton('adminhtml/session')->getData('straker_new_attr');
|
82 |
+
$data['cms_page'] = !empty($data['cms_page']) ? $data['cms_page'] : Mage::getSingleton('adminhtml/session')->getData('straker_new_cms_page');
|
83 |
+
if(!empty($data['attr']) && !empty($data['store']) && !empty($data['cms_page'])){
|
84 |
+
Mage::getSingleton('adminhtml/session')
|
85 |
+
->setData('straker_new_attr', $data['attr'])
|
86 |
+
->setData('straker_new_store', $data['store'])
|
87 |
+
->setData('straker_new_cms_page', $data['cms_page'])
|
88 |
+
;
|
89 |
+
return $this->_initAction()
|
90 |
+
->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_cms_page_confirm', 'strakertranslations_easytranslationplatform_new_cms_page_confirm', array('store' => $data['store'], 'cms_page' => $data['cms_page'], 'attr' => $data['attr'])))
|
91 |
+
->renderLayout();
|
92 |
+
}
|
93 |
+
else {
|
94 |
+
$this->_redirect('*/straker_new/', $data);
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
public function submitjobAction(){
|
99 |
+
$data = $this->getRequest()->getParams();
|
100 |
+
if($data['attr'] && $data['store'] && $data['cms_page']){
|
101 |
+
$jobModel = Mage::getModel('strakertranslations_easytranslationplatform/job');
|
102 |
+
try {
|
103 |
+
$jobModel->checkAndCreateFolder();
|
104 |
+
}
|
105 |
+
catch (Mage_Core_Exception $e){
|
106 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
107 |
+
$this->_redirect('*/*/', array(
|
108 |
+
'store' => $data['store']
|
109 |
+
));
|
110 |
+
return;
|
111 |
+
}
|
112 |
+
$helper = Mage::helper('strakertranslations_easytranslationplatform');
|
113 |
+
$storeSetup = $helper->getStoreSetup($data['store']);
|
114 |
+
$jobModel->setStoreId($data['store']);
|
115 |
+
$jobModel->setSl($storeSetup['from']);
|
116 |
+
$jobModel->setTl($storeSetup['to']);
|
117 |
+
$jobModel->setToken('Token');
|
118 |
+
$jobModel->submitCmsPage(explode(',',$data['cms_page']),explode(',', $data['attr']));
|
119 |
+
if ($jobModel->getLastStatus()) {
|
120 |
+
Mage::getSingleton('adminhtml/session')
|
121 |
+
->setData('straker_new_store', '')
|
122 |
+
->setData('straker_new_cms_page', '')
|
123 |
+
;
|
124 |
+
Mage::getSingleton('adminhtml/session')->addSuccess('New job created');
|
125 |
+
$this->_redirect('*/straker_job/');
|
126 |
+
}
|
127 |
+
else{
|
128 |
+
Mage::getSingleton('adminhtml/session')->addError($jobModel->getLastMessage());
|
129 |
+
$this->_redirect('*/*/new');
|
130 |
+
}
|
131 |
+
}
|
132 |
+
else {
|
133 |
+
$this->_redirect('*/*/new', $data);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
public function copyAllAction(){
|
138 |
+
$job = Mage::getModel('strakertranslations_easytranslationplatform/job')->load($this->getRequest()->getParam('job_id'));
|
139 |
+
|
140 |
+
if (!$job->getId()){
|
141 |
+
Mage::getSingleton('adminhtml/session')->addError('Job ID missing');
|
142 |
+
$this->_redirect('*/straker_job/');
|
143 |
+
return;
|
144 |
+
}
|
145 |
+
|
146 |
+
if($job->applyTranslation()) {
|
147 |
+
Mage::getSingleton('adminhtml/session')->addSuccess('Translation has been applied.');
|
148 |
+
$this->_redirect('*/straker_job/');
|
149 |
+
return;
|
150 |
+
} else {
|
151 |
+
Mage::getSingleton('adminhtml/session')->addError('Error when applying translation.');
|
152 |
+
$this->_redirect('*/straker_job/');
|
153 |
+
return;
|
154 |
+
}
|
155 |
+
|
156 |
+
}
|
157 |
+
|
158 |
+
public function applyTranslationAction(){
|
159 |
+
$jobId = $this->getRequest()->getParam('job_id');
|
160 |
+
$job = Mage::getModel('strakertranslations_easytranslationplatform/job')->load($jobId);
|
161 |
+
|
162 |
+
if (!$job->getId()){
|
163 |
+
Mage::getSingleton('adminhtml/session')->addError('Job ID missing');
|
164 |
+
$this->_redirect('*/straker_job/');
|
165 |
+
return;
|
166 |
+
}
|
167 |
+
$cmsPageIds = $this->getRequest()->getParam('page_id');
|
168 |
+
if(!empty($cmsPageIds)) {
|
169 |
+
if ($job->applyTranslation($cmsPageIds)) {
|
170 |
+
Mage::getSingleton('adminhtml/session')->addSuccess('Translation has been applied.');
|
171 |
+
$this->_redirect('*/straker_cms_page/',array('job_id' => $jobId));
|
172 |
+
return;
|
173 |
+
} else {
|
174 |
+
Mage::getSingleton('adminhtml/session')->addError('Error when applying translation.');
|
175 |
+
$this->_redirect('*/straker_cms_page/',array('job_id' => $jobId));
|
176 |
+
return;
|
177 |
+
}
|
178 |
+
}
|
179 |
+
else{
|
180 |
+
Mage::getSingleton('adminhtml/session')->addError('Please select products to apply the translation.');
|
181 |
+
$this->_redirect('*/straker_cms_page/',array('job_id' => $jobId));
|
182 |
+
return;
|
183 |
+
}
|
184 |
+
|
185 |
+
}
|
186 |
+
}
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/controllers/Adminhtml/Straker/NewController.php
CHANGED
@@ -46,16 +46,6 @@ Class StrakerTranslations_EasyTranslationPlatform_Adminhtml_Straker_NewControlle
|
|
46 |
->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_type','strakertranslations_easytranslationplatform_new_type',array('setup_store_id' => $params['store'])))
|
47 |
->renderLayout();
|
48 |
}
|
49 |
-
// elseif (empty($params['attr'])) {
|
50 |
-
// return $this->_initAction()
|
51 |
-
// ->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_attribute','strakertranslations_easytranslationplatform_new_attribute',array('setup_store_id' => $params['store'])))
|
52 |
-
// ->renderLayout();
|
53 |
-
// }
|
54 |
-
// else{
|
55 |
-
// return $this->_initAction()
|
56 |
-
// ->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_products','strakertranslations_easytranslationplatform_new_products',array('setup_store_id' => $params['store'], 'attr' => $params['attr'])))
|
57 |
-
// ->renderLayout();
|
58 |
-
// }
|
59 |
}
|
60 |
|
61 |
public function registerAction(){
|
46 |
->_addContent(Mage::getSingleton('core/layout')->createBlock('strakertranslations_easytranslationplatform/adminhtml_new_type','strakertranslations_easytranslationplatform_new_type',array('setup_store_id' => $params['store'])))
|
47 |
->renderLayout();
|
48 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
public function registerAction(){
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<StrakerTranslations_EasyTranslationPlatform>
|
5 |
-
<version>1.2
|
6 |
</StrakerTranslations_EasyTranslationPlatform>
|
7 |
</modules>
|
8 |
<global>
|
@@ -50,6 +50,24 @@
|
|
50 |
<straker_attribute_translate>
|
51 |
<table>straker_attribute_translate</table>
|
52 |
</straker_attribute_translate>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
</entities>
|
54 |
</strakertranslations_easytranslationplatform_resource>
|
55 |
</models>
|
@@ -57,6 +75,12 @@
|
|
57 |
<strakertranslations_easytranslationplatform>
|
58 |
<class>StrakerTranslations_EasyTranslationPlatform_Block</class>
|
59 |
</strakertranslations_easytranslationplatform>
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
</blocks>
|
61 |
<helpers>
|
62 |
<strakertranslations_easytranslationplatform>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<StrakerTranslations_EasyTranslationPlatform>
|
5 |
+
<version>1.3.2</version>
|
6 |
</StrakerTranslations_EasyTranslationPlatform>
|
7 |
</modules>
|
8 |
<global>
|
50 |
<straker_attribute_translate>
|
51 |
<table>straker_attribute_translate</table>
|
52 |
</straker_attribute_translate>
|
53 |
+
<job_cmspage>
|
54 |
+
<table>straker_job_cmspage</table>
|
55 |
+
</job_cmspage>
|
56 |
+
<job_cmsblock>
|
57 |
+
<table>straker_job_cmsblock</table>
|
58 |
+
</job_cmsblock>
|
59 |
+
<cms_page_translate>
|
60 |
+
<table>straker_cms_page_translate</table>
|
61 |
+
</cms_page_translate>
|
62 |
+
<cms_block_translate>
|
63 |
+
<table>straker_cms_block_translate</table>
|
64 |
+
</cms_block_translate>
|
65 |
+
<cms_block_attributes>
|
66 |
+
<table>straker_cms_block_attributes</table>
|
67 |
+
</cms_block_attributes>
|
68 |
+
<cms_page_attributes>
|
69 |
+
<table>straker_cms_page_attributes</table>
|
70 |
+
</cms_page_attributes>
|
71 |
</entities>
|
72 |
</strakertranslations_easytranslationplatform_resource>
|
73 |
</models>
|
75 |
<strakertranslations_easytranslationplatform>
|
76 |
<class>StrakerTranslations_EasyTranslationPlatform_Block</class>
|
77 |
</strakertranslations_easytranslationplatform>
|
78 |
+
<adminhtml>
|
79 |
+
<rewrite>
|
80 |
+
<cms_page_grid>StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Cms_Page_Grid</cms_page_grid>
|
81 |
+
<cms_block_grid>StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_Cms_Block_Grid</cms_block_grid>
|
82 |
+
</rewrite>
|
83 |
+
</adminhtml>
|
84 |
</blocks>
|
85 |
<helpers>
|
86 |
<strakertranslations_easytranslationplatform>
|
app/code/community/StrakerTranslations/EasyTranslationPlatform/sql/strakertranslations_easytranslationplatform_setup/mysql4-upgrade-1.3.0-1.3.1.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: stevenyang
|
5 |
+
* Date: 18/09/15
|
6 |
+
* Time: 9:46 AM
|
7 |
+
*/
|
8 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
9 |
+
$installer = $this;
|
10 |
+
|
11 |
+
//fix for magento prefix db tabme names
|
12 |
+
$prefix = Mage::getConfig()->getTablePrefix()->__toString();
|
13 |
+
|
14 |
+
|
15 |
+
$installer->startSetup();
|
16 |
+
|
17 |
+
$query = "
|
18 |
+
CREATE TABLE IF NOT EXISTS `" . $prefix . "straker_cms_block_attributes` (
|
19 |
+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
20 |
+
`job_id` int(10) unsigned NOT NULL,
|
21 |
+
`column_name` varchar(255) DEFAULT NULL,
|
22 |
+
PRIMARY KEY (`id`),
|
23 |
+
KEY `job_id` (`job_id`),
|
24 |
+
CONSTRAINT `" . $prefix . "straker_cms_block_attributes_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `straker_job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
25 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
26 |
+
|
27 |
+
CREATE TABLE IF NOT EXISTS `" . $prefix . "straker_cms_block_translate` (
|
28 |
+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
29 |
+
`job_id` int(11) unsigned NOT NULL,
|
30 |
+
`cms_block_id` int(11) DEFAULT NULL,
|
31 |
+
`column_name` varchar(255) NOT NULL DEFAULT '',
|
32 |
+
`original` text,
|
33 |
+
`translate` text,
|
34 |
+
`backup` text,
|
35 |
+
`is_imported` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
36 |
+
`job_cms_id` int(11) DEFAULT NULL,
|
37 |
+
PRIMARY KEY (`id`),
|
38 |
+
KEY `job_id` (`job_id`),
|
39 |
+
CONSTRAINT `" . $prefix . "straker_cms_block_translate_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `straker_job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
40 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
|
45 |
+
CREATE TABLE IF NOT EXISTS `" . $prefix . "straker_cms_page_attributes` (
|
46 |
+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
47 |
+
`job_id` int(10) unsigned NOT NULL,
|
48 |
+
`column_name` varchar(255) DEFAULT NULL,
|
49 |
+
PRIMARY KEY (`id`),
|
50 |
+
KEY `job_id` (`job_id`),
|
51 |
+
CONSTRAINT `" . $prefix . "straker_cms_page_attributes_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `straker_job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
52 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
CREATE TABLE IF NOT EXISTS `" . $prefix . "straker_cms_page_translate` (
|
58 |
+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
59 |
+
`job_id` int(11) unsigned NOT NULL,
|
60 |
+
`cms_page_id` int(11) DEFAULT NULL,
|
61 |
+
`column_name` varchar(255) NOT NULL DEFAULT '',
|
62 |
+
`original` text,
|
63 |
+
`translate` text,
|
64 |
+
`backup` text,
|
65 |
+
`is_imported` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
66 |
+
`job_cms_id` int(11) DEFAULT NULL,
|
67 |
+
PRIMARY KEY (`id`),
|
68 |
+
KEY `job_id` (`job_id`),
|
69 |
+
CONSTRAINT `" . $prefix . "straker_cms_page_translate_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `straker_job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
70 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
+
CREATE TABLE IF NOT EXISTS `" . $prefix . "straker_job_cmsblock` (
|
76 |
+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
77 |
+
`block_id` smallint(6) NOT NULL,
|
78 |
+
`job_id` int(11) unsigned NOT NULL,
|
79 |
+
`version` tinyint(3) DEFAULT NULL,
|
80 |
+
`origin` text,
|
81 |
+
`new_entity_id` int(11) DEFAULT NULL,
|
82 |
+
PRIMARY KEY (`id`),
|
83 |
+
KEY `job_id` (`job_id`),
|
84 |
+
KEY `block_id` (`block_id`),
|
85 |
+
KEY `new_entity_id` (`new_entity_id`),
|
86 |
+
CONSTRAINT `" . $prefix . "straker_job_cmsblock_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `straker_job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
87 |
+
CONSTRAINT `" . $prefix . "straker_job_cmsblock_ibfk_2` FOREIGN KEY (`block_id`) REFERENCES `cms_block` (`block_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
88 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
89 |
+
|
90 |
+
|
91 |
+
|
92 |
+
|
93 |
+
CREATE TABLE IF NOT EXISTS `" . $prefix . "straker_job_cmspage` (
|
94 |
+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
95 |
+
`page_id` smallint(6) NOT NULL,
|
96 |
+
`job_id` int(11) unsigned NOT NULL,
|
97 |
+
`version` tinyint(3) DEFAULT NULL,
|
98 |
+
`origin` text,
|
99 |
+
`new_entity_id` int(11) DEFAULT NULL,
|
100 |
+
PRIMARY KEY (`id`),
|
101 |
+
KEY `job_id` (`job_id`),
|
102 |
+
KEY `page_id` (`page_id`),
|
103 |
+
KEY `new_entity_id` (`new_entity_id`),
|
104 |
+
CONSTRAINT `" . $prefix . "straker_job_cmspage_ibfk_2` FOREIGN KEY (`job_id`) REFERENCES `straker_job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
105 |
+
CONSTRAINT `" . $prefix . "straker_job_cmspage_ibfk_3` FOREIGN KEY (`page_id`) REFERENCES `cms_page` (`page_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
106 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
107 |
+
|
108 |
+
DROP TABLE IF EXISTS `" . $prefix . "straker_job_type`;
|
109 |
+
|
110 |
+
CREATE TABLE `" . $prefix . "straker_job_type` (
|
111 |
+
`type_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
|
112 |
+
`type_name` varchar(255) NOT NULL DEFAULT '',
|
113 |
+
PRIMARY KEY (`type_id`)
|
114 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
115 |
+
|
116 |
+
INSERT INTO `" . $prefix . "straker_job_type` (`type_id`, `type_name`)
|
117 |
+
VALUES
|
118 |
+
(1,'Product'),
|
119 |
+
(3,'Category'),
|
120 |
+
(4,'Attribute'),
|
121 |
+
(5,'CMS Page'),
|
122 |
+
(6,'CMS Block');
|
123 |
+
|
124 |
+
";
|
125 |
+
$installer->run($query);
|
126 |
+
|
127 |
+
$installer->endSetup();
|
app/design/adminhtml/default/straker/layout/straker.xml
CHANGED
@@ -72,4 +72,36 @@
|
|
72 |
<block type="strakertranslations_easytranslationplatform/adminhtml_job_attribute" name="strakertranslations_easytranslationplatform_job_attribute" />
|
73 |
</reference>
|
74 |
</adminhtml_straker_attribute_index>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
</layout>
|
72 |
<block type="strakertranslations_easytranslationplatform/adminhtml_job_attribute" name="strakertranslations_easytranslationplatform_job_attribute" />
|
73 |
</reference>
|
74 |
</adminhtml_straker_attribute_index>
|
75 |
+
<adminhtml_straker_cms_page_index>
|
76 |
+
<referense name="head">
|
77 |
+
<action method="setTitle" translate="title"><title>Manage Jobs</title></action>
|
78 |
+
</referense>
|
79 |
+
<reference name="menu">
|
80 |
+
<action method="setActive"><menupath>straker/job</menupath></action>
|
81 |
+
</reference>
|
82 |
+
<reference name="content">
|
83 |
+
<block type="strakertranslations_easytranslationplatform/adminhtml_job_cms_page" name="strakertranslations_easytranslationplatform_job_cms_page" />
|
84 |
+
</reference>
|
85 |
+
</adminhtml_straker_cms_page_index>
|
86 |
+
<adminhtml_straker_cms_block_index>
|
87 |
+
<referense name="head">
|
88 |
+
<action method="setTitle" translate="title"><title>Manage Jobs</title></action>
|
89 |
+
</referense>
|
90 |
+
<reference name="menu">
|
91 |
+
<action method="setActive"><menupath>straker/job</menupath></action>
|
92 |
+
</reference>
|
93 |
+
<reference name="content">
|
94 |
+
<block type="strakertranslations_easytranslationplatform/adminhtml_job_cms_block" name="strakertranslations_easytranslationplatform_job_cms_block" />
|
95 |
+
</reference>
|
96 |
+
</adminhtml_straker_cms_block_index>
|
97 |
+
<adminhtml_cms_block_edit>
|
98 |
+
<reference name="cms_block_edit">
|
99 |
+
<action method="setTemplate"><template>cms/form/container.phtml</template></action>
|
100 |
+
</reference>
|
101 |
+
</adminhtml_cms_block_edit>
|
102 |
+
<adminhtml_cms_page_edit>
|
103 |
+
<reference name="cms_page_edit">
|
104 |
+
<action method="setTemplate"><template>cms/form/container.phtml</template></action>
|
105 |
+
</reference>
|
106 |
+
</adminhtml_cms_page_edit>
|
107 |
</layout>
|
app/design/adminhtml/default/straker/template/cms/form/container.phtml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magento.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magento.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Adminhtml_Block_Widget_Form_Container
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php echo $this->getFormInitScripts() ?>
|
33 |
+
<div class="content-header">
|
34 |
+
<?php echo $this->getHeaderHtml() ?>
|
35 |
+
<p class="form-buttons"><?php echo $this->getButtonsHtml('header') ?></p>
|
36 |
+
</div>
|
37 |
+
<?php echo Mage::helper('strakertranslations_easytranslationplatform')->getCmsCreatedMessage(); ?>
|
38 |
+
<?php echo $this->getFormHtml() ?>
|
39 |
+
<?php if ($this->hasFooterButtons()): ?>
|
40 |
+
<div class="content-footer">
|
41 |
+
<p class="form-buttons"><?php echo $this->getButtonsHtml('footer') ?></p>
|
42 |
+
</div>
|
43 |
+
<?php endif; ?>
|
44 |
+
<script type="text/javascript">
|
45 |
+
editForm = new varienForm('edit_form', '<?php echo $this->getValidationUrl() ?>');
|
46 |
+
</script>
|
47 |
+
<?php echo $this->getFormScripts() ?>
|
app/design/adminhtml/default/straker/template/straker/job/cms/block.phtml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="content-header">
|
2 |
+
<table cellspacing="0">
|
3 |
+
<tr>
|
4 |
+
<td style="width:80%;"><h3 class="icon-head head-products"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->__('Manage Jobs') ?></h3><h3 class="store-info-heading"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->renderNewJobHeading($this->getJob()->getStoreId()) ?></h3></td>
|
5 |
+
<td class="a-right">
|
6 |
+
<?php echo $this->getButtonsHtml() ?>
|
7 |
+
</td>
|
8 |
+
</tr>
|
9 |
+
</table>
|
10 |
+
</div>
|
11 |
+
<div class="container">
|
12 |
+
<input type="button" class="form-button left" value="Back" title="Back" onclick="window.location.href = '<?php echo $this->getUrl('*/straker_job'); ?>'">
|
13 |
+
</div>
|
14 |
+
<div>
|
15 |
+
<?php echo $this->getGridHtml() ?>
|
16 |
+
</div>
|
17 |
+
<div id="dispute-container" style="display: none">
|
18 |
+
<a id="dispute-container-close">X</a>
|
19 |
+
<form id="straker-dispute-form" action="<?php echo Mage::helper("adminhtml")->getUrl("adminhtml/straker_job/dispute") ?>" method="post">
|
20 |
+
<h4 id="dispute-form-title"><?php echo $this->__('If you have any issues, please provide comments below. You must provide specific examples of the source and translation. You can edit translations after you published them to your site.') ?></h4>
|
21 |
+
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" >
|
22 |
+
<input type="hidden" name="job_id">
|
23 |
+
<div class="input-box"><label for="message">Message</label><em class="required">*</em><br />
|
24 |
+
<textarea id="message" name="message" value="" class="required-entry input-text" rows="16" cols="90"></textarea></div>
|
25 |
+
<div class="form-buttons">
|
26 |
+
<input type="submit" onclick="disputeForm.submit()" class="form-button" value="Submit" title="Submit">
|
27 |
+
</div>
|
28 |
+
</form>
|
29 |
+
<script>
|
30 |
+
var disputeForm = new varienForm('straker-dispute-form');
|
31 |
+
disputeForm.show = function(jobId){
|
32 |
+
$$('#straker-dispute-form input[name=\'job_id\']')[0].value = jobId;
|
33 |
+
$('dispute-container').show();
|
34 |
+
};
|
35 |
+
$('dispute-container-close').observe('click', function(){
|
36 |
+
$('dispute-container').hide();
|
37 |
+
});
|
38 |
+
</script>
|
39 |
+
</div>
|
app/design/adminhtml/default/straker/template/straker/job/cms/block/massaction.phtml
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magento.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magento.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div id="<?php echo $this->getHtmlId() ?>">
|
28 |
+
<table cellspacing="0" cellpadding="0" class="massaction">
|
29 |
+
<tr>
|
30 |
+
<td><?php if ($this->getUseSelectAll()):?>
|
31 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.selectAll()"><?php echo $this->__('Select All') ?></a>
|
32 |
+
<span class="separator">|</span>
|
33 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.unselectAll()"><?php echo $this->__('Unselect All') ?></a>
|
34 |
+
<span class="separator">|</span>
|
35 |
+
<?php endif; ?>
|
36 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.selectVisible()"><?php echo $this->__('Select Visible') ?></a>
|
37 |
+
<span class="separator">|</span>
|
38 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.unselectVisible()"><?php echo $this->__('Unselect Visible') ?></a>
|
39 |
+
<span class="separator">|</span>
|
40 |
+
<strong id="<?php echo $this->getHtmlId() ?>-count">0</strong> <?php echo $this->__('items selected') ?>
|
41 |
+
</td>
|
42 |
+
<td>
|
43 |
+
<div class="right">
|
44 |
+
<div class="entry-edit">
|
45 |
+
<?php if ($this->getHideFormElement() !== true):?>
|
46 |
+
<form action="" id="<?php echo $this->getHtmlId() ?>-form" method="post">
|
47 |
+
<?php endif ?>
|
48 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
49 |
+
<?php echo $this->getHiddenParams() ?>
|
50 |
+
<fieldset>
|
51 |
+
<span class="field-row">
|
52 |
+
<label><?php echo $this->__('Actions') ?></label>
|
53 |
+
<select id="<?php echo $this->getHtmlId() ?>-select" class="required-entry select absolute-advice local-validation">
|
54 |
+
<option value=""></option>
|
55 |
+
<?php foreach($this->getItems() as $_item): ?>
|
56 |
+
<option value="<?php echo $_item->getId() ?>"<?php echo ($_item->getSelected() ? ' selected="selected"' : '')?>><?php echo $_item->getLabel() ?></option>
|
57 |
+
<?php endforeach; ?>
|
58 |
+
</select>
|
59 |
+
</span>
|
60 |
+
<span class="outer-span" id="<?php echo $this->getHtmlId() ?>-form-hiddens"></span>
|
61 |
+
<span class="outer-span" id="<?php echo $this->getHtmlId() ?>-form-additional"></span>
|
62 |
+
<span class="field-row">
|
63 |
+
<?php echo $this->getApplyButtonHtml() ?>
|
64 |
+
</span>
|
65 |
+
</fieldset>
|
66 |
+
<?php if ($this->getHideFormElement() !== true):?>
|
67 |
+
</form>
|
68 |
+
<?php endif ?>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div class="no-display">
|
72 |
+
<?php foreach($this->getItems() as $_item): ?>
|
73 |
+
<div id="<?php echo $this->getHtmlId() ?>-item-<?php echo $_item->getId() ?>-block">
|
74 |
+
<?php echo $_item->getAdditionalActionBlockHtml() ?>
|
75 |
+
</div>
|
76 |
+
<?php endforeach; ?>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
</table>
|
82 |
+
<?php if(!$this->getParentBlock()->canDisplayContainer()): ?>
|
83 |
+
<script type="text/javascript">
|
84 |
+
<?php echo $this->getJsObjectName() ?>.setGridIds('<?php echo $this->getGridIdsJson() ?>');
|
85 |
+
</script>
|
86 |
+
<?php endif; ?>
|
87 |
+
</div>
|
app/design/adminhtml/default/straker/template/straker/job/cms/page.phtml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="content-header">
|
2 |
+
<table cellspacing="0">
|
3 |
+
<tr>
|
4 |
+
<td style="width:80%;"><h3 class="icon-head head-products"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->__('Manage Jobs') ?></h3><h3 class="store-info-heading"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->renderNewJobHeading($this->getJob()->getStoreId()) ?></h3></td>
|
5 |
+
<td class="a-right">
|
6 |
+
<?php echo $this->getButtonsHtml() ?>
|
7 |
+
</td>
|
8 |
+
</tr>
|
9 |
+
</table>
|
10 |
+
</div>
|
11 |
+
<div class="container">
|
12 |
+
<input type="button" class="form-button left" value="Back" title="Back" onclick="window.location.href = '<?php echo $this->getUrl('*/straker_job'); ?>'">
|
13 |
+
</div>
|
14 |
+
<div>
|
15 |
+
<?php echo $this->getGridHtml() ?>
|
16 |
+
</div>
|
17 |
+
<div id="dispute-container" style="display: none">
|
18 |
+
<a id="dispute-container-close">X</a>
|
19 |
+
<form id="straker-dispute-form" action="<?php echo Mage::helper("adminhtml")->getUrl("adminhtml/straker_job/dispute") ?>" method="post">
|
20 |
+
<h4 id="dispute-form-title"><?php echo $this->__('If you have any issues, please provide comments below. You must provide specific examples of the source and translation. You can edit translations after you published them to your site.') ?></h4>
|
21 |
+
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" >
|
22 |
+
<input type="hidden" name="job_id">
|
23 |
+
<div class="input-box"><label for="message">Message</label><em class="required">*</em><br />
|
24 |
+
<textarea id="message" name="message" value="" class="required-entry input-text" rows="16" cols="90"></textarea></div>
|
25 |
+
<div class="form-buttons">
|
26 |
+
<input type="submit" onclick="disputeForm.submit()" class="form-button" value="Submit" title="Submit">
|
27 |
+
</div>
|
28 |
+
</form>
|
29 |
+
<script>
|
30 |
+
var disputeForm = new varienForm('straker-dispute-form');
|
31 |
+
disputeForm.show = function(jobId){
|
32 |
+
$$('#straker-dispute-form input[name=\'job_id\']')[0].value = jobId;
|
33 |
+
$('dispute-container').show();
|
34 |
+
};
|
35 |
+
$('dispute-container-close').observe('click', function(){
|
36 |
+
$('dispute-container').hide();
|
37 |
+
});
|
38 |
+
</script>
|
39 |
+
</div>
|
app/design/adminhtml/default/straker/template/straker/job/cms/page/massaction.phtml
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magento.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magento.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div id="<?php echo $this->getHtmlId() ?>">
|
28 |
+
<table cellspacing="0" cellpadding="0" class="massaction">
|
29 |
+
<tr>
|
30 |
+
<td><?php if ($this->getUseSelectAll()):?>
|
31 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.selectAll()"><?php echo $this->__('Select All') ?></a>
|
32 |
+
<span class="separator">|</span>
|
33 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.unselectAll()"><?php echo $this->__('Unselect All') ?></a>
|
34 |
+
<span class="separator">|</span>
|
35 |
+
<?php endif; ?>
|
36 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.selectVisible()"><?php echo $this->__('Select Visible') ?></a>
|
37 |
+
<span class="separator">|</span>
|
38 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.unselectVisible()"><?php echo $this->__('Unselect Visible') ?></a>
|
39 |
+
<span class="separator">|</span>
|
40 |
+
<strong id="<?php echo $this->getHtmlId() ?>-count">0</strong> <?php echo $this->__('items selected') ?>
|
41 |
+
</td>
|
42 |
+
<td>
|
43 |
+
<div class="right">
|
44 |
+
<div class="entry-edit">
|
45 |
+
<?php if ($this->getHideFormElement() !== true):?>
|
46 |
+
<form action="" id="<?php echo $this->getHtmlId() ?>-form" method="post">
|
47 |
+
<?php endif ?>
|
48 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
49 |
+
<?php echo $this->getHiddenParams() ?>
|
50 |
+
<fieldset>
|
51 |
+
<span class="field-row">
|
52 |
+
<label><?php echo $this->__('Actions') ?></label>
|
53 |
+
<select id="<?php echo $this->getHtmlId() ?>-select" class="required-entry select absolute-advice local-validation">
|
54 |
+
<option value=""></option>
|
55 |
+
<?php foreach($this->getItems() as $_item): ?>
|
56 |
+
<option value="<?php echo $_item->getId() ?>"<?php echo ($_item->getSelected() ? ' selected="selected"' : '')?>><?php echo $_item->getLabel() ?></option>
|
57 |
+
<?php endforeach; ?>
|
58 |
+
</select>
|
59 |
+
</span>
|
60 |
+
<span class="outer-span" id="<?php echo $this->getHtmlId() ?>-form-hiddens"></span>
|
61 |
+
<span class="outer-span" id="<?php echo $this->getHtmlId() ?>-form-additional"></span>
|
62 |
+
<span class="field-row">
|
63 |
+
<?php echo $this->getApplyButtonHtml() ?>
|
64 |
+
</span>
|
65 |
+
</fieldset>
|
66 |
+
<?php if ($this->getHideFormElement() !== true):?>
|
67 |
+
</form>
|
68 |
+
<?php endif ?>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div class="no-display">
|
72 |
+
<?php foreach($this->getItems() as $_item): ?>
|
73 |
+
<div id="<?php echo $this->getHtmlId() ?>-item-<?php echo $_item->getId() ?>-block">
|
74 |
+
<?php echo $_item->getAdditionalActionBlockHtml() ?>
|
75 |
+
</div>
|
76 |
+
<?php endforeach; ?>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
</table>
|
82 |
+
<?php if(!$this->getParentBlock()->canDisplayContainer()): ?>
|
83 |
+
<script type="text/javascript">
|
84 |
+
<?php echo $this->getJsObjectName() ?>.setGridIds('<?php echo $this->getGridIdsJson() ?>');
|
85 |
+
</script>
|
86 |
+
<?php endif; ?>
|
87 |
+
</div>
|
app/design/adminhtml/default/straker/template/straker/new/cms/block.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @see StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Products
|
4 |
+
*/
|
5 |
+
?>
|
6 |
+
<div class="content-header">
|
7 |
+
<table cellspacing="0">
|
8 |
+
<tr>
|
9 |
+
<td style="width:80%;"><h3 class="icon-head head-products"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->__('Select CMS Blocks to Translate') ?></h3><h3 class="store-info-heading"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->renderNewJobHeading($this->getRequest()->getParam('store')) ?></h3></td>
|
10 |
+
<td class="a-right">
|
11 |
+
<?php echo $this->getButtonsHtml() ?>
|
12 |
+
</td>
|
13 |
+
</tr>
|
14 |
+
</table>
|
15 |
+
</div>
|
16 |
+
<ol class="wizard" data-wizard-steps="4">
|
17 |
+
<li class="wizard-done"><?php echo $this->__('Select Job Type') ?></li>
|
18 |
+
<li class="wizard-done"><?php echo $this->__('Select Details') ?></li>
|
19 |
+
<li class="wizard-todo"><?php echo $this->__('Select Content') ?></li>
|
20 |
+
<li class="wizard-todo"><?php echo $this->__('Confirm Content') ?></li>
|
21 |
+
</ol>
|
22 |
+
<div>
|
23 |
+
<?php echo $this->getGridHtml() ?>
|
24 |
+
</div>
|
25 |
+
<script>
|
26 |
+
Event.observe(window, "load", function() {
|
27 |
+
var buttonHtml = '<button title="Submit" type="button" class="right" onclick="strakerCmsPages_massactionJsObject.apply()" style=""><span><span><span>Submit</span></span></span></button>';
|
28 |
+
$('strakerCmsBlocks').insert({after: buttonHtml});
|
29 |
+
$$('.content-header-floating .content-header td.a-right')[0].insert(buttonHtml);
|
30 |
+
});
|
31 |
+
</script>
|
app/design/adminhtml/default/straker/template/straker/new/cms/block/attributes.phtml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="content-header">
|
2 |
+
<h3><?php echo $this->__('Create New Job') ?></h3><h3 class="store-info-heading"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->renderNewJobHeading($this->getRequest()->getParam('store')) ?></h3>
|
3 |
+
</div>
|
4 |
+
<ol class="wizard" data-wizard-steps="4">
|
5 |
+
<li class="wizard-done"><?php echo $this->__('Select Job Type') ?></li>
|
6 |
+
<li class="wizard-todo"><?php echo $this->__('Select Details') ?></li>
|
7 |
+
<li class="wizard-todo"><?php echo $this->__('Select Content') ?></li>
|
8 |
+
<li class="wizard-todo"><?php echo $this->__('Confirm Content') ?></li>
|
9 |
+
</ol>
|
10 |
+
<div class="straker-main-container border">
|
11 |
+
<h1><?php echo $this->__('CMS Block Details') ?></h1>
|
12 |
+
<p><?php echo $this->__('What CMS block details would you like to translate?') ?></p>
|
13 |
+
<form action="<?php echo Mage::helper("adminhtml")->getUrl("adminhtml/straker_cms_block/attribute") ?>" >
|
14 |
+
<div style="padding:0; margin-bottom: 30px;">
|
15 |
+
<div style="text-align: left;">
|
16 |
+
<input name="store" type="hidden" value="<?php echo $this->getSetupStoreId() ?>" />
|
17 |
+
<?php foreach($this->getAttributes() as $columnName => $label):?>
|
18 |
+
<input type="checkbox" name="attr[<?php echo $columnName ?>]" id="<?php echo $columnName ?>" value="1" checked="checked">
|
19 |
+
<label for="<?php echo $columnName ?>"><?php echo $label ?></label>
|
20 |
+
<br>
|
21 |
+
<?php endforeach; ?>
|
22 |
+
</div>
|
23 |
+
<div class="clear"></div>
|
24 |
+
<input type="submit" class="form-button right" value="Next" title="Next">
|
25 |
+
<input type="button" class="form-button right" value="Back" title="Back" onclick="window.location.href = '<?php echo $this->getUrl('*/straker_new', array('store'=> $this->getSetupStoreId())); ?>'">
|
26 |
+
</div>
|
27 |
+
</form>
|
28 |
+
</div>
|
app/design/adminhtml/default/straker/template/straker/new/cms/block/confirm.phtml
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @see StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Products
|
4 |
+
*/
|
5 |
+
?>
|
6 |
+
<div class="content-header">
|
7 |
+
<table cellspacing="0">
|
8 |
+
<tr>
|
9 |
+
<td><h3 class="icon-head head-products"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->__('Confirm CMS Blocks to Translate') ?></h3><h3 class="store-info-heading"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->renderNewJobHeading($this->getStore()) ?></h3></td>
|
10 |
+
</tr>
|
11 |
+
</table>
|
12 |
+
</div>
|
13 |
+
<ol class="wizard" data-wizard-steps="4">
|
14 |
+
<li class="wizard-done"><?php echo $this->__('Select Job Type') ?></li>
|
15 |
+
<li class="wizard-done"><?php echo $this->__('Select Details') ?></li>
|
16 |
+
<li class="wizard-done"><?php echo $this->__('Select Content') ?></li>
|
17 |
+
<li class="wizard-todo"><?php echo $this->__('Confirm Content') ?></li>
|
18 |
+
</ol>
|
19 |
+
<?php $params = $this->getRequest()->getParams(); ?>
|
20 |
+
<a href="<?php echo Mage::helper("adminhtml")->getUrl("adminhtml/straker_cms_block/new", array('store'=>$this->getStore(), 'internal_cms_block'=>implode(',', $this->getCmsBlock()), 'attr'=>$this->getAttr())) ?>"><?php echo $this->__('Edit CMS Blocks') ?></a>
|
21 |
+
<form id="submit-new-job-form" action="<?php echo Mage::helper("adminhtml")->getUrl("adminhtml/straker_cms_block/submitjob") ?>" method="post">
|
22 |
+
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" >
|
23 |
+
<input type="hidden" name="cms_block" value="<?php echo implode(',', $this->getCmsBlock()) ?>" >
|
24 |
+
<input type="hidden" name="store" value="<?php echo $this->getStore() ?>" >
|
25 |
+
<input type="hidden" name="attr" value="<?php echo $this->getAttr() ?>" >
|
26 |
+
</form>
|
27 |
+
<div class="right">
|
28 |
+
<?php echo $this->getButtonsHtml() ?>
|
29 |
+
</div>
|
30 |
+
<div>
|
31 |
+
<?php echo $this->getGridHtml() ?>
|
32 |
+
</div>
|
33 |
+
<script>
|
34 |
+
Event.observe(window, "load", function() {
|
35 |
+
var buttonHtml = '<button title="Submit" type="button" class="right" onclick="$(\'submit-new-job-form\').submit();" style=""><span><span><span>Submit</span></span></span></button>';
|
36 |
+
$('strakerCmsBlocks').insert({after: buttonHtml});
|
37 |
+
});
|
38 |
+
</script>
|
app/design/adminhtml/default/straker/template/straker/new/cms/block/massaction.phtml
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magento.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magento.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div id="<?php echo $this->getHtmlId() ?>">
|
28 |
+
<table cellspacing="0" cellpadding="0" class="massaction">
|
29 |
+
<tr>
|
30 |
+
<td><?php if ($this->getUseSelectAll()):?>
|
31 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.selectAll()"><?php echo $this->__('Select All') ?></a>
|
32 |
+
<span class="separator">|</span>
|
33 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.unselectAll()"><?php echo $this->__('Unselect All') ?></a>
|
34 |
+
<span class="separator">|</span>
|
35 |
+
<?php endif; ?>
|
36 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.selectVisible()"><?php echo $this->__('Select Visible') ?></a>
|
37 |
+
<span class="separator">|</span>
|
38 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.unselectVisible()"><?php echo $this->__('Unselect Visible') ?></a>
|
39 |
+
<span class="separator">|</span>
|
40 |
+
<strong id="<?php echo $this->getHtmlId() ?>-count">0</strong> <?php echo $this->__('items selected') ?>
|
41 |
+
</td>
|
42 |
+
<td>
|
43 |
+
<div class="right">
|
44 |
+
<div class="entry-edit">
|
45 |
+
<?php if ($this->getHideFormElement() !== true):?>
|
46 |
+
<form action="" id="<?php echo $this->getHtmlId() ?>-form" method="post">
|
47 |
+
<?php endif ?>
|
48 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
49 |
+
<?php echo $this->getHiddenParams() ?>
|
50 |
+
<fieldset>
|
51 |
+
<span class="field-row">
|
52 |
+
<label><?php echo $this->__('Actions') ?></label>
|
53 |
+
<select id="<?php echo $this->getHtmlId() ?>-select" class="required-entry select absolute-advice local-validation">
|
54 |
+
<option value=""></option>
|
55 |
+
<?php foreach($this->getItems() as $_item): ?>
|
56 |
+
<option value="<?php echo $_item->getId() ?>"<?php echo ($_item->getSelected() ? ' selected="selected"' : '')?>><?php echo $_item->getLabel() ?></option>
|
57 |
+
<?php endforeach; ?>
|
58 |
+
</select>
|
59 |
+
</span>
|
60 |
+
<span class="outer-span" id="<?php echo $this->getHtmlId() ?>-form-hiddens"></span>
|
61 |
+
<span class="outer-span" id="<?php echo $this->getHtmlId() ?>-form-additional"></span>
|
62 |
+
<span class="field-row">
|
63 |
+
<?php echo $this->getApplyButtonHtml() ?>
|
64 |
+
</span>
|
65 |
+
</fieldset>
|
66 |
+
<?php if ($this->getHideFormElement() !== true):?>
|
67 |
+
</form>
|
68 |
+
<?php endif ?>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div class="no-display">
|
72 |
+
<?php foreach($this->getItems() as $_item): ?>
|
73 |
+
<div id="<?php echo $this->getHtmlId() ?>-item-<?php echo $_item->getId() ?>-block">
|
74 |
+
<?php echo $_item->getAdditionalActionBlockHtml() ?>
|
75 |
+
</div>
|
76 |
+
<?php endforeach; ?>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
</table>
|
82 |
+
<?php if(!$this->getParentBlock()->canDisplayContainer()): ?>
|
83 |
+
<script type="text/javascript">
|
84 |
+
<?php echo $this->getJsObjectName() ?>.setGridIds('<?php echo $this->getGridIdsJson() ?>');
|
85 |
+
</script>
|
86 |
+
<?php endif; ?>
|
87 |
+
</div>
|
app/design/adminhtml/default/straker/template/straker/new/cms/page.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @see StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Products
|
4 |
+
*/
|
5 |
+
?>
|
6 |
+
<div class="content-header">
|
7 |
+
<table cellspacing="0">
|
8 |
+
<tr>
|
9 |
+
<td style="width:80%;"><h3 class="icon-head head-products"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->__('Select CMS Pages to Translate') ?></h3><h3 class="store-info-heading"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->renderNewJobHeading($this->getRequest()->getParam('store')) ?></h3></td>
|
10 |
+
<td class="a-right">
|
11 |
+
<?php echo $this->getButtonsHtml() ?>
|
12 |
+
</td>
|
13 |
+
</tr>
|
14 |
+
</table>
|
15 |
+
</div>
|
16 |
+
<ol class="wizard" data-wizard-steps="4">
|
17 |
+
<li class="wizard-done"><?php echo $this->__('Select Job Type') ?></li>
|
18 |
+
<li class="wizard-done"><?php echo $this->__('Select Details') ?></li>
|
19 |
+
<li class="wizard-todo"><?php echo $this->__('Select Content') ?></li>
|
20 |
+
<li class="wizard-todo"><?php echo $this->__('Confirm Content') ?></li>
|
21 |
+
</ol>
|
22 |
+
<div>
|
23 |
+
<?php echo $this->getGridHtml() ?>
|
24 |
+
</div>
|
25 |
+
<script>
|
26 |
+
Event.observe(window, "load", function() {
|
27 |
+
var buttonHtml = '<button title="Submit" type="button" class="right" onclick="strakerCmsPages_massactionJsObject.apply()" style=""><span><span><span>Submit</span></span></span></button>';
|
28 |
+
$('strakerCmsPages').insert({after: buttonHtml});
|
29 |
+
$$('.content-header-floating .content-header td.a-right')[0].insert(buttonHtml);
|
30 |
+
});
|
31 |
+
</script>
|
app/design/adminhtml/default/straker/template/straker/new/cms/page/attributes.phtml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="content-header">
|
2 |
+
<h3><?php echo $this->__('Create New Job') ?></h3><h3 class="store-info-heading"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->renderNewJobHeading($this->getRequest()->getParam('store')) ?></h3>
|
3 |
+
</div>
|
4 |
+
<ol class="wizard" data-wizard-steps="4">
|
5 |
+
<li class="wizard-done"><?php echo $this->__('Select Job Type') ?></li>
|
6 |
+
<li class="wizard-todo"><?php echo $this->__('Select Details') ?></li>
|
7 |
+
<li class="wizard-todo"><?php echo $this->__('Select Content') ?></li>
|
8 |
+
<li class="wizard-todo"><?php echo $this->__('Confirm Content') ?></li>
|
9 |
+
</ol>
|
10 |
+
<div class="straker-main-container border">
|
11 |
+
<h1><?php echo $this->__('CMS Page Details') ?></h1>
|
12 |
+
<p><?php echo $this->__('What CMS page details would you like to translate?') ?></p>
|
13 |
+
<form action="<?php echo Mage::helper("adminhtml")->getUrl("adminhtml/straker_cms_page/attribute") ?>" >
|
14 |
+
<div style="padding:0; margin-bottom: 30px;">
|
15 |
+
<div style="text-align: left;">
|
16 |
+
<input name="store" type="hidden" value="<?php echo $this->getSetupStoreId() ?>" />
|
17 |
+
<?php foreach($this->getAttributes() as $columnName => $label):?>
|
18 |
+
<input type="checkbox" name="attr[<?php echo $columnName ?>]" id="<?php echo $columnName ?>" value="1" checked="checked">
|
19 |
+
<label for="<?php echo $columnName ?>"><?php echo $label ?></label>
|
20 |
+
<br>
|
21 |
+
<?php endforeach; ?>
|
22 |
+
</div>
|
23 |
+
<div class="clear"></div>
|
24 |
+
<input type="submit" class="form-button right" value="Next" title="Next">
|
25 |
+
<input type="button" class="form-button right" value="Back" title="Back" onclick="window.location.href = '<?php echo $this->getUrl('*/straker_new', array('store'=> $this->getSetupStoreId())); ?>'">
|
26 |
+
</div>
|
27 |
+
</form>
|
28 |
+
</div>
|
app/design/adminhtml/default/straker/template/straker/new/cms/page/confirm.phtml
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @see StrakerTranslations_EasyTranslationPlatform_Block_Adminhtml_New_Products
|
4 |
+
*/
|
5 |
+
?>
|
6 |
+
<div class="content-header">
|
7 |
+
<table cellspacing="0">
|
8 |
+
<tr>
|
9 |
+
<td><h3 class="icon-head head-products"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->__('Confirm CMS Pages to Translate') ?></h3><h3 class="store-info-heading"><?php echo Mage::helper('strakertranslations_easytranslationplatform')->renderNewJobHeading($this->getStore()) ?></h3></td>
|
10 |
+
</tr>
|
11 |
+
</table>
|
12 |
+
</div>
|
13 |
+
<ol class="wizard" data-wizard-steps="4">
|
14 |
+
<li class="wizard-done"><?php echo $this->__('Select Job Type') ?></li>
|
15 |
+
<li class="wizard-done"><?php echo $this->__('Select Details') ?></li>
|
16 |
+
<li class="wizard-done"><?php echo $this->__('Select Content') ?></li>
|
17 |
+
<li class="wizard-todo"><?php echo $this->__('Confirm Content') ?></li>
|
18 |
+
</ol>
|
19 |
+
<?php $params = $this->getRequest()->getParams(); ?>
|
20 |
+
<a href="<?php echo Mage::helper("adminhtml")->getUrl("adminhtml/straker_cms_page/new", array('store'=>$this->getStore(), 'internal_cms_page'=>implode(',', $this->getCmsPage()), 'attr'=>$this->getAttr())) ?>"><?php echo $this->__('Edit CMS Pages') ?></a>
|
21 |
+
<form id="submit-new-job-form" action="<?php echo Mage::helper("adminhtml")->getUrl("adminhtml/straker_cms_page/submitjob") ?>" method="post">
|
22 |
+
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" >
|
23 |
+
<input type="hidden" name="cms_page" value="<?php echo implode(',', $this->getCmsPage()) ?>" >
|
24 |
+
<input type="hidden" name="store" value="<?php echo $this->getStore() ?>" >
|
25 |
+
<input type="hidden" name="attr" value="<?php echo $this->getAttr() ?>" >
|
26 |
+
</form>
|
27 |
+
<div class="right">
|
28 |
+
<?php echo $this->getButtonsHtml() ?>
|
29 |
+
</div>
|
30 |
+
<div>
|
31 |
+
<?php echo $this->getGridHtml() ?>
|
32 |
+
</div>
|
33 |
+
<script>
|
34 |
+
Event.observe(window, "load", function() {
|
35 |
+
var buttonHtml = '<button title="Submit" type="button" class="right" onclick="$(\'submit-new-job-form\').submit();" style=""><span><span><span>Submit</span></span></span></button>';
|
36 |
+
$('strakerCmsPages').insert({after: buttonHtml});
|
37 |
+
});
|
38 |
+
</script>
|
app/design/adminhtml/default/straker/template/straker/new/cms/page/massaction.phtml
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magento.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magento.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div id="<?php echo $this->getHtmlId() ?>">
|
28 |
+
<table cellspacing="0" cellpadding="0" class="massaction">
|
29 |
+
<tr>
|
30 |
+
<td><?php if ($this->getUseSelectAll()):?>
|
31 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.selectAll()"><?php echo $this->__('Select All') ?></a>
|
32 |
+
<span class="separator">|</span>
|
33 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.unselectAll()"><?php echo $this->__('Unselect All') ?></a>
|
34 |
+
<span class="separator">|</span>
|
35 |
+
<?php endif; ?>
|
36 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.selectVisible()"><?php echo $this->__('Select Visible') ?></a>
|
37 |
+
<span class="separator">|</span>
|
38 |
+
<a href="#" onclick="return <?php echo $this->getJsObjectName() ?>.unselectVisible()"><?php echo $this->__('Unselect Visible') ?></a>
|
39 |
+
<span class="separator">|</span>
|
40 |
+
<strong id="<?php echo $this->getHtmlId() ?>-count">0</strong> <?php echo $this->__('items selected') ?>
|
41 |
+
</td>
|
42 |
+
<td>
|
43 |
+
<div class="right">
|
44 |
+
<div class="entry-edit">
|
45 |
+
<?php if ($this->getHideFormElement() !== true):?>
|
46 |
+
<form action="" id="<?php echo $this->getHtmlId() ?>-form" method="post">
|
47 |
+
<?php endif ?>
|
48 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
49 |
+
<?php echo $this->getHiddenParams() ?>
|
50 |
+
<fieldset>
|
51 |
+
<span class="field-row">
|
52 |
+
<label><?php echo $this->__('Actions') ?></label>
|
53 |
+
<select id="<?php echo $this->getHtmlId() ?>-select" class="required-entry select absolute-advice local-validation">
|
54 |
+
<option value=""></option>
|
55 |
+
<?php foreach($this->getItems() as $_item): ?>
|
56 |
+
<option value="<?php echo $_item->getId() ?>"<?php echo ($_item->getSelected() ? ' selected="selected"' : '')?>><?php echo $_item->getLabel() ?></option>
|
57 |
+
<?php endforeach; ?>
|
58 |
+
</select>
|
59 |
+
</span>
|
60 |
+
<span class="outer-span" id="<?php echo $this->getHtmlId() ?>-form-hiddens"></span>
|
61 |
+
<span class="outer-span" id="<?php echo $this->getHtmlId() ?>-form-additional"></span>
|
62 |
+
<span class="field-row">
|
63 |
+
<?php echo $this->getApplyButtonHtml() ?>
|
64 |
+
</span>
|
65 |
+
</fieldset>
|
66 |
+
<?php if ($this->getHideFormElement() !== true):?>
|
67 |
+
</form>
|
68 |
+
<?php endif ?>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div class="no-display">
|
72 |
+
<?php foreach($this->getItems() as $_item): ?>
|
73 |
+
<div id="<?php echo $this->getHtmlId() ?>-item-<?php echo $_item->getId() ?>-block">
|
74 |
+
<?php echo $_item->getAdditionalActionBlockHtml() ?>
|
75 |
+
</div>
|
76 |
+
<?php endforeach; ?>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
</table>
|
82 |
+
<?php if(!$this->getParentBlock()->canDisplayContainer()): ?>
|
83 |
+
<script type="text/javascript">
|
84 |
+
<?php echo $this->getJsObjectName() ?>.setGridIds('<?php echo $this->getGridIdsJson() ?>');
|
85 |
+
</script>
|
86 |
+
<?php endif; ?>
|
87 |
+
</div>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>straker-translations-easy-translation-platform</name>
|
4 |
-
<version>1.2
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Total automation of the translation process, simple installation and setup, quality human translation at cost-effective rates, scalable to more than 80 languages and 1000s of projects and powerful dashboard reporting.</description>
|
11 |
<notes>Initial Stable release</notes>
|
12 |
<authors><author><name>Chris </name><user>Straker_support</user><email>extensions@strakertranslations.com</email></author></authors>
|
13 |
-
<date>2016-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="StrakerTranslations"><dir name="EasyTranslationPlatform"><dir name="Block"><dir name="Adminhtml"><dir name="Job"><dir name="Attribute"><file name="Grid.php" hash="58111da5ce029ff247dc84d0ced569fe"/></dir><file name="Attribute.php" hash="c355f64a030766afcf646b411035f85f"/><dir name="Category"><file name="Grid.php" hash="1ae3bfd56e78e76ba9d48eac508b06bd"/></dir><file name="Category.php" hash="f2c9c52e51b2112f32065beee4c3cafe"/><file name="Grid.php" hash="8872f97732a139ace260973041dfca5a"/><dir name="Product"><file name="Grid.php" hash="3f7ba41da65f9d86e9a103a5050c6a18"/></dir><file name="Product.php" hash="85f95b9ffd2a3f80fb62ad37b3cf11b5"/></dir><file name="Job.php" hash="bf5ad4cd596a3a93a54447ee112c0a23"/><dir name="New"><dir name="Attribute"><dir name="Confirm"><file name="Grid.php" hash="5ab113bb0a3e42ceef939b1b52c36876"/></dir><file name="Confirm.php" hash="d7ed18d35d0df6b899b402beb0800caa"/><file name="Grid.php" hash="77a95f55bcaa1a4e74224e9a8d162b2c"/></dir><file name="Attribute.php" hash="31f61557f7c69d8b90521e60bbb79898"/><dir name="Category"><file name="Attribute.php" hash="b6698a36ee449853edff1815fca6a56f"/><dir name="Confirm"><file name="Grid.php" hash="551ab5c0bc002fb618783befed6c37b7"/></dir><file name="Confirm.php" hash="b710371dceb26866857a62f9d19425e7"/><file name="Tree.php" hash="b405b4bf4969812e13d63d752cd89c23"/></dir><dir name="Products"><file name="Attribute.php" hash="f9b11618404c31e7ac91622a0188479d"/><dir name="Confirm"><file name="Grid.php" hash="e35a967bf2e3d9882889a67d7de26e09"/></dir><file name="Confirm.php" hash="d4dddb499ff29d646fcd48246666126a"/><file name="Grid.php" hash="df8e34c0b291730e7475513cbdc74c21"/></dir><file name="Products.php" hash="cd0c2de765d91c4c7a82cc74bb1797c9"/><file name="Register.php" hash="7f43aee445980708a6cb8510eec21e78"/><file name="Selectstore.php" hash="42553d67a4e14ca8f754ea096ddf9cf6"/><file name="Setupstore.php" hash="bc1ca941654f47f763d0e7605fc7b050"/><file name="Type.php" hash="9552bdb41b0dd5acd20f4e5c5928393a"/></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Backupbutton.php" hash="8bfae419ddceed0553db1f5dc5322356"/><file name="Button.php" hash="eb5d2544ba93cbcd09e534dc5b81bbc1"/><file name="Restorebutton.php" hash="e98058e6769f5308fa9f48fa19a22704"/><file name="Store.php" hash="5b98d4711b04acbb60d1b7c17405a4a6"/></dir></dir></dir><dir name="Template"><dir name="Grid"><dir name="Renderer"><file name="Action.php" hash="084ee85e3779a0d202594dd3212849d0"/><file name="AttributeOriginalLabel.php" hash="895fdf18d8993d3268d95541cca1a7a3"/><file name="AttributeOriginalOption.php" hash="3cbe41544c9a32a5742950392973a533"/><file name="AttributeTranslateLabel.php" hash="eef210480eea84f5fd69ded360697acf"/><file name="AttributeTranslateOption.php" hash="2393ee81a57d67de08d38c5e81ea9403"/><file name="Backend.php" hash="6ca085c9a5c50e635f8f4aa41d3314e1"/><file name="ConfirmTranslateLabel.php" hash="09fdb0146ab6f9fad36bff50042d2587"/><file name="ConfirmTranslateOptions.php" hash="90ba018bb7eef8d6ac3006b058d66197"/><file name="Dispute.php" hash="3bae4a4bbf43890a53a8c2698315430e"/><file name="Frontend.php" hash="f1a0c9a0b98e3e16ec28a46c11f3b71f"/><file name="Path.php" hash="5d9e268bde77a5e1d6d435a48d9f60b7"/><file name="Quote.php" hash="728f3e53af9619760a3921993a823ca6"/><file name="Refresh.php" hash="28db5556c4dad64f4d3aa808758673dd"/><file name="Selected.php" hash="88f58ed6edb419d1701a6f6a4955d881"/><file name="Status.php" hash="40059f5e24d61fdfa13e46c1bf6c9351"/><file name="TranslateOptions.php" hash="00f1c42c2205f76db4322fa0dbd686f6"/><file name="Translated.php" hash="cda1f5c402ed086974b76ee427c2a23a"/><file name="Update.php" hash="43a114983b2c00af3432e664512b1704"/><file name="Version.php" hash="908c1697bd48848a2ebf00cd38aa8dc1"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="be98f30a9ea8975f97f0996cd9a9a932"/></dir><dir name="Model"><file name="Actionlog.php" hash="bd8a61e14712e32937e0622376b07ae7"/><file name="Api.php" hash="28967043b3073fb37fc3cbdc69c3bd99"/><dir name="Attribute"><file name="Translate.php" hash="6ab35279fc74e807e433776d14155a55"/></dir><dir name="Category"><file name="Attributes.php" hash="31639770ebe8f2aa4b320d686786f716"/><file name="Translate.php" hash="63888c2d229d1cc860b2d3555470f597"/></dir><dir name="Job"><file name="Attribute.php" hash="6bc9221934346093ec6054704625808e"/><file name="Category.php" hash="37079e7131a4d10a9577afb499c6d7b6"/><file name="Product.php" hash="9f02ce34f909df6dd26c3414356ad565"/><file name="Status.php" hash="64c766deaf33bd0460c739f04544f8db"/><file name="Type.php" hash="c5010524e83e0c3c56595bcd72bba97d"/></dir><file name="Job.php" hash="64f37a91b33c5a4b169fad900412b9d5"/><dir name="Product"><file name="Attributes.php" hash="f8539bb8a73a59017b811bea7d99835b"/><file name="Translate.php" hash="ebe6df5219d4ca3ee71290bf3e1de0da"/></dir><dir name="Resource"><dir name="Actionlog"><file name="Collection.php" hash="a60fb59aa09d55b5e5d4f41d58e20e6f"/></dir><file name="Actionlog.php" hash="5742408ecac5dce23b3492d118d6ca41"/><dir name="Attribute"><dir name="Translate"><file name="Collection.php" hash="dc15902d152cdc907123bbd847bc124a"/></dir><file name="Translate.php" hash="f619af9fb3bb71e346d89a314c1d0a2c"/></dir><dir name="Category"><dir name="Attributes"><file name="Collection.php" hash="d0d1bdb74c8b6d3ebcd00e986bbda5ac"/></dir><file name="Attributes.php" hash="438aefd7fd4768a18dea3835e592d020"/><dir name="Translate"><file name="Collection.php" hash="6f9b263579ba9c988dbf476a9a8d5254"/></dir><file name="Translate.php" hash="3493c3a5f4dff5278e61cf758b58f09e"/></dir><dir name="Job"><dir name="Attribute"><file name="Collection.php" hash="e336ec26c414bdb050ae87d70487349a"/></dir><file name="Attribute.php" hash="6c096169a8867d54b37997312753a94e"/><dir name="Category"><file name="Collection.php" hash="6e29696c703503c821fb4fbeb04f7169"/></dir><file name="Category.php" hash="5cb332770a4600be8d82d5440a42a2a6"/><file name="Collection.php" hash="26b821d388a969c048418254c702767d"/><dir name="Product"><file name="Collection.php" hash="0b333a2caf8977dbc9a8e71e58c54de6"/></dir><file name="Product.php" hash="8b0dfa9ce28bc4292021055f9253ea5d"/><dir name="Status"><file name="Collection.php" hash="84dd6c9d32fda84ea11102692b5359a9"/></dir><file name="Status.php" hash="5e29fbf619c9b1278273266fb2ce2afa"/><dir name="Type"><file name="Collection.php" hash="625b61447aee152376c19f36a347d5d8"/></dir><file name="Type.php" hash="36b8ec250e3bc2377c1fb755459fad95"/></dir><file name="Job.php" hash="e400eedb5cfc3f742e58d567412ae1a0"/><dir name="Product"><dir name="Attributes"><file name="Collection.php" hash="3f479577ce23ba9f264125439c1d1099"/></dir><file name="Attributes.php" hash="93c962dc76384771d9139574796c16b5"/><dir name="Translate"><file name="Collection.php" hash="4dc7e3a0a44edd6acea4b8cf45b40d05"/></dir><file name="Translate.php" hash="f88f7ea6f6e1dfdc55ef648ddea2ca38"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Straker"><file name="AttributeController.php" hash="e39069c05d9674ec5ca5fefb9e3f2bdc"/><file name="CategoryController.php" hash="a5ef91045b5f614a787302e9592b9720"/><file name="JobController.php" hash="babcd1fc9edc21a9f38b2b6d84f5b3d7"/><file name="NewController.php" hash="f6cb7c1cef8ee0fc6b103164233c125a"/><file name="ProductController.php" hash="c60649321775e486944c1146b8ba5cff"/></dir></dir><file name="CallbackController.php" hash="c9abd6304f6f071940735a47ab658633"/></dir><dir name="etc"><file name="adminhtml.xml" hash="802ab54b889201efd9318ec11f220f18"/><file name="config.xml" hash="750ba5ec13095433b6706c9a034cfeea"/><file name="system.xml" hash="e047c334b01ea71b3108c02c1c5e7ae5"/></dir><dir name="sql"><dir name="strakertranslations_easytranslationplatform_setup"><file name="mysql4-install-1.0.0.php" hash="bb9810e99580d4a20431cd0cc22f5532"/><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="eb74b0ba3f3572ffc6dde4ace8d8640c"/><file name="mysql4-upgrade-1.1.0-1.2.0.php" hash="77cd0f3e3f7303b8492504dcb485e268"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="straker"><dir name="layout"><file name="straker.xml" hash="dff9e3ff88cf6494676f1be6f9297075"/></dir><dir name="template"><dir name="straker"><dir name="job"><dir name="attribute"><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="attribute.phtml" hash="e908bcbf0ad1435a35d6009f599c4f77"/><dir name="category"><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="category.phtml" hash="e908bcbf0ad1435a35d6009f599c4f77"/><dir name="product"><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="product.phtml" hash="e908bcbf0ad1435a35d6009f599c4f77"/></dir><file name="job.phtml" hash="63c7a5b66b969635ee9996638878d63c"/><dir name="new"><dir name="attribute"><file name="confirm.phtml" hash="1285dfdce8a71b0af7545aa8d77b360d"/><file name="massaction.phtml" hash="9dcf11014c7a598128a64c048e0108cf"/></dir><file name="attribute.phtml" hash="9f327fe0551b9d39e455b361d662ce08"/><dir name="category"><file name="attributes.phtml" hash="c92f98e8397ae9143c17c87e2e468758"/><dir name="confirm"><file name="grid.phtml" hash="8336aad4f7275992704b1b7ddaccac3e"/></dir><file name="confirm.phtml" hash="8e10afdfc326dc5e16f8d40125bfeaf8"/><file name="tree.phtml" hash="4599d5840d9bdf21cf5c057c6112dfcc"/></dir><file name="confirm.phtml" hash="72552d8f56335eb644a4c0ffe314f12b"/><dir name="products"><file name="attributes.phtml" hash="fdfeb163ffb82ae983b4872fe59d2b77"/><file name="confirm.phtml" hash="7905811dd324b034756d03a9b0711aca"/><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="products.phtml" hash="2930c175307b3178a7b8a6205981cdf2"/><file name="register.phtml" hash="13da4e89dafcdf0508343905121a6ed3"/><file name="selectstore.phtml" hash="59b46141938afec500ce3acf36da5427"/><file name="setupstore.phtml" hash="c3dab5a53f6007ac9608721bd75761bf"/><file name="type.phtml" hash="ab8bd7f6b5945af2e1dd0a9b19f0bfee"/></dir><dir name="system"><dir name="config"><file name="button.phtml" hash="9725dd1eea9e0a5c6ff9a34a31d5e433"/><file name="store.phtml" hash="accefd80ff19bf7c917c923b2aed961c"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="straker"><dir name="css"><file name="straker.css" hash="57016d58d283fb99ce355e3787c4569f"/><file name="straker.less" hash="c7da66380b98c31653054fd2f27c03c1"/></dir><dir name="images"><dir name="default"><file name="bottom_left.gif" hash="fb99ffa815a8648f95f42698fe5dfaa1"/><file name="bottom_mid.gif" hash="49b9ca7025562ea7f070a9111282364b"/><file name="bottom_right.gif" hash="e46768f632765cd86c5fe5d0166dcf2c"/><file name="bottom_right_resize.gif" hash="1b35a4ec3b734dfe37e31ba87bcc7d99"/><file name="center_left.gif" hash="bd567580b4ee16a7a2734057cfbbe219"/><file name="center_right.gif" hash="eef184d5d89d1710313581a2ccf408e8"/><file name="clear.gif" hash="7af1206eeb0e7834a75e69d70676060d"/><file name="close.gif" hash="8a08f243c37a8e25a88d4ac135b2f07d"/><file name="inspect.gif" hash="aa2a0961067aad5c54b8634919af863b"/><file name="maximize.gif" hash="e73cd71c4979ebeadeb9e27d40a9e8fb"/><file name="minimize.gif" hash="2d2f4b1bd0506f342425f80ab76c49a3"/><file name="overlay.png" hash="536d40e87cda0c7ae7b11f1721aa52d0"/><file name="resize.gif" hash="320f534b5d444b39701e0b679529e779"/><file name="sizer.gif" hash="1b35a4ec3b734dfe37e31ba87bcc7d99"/><file name="top_left.gif" hash="9c5e5920bfc189a45cc618099af93aa8"/><file name="top_mid.gif" hash="a12ff2b944025ad2d127d033dae5e9e1"/><file name="top_right.gif" hash="0cf1ec5b93f8ac8fcce0e2f72cf7f45e"/></dir><file name="magento-banner.jpg" hash="b3105fd2dd00004ab903db4fbb81b61e"/><file name="refresh_32.png" hash="96e793bcbcc2dc48768b8e124beea378"/><file name="straker-translations-logo.png" hash="7cb5e29f562420142f918147d95ed232"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="StrakerTranslations_EasyTranslationPlatform.xml" hash="eb61fdaac7559a75e39bc01206165d0c"/></dir></target><target name="mage"><dir name="js"><dir name="straker"><file name="translations.js" hash="af7812040012a3ea23fb2782ca293884"/></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>straker-translations-easy-translation-platform</name>
|
4 |
+
<version>1.3.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Total automation of the translation process, simple installation and setup, quality human translation at cost-effective rates, scalable to more than 80 languages and 1000s of projects and powerful dashboard reporting.</description>
|
11 |
<notes>Initial Stable release</notes>
|
12 |
<authors><author><name>Chris </name><user>Straker_support</user><email>extensions@strakertranslations.com</email></author></authors>
|
13 |
+
<date>2016-07-06</date>
|
14 |
+
<time>23:28:05</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="StrakerTranslations"><dir name="EasyTranslationPlatform"><dir name="Block"><dir name="Adminhtml"><dir name="Cms"><dir name="Block"><file name="Grid.php" hash="a91cad8f4e6b0920287f69f6e995b860"/></dir><dir name="Page"><file name="Grid.php" hash="30f9866bc414f611a9f279f6fab65756"/></dir></dir><dir name="Job"><dir name="Attribute"><file name="Grid.php" hash="58111da5ce029ff247dc84d0ced569fe"/></dir><file name="Attribute.php" hash="c355f64a030766afcf646b411035f85f"/><dir name="Category"><file name="Grid.php" hash="1ae3bfd56e78e76ba9d48eac508b06bd"/></dir><file name="Category.php" hash="f2c9c52e51b2112f32065beee4c3cafe"/><dir name="Cms"><dir name="Block"><file name="Grid.php" hash="12c391e13201367a4887a407d0ffed00"/></dir><file name="Block.php" hash="e5ab4001b92c2bccc442ae4cfb59f047"/><dir name="Page"><file name="Grid.php" hash="bf37702f1a5fccef2fa628bc2c5ee71b"/></dir><file name="Page.php" hash="b7c14cf9b9892977d4c945d7d4b5e4bd"/></dir><file name="Grid.php" hash="8872f97732a139ace260973041dfca5a"/><dir name="Product"><file name="Grid.php" hash="3f7ba41da65f9d86e9a103a5050c6a18"/></dir><file name="Product.php" hash="85f95b9ffd2a3f80fb62ad37b3cf11b5"/></dir><file name="Job.php" hash="bf5ad4cd596a3a93a54447ee112c0a23"/><dir name="New"><dir name="Attribute"><dir name="Confirm"><file name="Grid.php" hash="5ab113bb0a3e42ceef939b1b52c36876"/></dir><file name="Confirm.php" hash="d7ed18d35d0df6b899b402beb0800caa"/><file name="Grid.php" hash="77a95f55bcaa1a4e74224e9a8d162b2c"/></dir><file name="Attribute.php" hash="31f61557f7c69d8b90521e60bbb79898"/><dir name="Category"><file name="Attribute.php" hash="b6698a36ee449853edff1815fca6a56f"/><dir name="Confirm"><file name="Grid.php" hash="551ab5c0bc002fb618783befed6c37b7"/></dir><file name="Confirm.php" hash="b710371dceb26866857a62f9d19425e7"/><file name="Tree.php" hash="b405b4bf4969812e13d63d752cd89c23"/></dir><dir name="Cms"><dir name="Block"><file name="Attribute.php" hash="698021304ad1346b6f8476fd629c8eed"/><dir name="Confirm"><file name="Grid.php" hash="dcf6c9a7a3a844963076b5140370507c"/></dir><file name="Confirm.php" hash="d38a9be9238e8eff3c322529e066b2ae"/><file name="Grid.php" hash="25cd4beda99cf997a108db78d6af2b32"/></dir><file name="Block.php" hash="771df45fe8fa9d24b7a920f485cc67a4"/><dir name="Page"><file name="Attribute.php" hash="3643f4821171d2efb08f478db03b2eaa"/><dir name="Confirm"><file name="Grid.php" hash="5c77ef51a041fc61422efe3467e5be75"/></dir><file name="Confirm.php" hash="ca21f36fe293b10f5a7f0be7d4acd437"/><file name="Grid.php" hash="57c94125c38f0be2729efda49873f793"/></dir><file name="Page.php" hash="d4f32301e714f1e6692ace8ed40ec5c4"/></dir><dir name="Products"><file name="Attribute.php" hash="f9b11618404c31e7ac91622a0188479d"/><dir name="Confirm"><file name="Grid.php" hash="e35a967bf2e3d9882889a67d7de26e09"/></dir><file name="Confirm.php" hash="d4dddb499ff29d646fcd48246666126a"/><file name="Grid.php" hash="df8e34c0b291730e7475513cbdc74c21"/></dir><file name="Products.php" hash="cd0c2de765d91c4c7a82cc74bb1797c9"/><file name="Register.php" hash="7f43aee445980708a6cb8510eec21e78"/><file name="Selectstore.php" hash="42553d67a4e14ca8f754ea096ddf9cf6"/><file name="Setupstore.php" hash="bc1ca941654f47f763d0e7605fc7b050"/><file name="Type.php" hash="6786a8663d019a616dfcd229f609b0cf"/></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Backupbutton.php" hash="8bfae419ddceed0553db1f5dc5322356"/><file name="Button.php" hash="eb5d2544ba93cbcd09e534dc5b81bbc1"/><file name="Restorebutton.php" hash="e98058e6769f5308fa9f48fa19a22704"/><file name="Store.php" hash="5b98d4711b04acbb60d1b7c17405a4a6"/></dir></dir></dir><dir name="Template"><dir name="Grid"><dir name="Renderer"><file name="Action.php" hash="47a1988c0136fa892856d7390af1d6bd"/><file name="AttributeOriginalLabel.php" hash="895fdf18d8993d3268d95541cca1a7a3"/><file name="AttributeOriginalOption.php" hash="3cbe41544c9a32a5742950392973a533"/><file name="AttributeTranslateLabel.php" hash="eef210480eea84f5fd69ded360697acf"/><file name="AttributeTranslateOption.php" hash="2393ee81a57d67de08d38c5e81ea9403"/><file name="Backend.php" hash="6ca085c9a5c50e635f8f4aa41d3314e1"/><file name="CmsOriginTitle.php" hash="e66578d499b77b65226ec3be9e727c56"/><file name="CmsVersion.php" hash="d396904cc2b8637e87c3332eff877436"/><file name="ConfirmTranslateLabel.php" hash="09fdb0146ab6f9fad36bff50042d2587"/><file name="ConfirmTranslateOptions.php" hash="90ba018bb7eef8d6ac3006b058d66197"/><file name="Dispute.php" hash="3bae4a4bbf43890a53a8c2698315430e"/><file name="Frontend.php" hash="f1a0c9a0b98e3e16ec28a46c11f3b71f"/><file name="Path.php" hash="5d9e268bde77a5e1d6d435a48d9f60b7"/><file name="Quote.php" hash="728f3e53af9619760a3921993a823ca6"/><file name="Refresh.php" hash="28db5556c4dad64f4d3aa808758673dd"/><file name="Selected.php" hash="88f58ed6edb419d1701a6f6a4955d881"/><file name="Status.php" hash="fd88108278d137995b6bbd2b9747a179"/><file name="StrakerTranslated.php" hash="8f6d3a963627f02fcd092c4103843c61"/><file name="TranslateOptions.php" hash="00f1c42c2205f76db4322fa0dbd686f6"/><file name="Translated.php" hash="cda1f5c402ed086974b76ee427c2a23a"/><file name="Update.php" hash="43a114983b2c00af3432e664512b1704"/><file name="Version.php" hash="908c1697bd48848a2ebf00cd38aa8dc1"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="87b463fe9801879b9e7bffce16c9a1bc"/></dir><dir name="Model"><file name="Actionlog.php" hash="bd8a61e14712e32937e0622376b07ae7"/><file name="Api.php" hash="28967043b3073fb37fc3cbdc69c3bd99"/><dir name="Attribute"><file name="Translate.php" hash="6ab35279fc74e807e433776d14155a55"/></dir><dir name="Category"><file name="Attributes.php" hash="31639770ebe8f2aa4b320d686786f716"/><file name="Translate.php" hash="63888c2d229d1cc860b2d3555470f597"/></dir><dir name="Cms"><dir name="Block"><file name="Attributes.php" hash="1df167ceeea902db512b297d601336b8"/><file name="Translate.php" hash="2603aaff40894a99122cdec6c19bcb97"/></dir><dir name="Page"><file name="Attributes.php" hash="f9aa8f988a06b442d44c5e1e3c044b0c"/><file name="Translate.php" hash="74e4749da4273c1476bd2821144b7fd1"/></dir></dir><dir name="Job"><file name="Attribute.php" hash="6bc9221934346093ec6054704625808e"/><file name="Category.php" hash="37079e7131a4d10a9577afb499c6d7b6"/><dir name="Cms"><file name="Block.php" hash="2263b8165de77cda0c368a6b127e5edb"/><file name="Page.php" hash="54cf2ffb4943b3bcffe28a5fc60a0d00"/></dir><file name="Product.php" hash="9f02ce34f909df6dd26c3414356ad565"/><file name="Status.php" hash="64c766deaf33bd0460c739f04544f8db"/><file name="Type.php" hash="c5010524e83e0c3c56595bcd72bba97d"/></dir><file name="Job.php" hash="50d7352e1f49ef8f886185ff63096e6b"/><dir name="Product"><file name="Attributes.php" hash="f8539bb8a73a59017b811bea7d99835b"/><file name="Translate.php" hash="ebe6df5219d4ca3ee71290bf3e1de0da"/></dir><dir name="Resource"><dir name="Actionlog"><file name="Collection.php" hash="a60fb59aa09d55b5e5d4f41d58e20e6f"/></dir><file name="Actionlog.php" hash="5742408ecac5dce23b3492d118d6ca41"/><dir name="Attribute"><dir name="Translate"><file name="Collection.php" hash="dc15902d152cdc907123bbd847bc124a"/></dir><file name="Translate.php" hash="f619af9fb3bb71e346d89a314c1d0a2c"/></dir><dir name="Category"><dir name="Attributes"><file name="Collection.php" hash="d0d1bdb74c8b6d3ebcd00e986bbda5ac"/></dir><file name="Attributes.php" hash="438aefd7fd4768a18dea3835e592d020"/><dir name="Translate"><file name="Collection.php" hash="6f9b263579ba9c988dbf476a9a8d5254"/></dir><file name="Translate.php" hash="3493c3a5f4dff5278e61cf758b58f09e"/></dir><dir name="Cms"><dir name="Block"><dir name="Attributes"><file name="Collection.php" hash="877832a90560893e916e43b967e6dc34"/></dir><file name="Attributes.php" hash="09ff0c55a851e01cb84ea36d04f25991"/><dir name="Translate"><file name="Collection.php" hash="de7c22817b8216ba532469e22530fc9e"/></dir><file name="Translate.php" hash="a42c5543d64b231251c50623c06267e3"/></dir><dir name="Page"><dir name="Attributes"><file name="Collection.php" hash="e1316d1cd3595bbfb7733b2ac237796e"/></dir><file name="Attributes.php" hash="17aad05de17f6e1457ee41022acdce17"/><dir name="Translate"><file name="Collection.php" hash="6d3a9c65e8cab69179ac62d3cf4a86eb"/></dir><file name="Translate.php" hash="875bb57fe743508ff7fb46d7cb5031f9"/></dir></dir><dir name="Job"><dir name="Attribute"><file name="Collection.php" hash="e336ec26c414bdb050ae87d70487349a"/></dir><file name="Attribute.php" hash="6c096169a8867d54b37997312753a94e"/><dir name="Category"><file name="Collection.php" hash="6e29696c703503c821fb4fbeb04f7169"/></dir><file name="Category.php" hash="5cb332770a4600be8d82d5440a42a2a6"/><dir name="Cms"><dir name="Block"><file name="Collection.php" hash="6524c7d53db9e32d2802e571cc54a8ca"/></dir><file name="Block.php" hash="9de78cd2dad032b94b7a0fe32ca6b785"/><dir name="Page"><file name="Collection.php" hash="b36385630e4cd6fd25a233305bd8d359"/></dir><file name="Page.php" hash="0d449938e643605e500efc3f4c4f13ea"/></dir><file name="Collection.php" hash="26b821d388a969c048418254c702767d"/><dir name="Product"><file name="Collection.php" hash="0b333a2caf8977dbc9a8e71e58c54de6"/></dir><file name="Product.php" hash="8b0dfa9ce28bc4292021055f9253ea5d"/><dir name="Status"><file name="Collection.php" hash="84dd6c9d32fda84ea11102692b5359a9"/></dir><file name="Status.php" hash="5e29fbf619c9b1278273266fb2ce2afa"/><dir name="Type"><file name="Collection.php" hash="625b61447aee152376c19f36a347d5d8"/></dir><file name="Type.php" hash="36b8ec250e3bc2377c1fb755459fad95"/></dir><file name="Job.php" hash="e400eedb5cfc3f742e58d567412ae1a0"/><dir name="Product"><dir name="Attributes"><file name="Collection.php" hash="3f479577ce23ba9f264125439c1d1099"/></dir><file name="Attributes.php" hash="93c962dc76384771d9139574796c16b5"/><dir name="Translate"><file name="Collection.php" hash="4dc7e3a0a44edd6acea4b8cf45b40d05"/></dir><file name="Translate.php" hash="f88f7ea6f6e1dfdc55ef648ddea2ca38"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Straker"><file name="AttributeController.php" hash="e39069c05d9674ec5ca5fefb9e3f2bdc"/><file name="CategoryController.php" hash="a5ef91045b5f614a787302e9592b9720"/><dir name="Cms"><file name="BlockController.php" hash="2627bff77c3b5fafc0ad1102ce716445"/><file name="PageController.php" hash="e43d66294440afb15294217135334e80"/></dir><file name="JobController.php" hash="babcd1fc9edc21a9f38b2b6d84f5b3d7"/><file name="NewController.php" hash="6351201a63cb651af2aa0575d044e35f"/><file name="ProductController.php" hash="c60649321775e486944c1146b8ba5cff"/></dir></dir><file name="CallbackController.php" hash="c9abd6304f6f071940735a47ab658633"/></dir><dir name="etc"><file name="adminhtml.xml" hash="802ab54b889201efd9318ec11f220f18"/><file name="config.xml" hash="fd1c46267c5c78750495b96e98547075"/><file name="system.xml" hash="e047c334b01ea71b3108c02c1c5e7ae5"/></dir><dir name="sql"><dir name="strakertranslations_easytranslationplatform_setup"><file name="mysql4-install-1.0.0.php" hash="bb9810e99580d4a20431cd0cc22f5532"/><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="eb74b0ba3f3572ffc6dde4ace8d8640c"/><file name="mysql4-upgrade-1.1.0-1.2.0.php" hash="77cd0f3e3f7303b8492504dcb485e268"/><file name="mysql4-upgrade-1.3.0-1.3.1.php" hash="a2cb7c86542fdb7778318669b2965191"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="straker"><dir name="layout"><file name="straker.xml" hash="52ec2d65c1ac817a5f1603e916037d15"/></dir><dir name="template"><dir name="cms"><dir name="form"><file name="container.phtml" hash="9069e9f2e13f3f0c1f175920c295ee65"/></dir></dir><dir name="straker"><dir name="job"><dir name="attribute"><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="attribute.phtml" hash="e908bcbf0ad1435a35d6009f599c4f77"/><dir name="category"><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="category.phtml" hash="e908bcbf0ad1435a35d6009f599c4f77"/><dir name="cms"><dir name="block"><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="block.phtml" hash="e908bcbf0ad1435a35d6009f599c4f77"/><dir name="page"><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="page.phtml" hash="e908bcbf0ad1435a35d6009f599c4f77"/></dir><dir name="product"><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="product.phtml" hash="e908bcbf0ad1435a35d6009f599c4f77"/></dir><file name="job.phtml" hash="63c7a5b66b969635ee9996638878d63c"/><dir name="new"><dir name="attribute"><file name="confirm.phtml" hash="1285dfdce8a71b0af7545aa8d77b360d"/><file name="massaction.phtml" hash="9dcf11014c7a598128a64c048e0108cf"/></dir><file name="attribute.phtml" hash="9f327fe0551b9d39e455b361d662ce08"/><dir name="category"><file name="attributes.phtml" hash="c92f98e8397ae9143c17c87e2e468758"/><dir name="confirm"><file name="grid.phtml" hash="8336aad4f7275992704b1b7ddaccac3e"/></dir><file name="confirm.phtml" hash="8e10afdfc326dc5e16f8d40125bfeaf8"/><file name="tree.phtml" hash="4599d5840d9bdf21cf5c057c6112dfcc"/></dir><dir name="cms"><dir name="block"><file name="attributes.phtml" hash="b2767598f08b2159c952c446f306e717"/><file name="confirm.phtml" hash="a7369555063de98c418c6cdf64485b6c"/><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="block.phtml" hash="6ad391571d617ca4f262d3bc15a41d7c"/><dir name="page"><file name="attributes.phtml" hash="288ef5992432d95493f919372af419bb"/><file name="confirm.phtml" hash="329c1f0943eda97164bda08e712a929c"/><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="page.phtml" hash="9e5e384888f81b5933ea2deb8dd9e0e8"/></dir><file name="confirm.phtml" hash="72552d8f56335eb644a4c0ffe314f12b"/><dir name="products"><file name="attributes.phtml" hash="fdfeb163ffb82ae983b4872fe59d2b77"/><file name="confirm.phtml" hash="7905811dd324b034756d03a9b0711aca"/><file name="massaction.phtml" hash="1c3b4ce443f6e4086bcc362d43f75354"/></dir><file name="products.phtml" hash="2930c175307b3178a7b8a6205981cdf2"/><file name="register.phtml" hash="13da4e89dafcdf0508343905121a6ed3"/><file name="selectstore.phtml" hash="59b46141938afec500ce3acf36da5427"/><file name="setupstore.phtml" hash="c3dab5a53f6007ac9608721bd75761bf"/><file name="type.phtml" hash="ab8bd7f6b5945af2e1dd0a9b19f0bfee"/></dir><dir name="system"><dir name="config"><file name="button.phtml" hash="9725dd1eea9e0a5c6ff9a34a31d5e433"/><file name="store.phtml" hash="accefd80ff19bf7c917c923b2aed961c"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="straker"><dir name="css"><file name="straker.css" hash="7de7c21b46326f421fcbb6363ab9e955"/><file name="straker.less" hash="5455064a2c31680a823d39bdc24997b0"/></dir><dir name="images"><dir name="default"><file name="bottom_left.gif" hash="fb99ffa815a8648f95f42698fe5dfaa1"/><file name="bottom_mid.gif" hash="49b9ca7025562ea7f070a9111282364b"/><file name="bottom_right.gif" hash="e46768f632765cd86c5fe5d0166dcf2c"/><file name="bottom_right_resize.gif" hash="1b35a4ec3b734dfe37e31ba87bcc7d99"/><file name="center_left.gif" hash="bd567580b4ee16a7a2734057cfbbe219"/><file name="center_right.gif" hash="eef184d5d89d1710313581a2ccf408e8"/><file name="clear.gif" hash="7af1206eeb0e7834a75e69d70676060d"/><file name="close.gif" hash="8a08f243c37a8e25a88d4ac135b2f07d"/><file name="inspect.gif" hash="aa2a0961067aad5c54b8634919af863b"/><file name="maximize.gif" hash="e73cd71c4979ebeadeb9e27d40a9e8fb"/><file name="minimize.gif" hash="2d2f4b1bd0506f342425f80ab76c49a3"/><file name="overlay.png" hash="536d40e87cda0c7ae7b11f1721aa52d0"/><file name="resize.gif" hash="320f534b5d444b39701e0b679529e779"/><file name="sizer.gif" hash="1b35a4ec3b734dfe37e31ba87bcc7d99"/><file name="top_left.gif" hash="9c5e5920bfc189a45cc618099af93aa8"/><file name="top_mid.gif" hash="a12ff2b944025ad2d127d033dae5e9e1"/><file name="top_right.gif" hash="0cf1ec5b93f8ac8fcce0e2f72cf7f45e"/></dir><file name="magento-banner.jpg" hash="b3105fd2dd00004ab903db4fbb81b61e"/><file name="refresh_32.png" hash="96e793bcbcc2dc48768b8e124beea378"/><file name="straker-translations-logo.png" hash="7cb5e29f562420142f918147d95ed232"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="StrakerTranslations_EasyTranslationPlatform.xml" hash="eb61fdaac7559a75e39bc01206165d0c"/></dir></target><target name="mage"><dir name="js"><dir name="straker"><file name="translations.js" hash="af7812040012a3ea23fb2782ca293884"/></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
skin/adminhtml/default/straker/css/straker.css
CHANGED
@@ -465,3 +465,21 @@ ol.wizard {
|
|
465 |
#selectstore-form .validation-advice {
|
466 |
margin-left: 25%;
|
467 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
#selectstore-form .validation-advice {
|
466 |
margin-left: 25%;
|
467 |
}
|
468 |
+
#straker-cms-title-message {
|
469 |
+
margin-bottom: 20px;
|
470 |
+
font-size: 14px;
|
471 |
+
line-height: 20px;
|
472 |
+
}
|
473 |
+
#straker-cms-title-message #straker-icon {
|
474 |
+
color: #31BBEA;
|
475 |
+
}
|
476 |
+
#straker-cms-title-message #straker-icon::before {
|
477 |
+
content: ' ';
|
478 |
+
display: inline-block;
|
479 |
+
height: 20px;
|
480 |
+
width: 20px;
|
481 |
+
background: transparent url(../images/straker-translations-logo.png);
|
482 |
+
background-size: 100% 100%;
|
483 |
+
vertical-align: top;
|
484 |
+
margin-left: 5px;
|
485 |
+
}
|
skin/adminhtml/default/straker/css/straker.less
CHANGED
@@ -501,4 +501,23 @@ ol.wizard{
|
|
501 |
}
|
502 |
#selectstore-form .validation-advice{
|
503 |
margin-left: 25%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
}
|
501 |
}
|
502 |
#selectstore-form .validation-advice{
|
503 |
margin-left: 25%;
|
504 |
+
}
|
505 |
+
|
506 |
+
#straker-cms-title-message{
|
507 |
+
margin-bottom: 20px;
|
508 |
+
font-size: 14px;
|
509 |
+
line-height: 20px;
|
510 |
+
#straker-icon{
|
511 |
+
color: #31BBEA;
|
512 |
+
&::before{
|
513 |
+
content: ' ';
|
514 |
+
display: inline-block;
|
515 |
+
height: 20px;
|
516 |
+
width: 20px;
|
517 |
+
background: transparent url(../images/straker-translations-logo.png);
|
518 |
+
background-size: 100% 100%;
|
519 |
+
vertical-align: top;
|
520 |
+
margin-left: 5px;
|
521 |
+
}
|
522 |
+
}
|
523 |
}
|