Version Notes
NA
Download this release
Release Info
Developer | Translations.com |
Extension | GlobalLink |
Version | 2.0.0 |
Comparing to | |
See all releases |
Version 2.0.0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Catalog/Product/Adaptor.php +128 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glactivesubmissions.php +59 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glactivesubmissions/Grid.php +124 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcategory.php +61 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcategory/Grid.php +141 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcmsblock.php +63 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcmsblock/Grid.php +127 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcmspage.php +62 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcmspage/Grid.php +133 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glemailtemplate.php +61 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glemailtemplate/Grid.php +103 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glfield.php +54 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glfield/Grid.php +95 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glnewslettertemplate.php +61 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glnewslettertemplate/Grid.php +116 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glproduct.php +62 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glproduct/Grid.php +212 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glreceivetranslations.php +53 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Glreceivetranslations/Grid.php +125 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Renderer/Action.php +71 -0
- app/code/community/Transperfect/Globallink/Block/Adminhtml/Renderer/Delete.php +28 -0
- app/code/community/Transperfect/Globallink/Helper/Data.php +1127 -0
- app/code/community/Transperfect/Globallink/Model/Glfield.php +24 -0
- app/code/community/Transperfect/Globallink/Model/Glstatus.php +29 -0
- app/code/community/Transperfect/Globallink/Model/Gltranslatecsv.php +54 -0
- app/code/community/Transperfect/Globallink/Model/Mysql4/Glfield.php +23 -0
- app/code/community/Transperfect/Globallink/Model/Mysql4/Glfield/Collection.php +23 -0
- app/code/community/Transperfect/Globallink/Model/Mysql4/Glstatus.php +23 -0
- app/code/community/Transperfect/Globallink/Model/Mysql4/Glstatus/Collection.php +22 -0
- app/code/community/Transperfect/Globallink/Model/Observer.php +129 -0
- app/code/community/Transperfect/Globallink/Model/Resource/Mysql4/Setup.php +20 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/AdaptorController.php +161 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/AttributesetsController.php +81 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/ConfigurationController.php +139 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlactivesubmissionsController.php +162 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlcategoryController.php +66 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlcmsblockController.php +63 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlcmspageController.php +63 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlcreatesubmissionController.php +711 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlemailtemplateController.php +47 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlfieldController.php +151 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlnewslettertemplateController.php +47 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlproductController.php +65 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlreceivetranslationsController.php +254 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/LocaleconfigController.php +137 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/GlobalLink.php +39 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/ProjectDirector.php +29 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/client/DocumentService2.php +995 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/client/ProjectService2.php +954 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/client/SessionService2.php +114 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/client/SubmissionService2.php +1108 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/client/TargetService2.php +1257 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/gl_ws_common.php +328 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/gl_ws_receive_translations.php +178 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/gl_ws_send_translations.php +173 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/DocumentService2.wsdl +336 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/ProjectService2.wsdl +268 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/SessionService2.wsdl +144 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/SubmissionService2.wsdl +518 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/TargetService2.wsdl +733 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/types.xsd +537 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/typesInternal.xsd +502 -0
- app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/xmime.xsd +47 -0
- app/code/community/Transperfect/Globallink/etc/config.xml +228 -0
- app/code/community/Transperfect/Globallink/sql/globallink_setup/mysql4-install-1.0.0.php +423 -0
- app/code/community/Transperfect/Globallink/transperfect_cron_sample.php +33 -0
- app/design/adminhtml/default/default/layout/globallink.xml +61 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/attributesets.phtml +159 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/configuration.phtml +210 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/glactivesubmissions.phtml +110 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/glcategory.phtml +120 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/glcmsblock.phtml +108 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/glcmspage.phtml +108 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/glcreatesubmission.phtml +299 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/glemailtemplate.phtml +68 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/glfield.phtml +109 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/glnewslettertemplate.phtml +68 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/glproduct.phtml +124 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/glreceivetranslations.phtml +99 -0
- app/design/adminhtml/default/default/template/globallink/adminhtml/localeconfig.phtml +238 -0
- app/design/adminhtml/default/default/template/globallink/catalog/product/adaptor.phtml +281 -0
- app/etc/modules/Transperfect_Globallink.xml +9 -0
- package.xml +18 -0
app/code/community/Transperfect/Globallink/Block/Adminhtml/Catalog/Product/Adaptor.php
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class Transperfect_Globallink_Block_Adminhtml_Catalog_Product_Adaptor extends Mage_Adminhtml_Block_Template implements Mage_Adminhtml_Block_Widget_Tab_Interface {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Set the template for the block
|
20 |
+
*
|
21 |
+
*/
|
22 |
+
public function _construct() {
|
23 |
+
parent::_construct();
|
24 |
+
|
25 |
+
$product = $this->getProduct();
|
26 |
+
|
27 |
+
$this->setTemplate('globallink/catalog/product/adaptor.phtml');
|
28 |
+
$this->setProduct($product);
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Retrieve the label used for the tab relating to this block
|
33 |
+
*
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
public function getTabLabel() {
|
37 |
+
return $this->__('GlobalLink Translation');
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Retrieve the title used by this tab
|
42 |
+
*
|
43 |
+
* @return string
|
44 |
+
*/
|
45 |
+
public function getTabTitle() {
|
46 |
+
return $this->__('Click here for GlobalLink Translation');
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Retrieve edited product model instance
|
51 |
+
*
|
52 |
+
* @return Mage_Catalog_Model_Product
|
53 |
+
*/
|
54 |
+
public function getProduct() {
|
55 |
+
return Mage::registry('product');
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getStoreId() {
|
59 |
+
return $this->getProduct()->getStoreId();
|
60 |
+
}
|
61 |
+
|
62 |
+
public function getProductId() {
|
63 |
+
return $this->getProduct()->getId();
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Determines whether to display the tab
|
68 |
+
* Add logic here to decide whether you want the tab to display
|
69 |
+
*
|
70 |
+
* @return bool
|
71 |
+
*/
|
72 |
+
public function canShowTab() {
|
73 |
+
return true;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Stops the tab being hidden
|
78 |
+
*
|
79 |
+
* @return bool
|
80 |
+
*/
|
81 |
+
public function isHidden() {
|
82 |
+
return false;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* AJAX TAB's
|
87 |
+
* If you want to use an AJAX tab, uncomment the following functions
|
88 |
+
* Please note that you will need to setup a controller to recieve
|
89 |
+
* the tab content request
|
90 |
+
*
|
91 |
+
*/
|
92 |
+
/**
|
93 |
+
* Retrieve the class name of the tab
|
94 |
+
* Return 'ajax' here if you want the tab to be loaded via Ajax
|
95 |
+
*
|
96 |
+
* return string
|
97 |
+
*/
|
98 |
+
# public function getTabClass()
|
99 |
+
# {
|
100 |
+
# return 'my-custom-tab';
|
101 |
+
# }
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Determine whether to generate content on load or via AJAX
|
105 |
+
* If true, the tab's content won't be loaded until the tab is clicked
|
106 |
+
* You will need to setup a controller to handle the tab request
|
107 |
+
*
|
108 |
+
* @return bool
|
109 |
+
*/
|
110 |
+
# public function getSkipGenerateContent()
|
111 |
+
# {
|
112 |
+
# return false;
|
113 |
+
# }
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Retrieve the URL used to load the tab content
|
117 |
+
* Return the URL here used to load the content by Ajax
|
118 |
+
* see self::getSkipGenerateContent & self::getTabClass
|
119 |
+
*
|
120 |
+
* @return string
|
121 |
+
*/
|
122 |
+
# public function getTabUrl()
|
123 |
+
# {
|
124 |
+
# return null;
|
125 |
+
# }
|
126 |
+
}
|
127 |
+
|
128 |
+
?>
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glactivesubmissions.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Block_Adminhtml_Glactivesubmissions extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
$this->_controller = 'adminhtml_glactivesubmissions';
|
20 |
+
$this->_blockGroup = 'globallink';
|
21 |
+
$this->_headerText = 'Header Text';
|
22 |
+
$this->_addButtonLabel = 'Button Label';
|
23 |
+
$this->setTemplate('globallink/adminhtml/glactivesubmissions.phtml');
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Prepare button and grid
|
28 |
+
*
|
29 |
+
* @return Mage_Adminhtml_Block_Catalog_Product
|
30 |
+
*/
|
31 |
+
protected function _prepareLayout() {
|
32 |
+
$this->setChild('grid', $this->getLayout()->createBlock('globallink/adminhtml_glactivesubmissions_grid', 'adminhtml_glactivesubmissions.grid')->setSaveParametersInSession(true));
|
33 |
+
return parent::_prepareLayout();
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Render grid
|
38 |
+
*
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
public function getGridHtml() {
|
42 |
+
return $this->getChildHtml('grid');
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Check whether it is single store mode
|
47 |
+
*
|
48 |
+
* @return bool
|
49 |
+
*/
|
50 |
+
public function isSingleStoreMode() {
|
51 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
return true;
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
58 |
+
?>
|
59 |
+
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glactivesubmissions/Grid.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* � 2013 Translations.com, a TransPerfect company
|
4 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
5 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
6 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
7 |
+
*
|
8 |
+
* By making use of the Software, you agree
|
9 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
10 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
11 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
12 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
13 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
14 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
15 |
+
*/
|
16 |
+
|
17 |
+
class Transperfect_Globallink_Block_Adminhtml_Glactivesubmissions_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
18 |
+
|
19 |
+
public function __construct() {
|
20 |
+
parent::__construct();
|
21 |
+
$this->setId('glactivesubmissionsGrid');
|
22 |
+
$this->setDefaultSort('globallink_job_id');
|
23 |
+
$this->setDefaultDir('DESC');
|
24 |
+
$this->setSaveParametersInSession(true);
|
25 |
+
$this->setVarNameFilter('glactivesubmissions_filter');
|
26 |
+
}
|
27 |
+
|
28 |
+
protected function _prepareCollection() {
|
29 |
+
$submission = $this->_getSubmissionName();
|
30 |
+
$collection = Mage::getModel('globallink/glstatus')->getCollection();
|
31 |
+
$collection->addFieldToFilter('status', array('in' => array(Mage::helper("globallink")->_get_submission_status_sent(), Mage::helper("globallink")->_get_submission_status_cancelled(),
|
32 |
+
Mage::helper("globallink")->_get_submission_status_ready(), Mage::helper("globallink")->_get_submission_status_error())));
|
33 |
+
if ($submission != '') {
|
34 |
+
$collection->addFieldToFilter('submission_name', $submission);
|
35 |
+
}
|
36 |
+
$this->setCollection($collection);
|
37 |
+
parent::_prepareCollection();
|
38 |
+
return $this;
|
39 |
+
}
|
40 |
+
|
41 |
+
protected function _getSubmissionName() {
|
42 |
+
$submission_name = urldecode($this->getRequest()->getParam('selected_submission_name', ''));
|
43 |
+
return $submission_name;
|
44 |
+
}
|
45 |
+
|
46 |
+
protected function _prepareColumns() {
|
47 |
+
|
48 |
+
$this->addColumn('globallink_job_id', array(
|
49 |
+
'header_css_class' => 'a-center',
|
50 |
+
'header' => '',
|
51 |
+
'type' => 'checkbox',
|
52 |
+
'width' => '5%',
|
53 |
+
'field_name' => 'gl_status_ids[]',
|
54 |
+
'align' => 'center',
|
55 |
+
'renderer' => new Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox(),
|
56 |
+
'index' => 'globallink_job_id',
|
57 |
+
'filter' => false,
|
58 |
+
));
|
59 |
+
|
60 |
+
$this->addColumn('submission_name', array(
|
61 |
+
'header' => Mage::helper('catalog')->__('Submission Name'),
|
62 |
+
'index' => 'submission_name',
|
63 |
+
'width' => '18%',
|
64 |
+
'type' => 'options',
|
65 |
+
'options' => Mage::helper("globallink")->getSubmissionOptions(),
|
66 |
+
));
|
67 |
+
|
68 |
+
$this->addColumn('object_type', array(
|
69 |
+
'header' => Mage::helper('catalog')->__('Type'),
|
70 |
+
'index' => 'object_type',
|
71 |
+
'width' => '13%',
|
72 |
+
'type' => 'options',
|
73 |
+
'options' => Mage::helper("globallink")->getObjectTypeOptions(),
|
74 |
+
));
|
75 |
+
|
76 |
+
$this->addColumn('object_name', array(
|
77 |
+
'header' => Mage::helper('catalog')->__('Name'),
|
78 |
+
'index' => 'object_name',
|
79 |
+
'width' => '25%',
|
80 |
+
'type' => 'varchar',
|
81 |
+
));
|
82 |
+
|
83 |
+
$this->addColumn('submitter', array(
|
84 |
+
'header' => Mage::helper('catalog')->__('Submitter'),
|
85 |
+
'index' => 'submitter',
|
86 |
+
'width' => '9%',
|
87 |
+
'type' => 'options',
|
88 |
+
'options' => Mage::helper("globallink")->getSubmitters(),
|
89 |
+
));
|
90 |
+
|
91 |
+
$this->addColumn('status', array(
|
92 |
+
'header' => Mage::helper('catalog')->__('Status'),
|
93 |
+
'index' => 'status',
|
94 |
+
'width' => '15%',
|
95 |
+
));
|
96 |
+
|
97 |
+
$this->addColumn('gl_source_locale', array(
|
98 |
+
'header' => Mage::helper('catalog')->__('Source Language'),
|
99 |
+
'index' => 'gl_source_locale',
|
100 |
+
'width' => '15%',
|
101 |
+
'type' => 'options',
|
102 |
+
'options' => Mage::helper("globallink")->get_gl_locale_options(),
|
103 |
+
));
|
104 |
+
|
105 |
+
$this->addColumn('gl_target_locale', array(
|
106 |
+
'header' => Mage::helper('catalog')->__('Target Language'),
|
107 |
+
'index' => 'gl_target_locale',
|
108 |
+
'width' => '15%',
|
109 |
+
'type' => 'options',
|
110 |
+
'options' => Mage::helper("globallink")->get_gl_locale_options(),
|
111 |
+
));
|
112 |
+
|
113 |
+
return parent::_prepareColumns();
|
114 |
+
}
|
115 |
+
|
116 |
+
public function getGridUrl() {
|
117 |
+
return $this->getUrl('*/*', array('_current' => true));
|
118 |
+
}
|
119 |
+
|
120 |
+
public function getRowUrl() {
|
121 |
+
return '"';
|
122 |
+
}
|
123 |
+
|
124 |
+
}
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcategory.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Block_Adminhtml_Glcategory extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
$this->_controller = 'adminhtml_glcategory';
|
20 |
+
$this->_blockGroup = 'globallink';
|
21 |
+
$this->setTemplate('globallink/adminhtml/glcategory.phtml');
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Prepare button and grid
|
26 |
+
*
|
27 |
+
* @return Mage_Adminhtml_Block_Catalog_Product
|
28 |
+
*/
|
29 |
+
protected function _prepareLayout() {
|
30 |
+
$this->setChild('grid', $this->getLayout()->createBlock('globallink/adminhtml_glcategory_grid', 'adminhtml_glcategory.grid')->setSaveParametersInSession(true));
|
31 |
+
return parent::_prepareLayout();
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Render grid
|
36 |
+
*
|
37 |
+
* @return string
|
38 |
+
*/
|
39 |
+
public function getGridHtml() {
|
40 |
+
return $this->getChildHtml('grid');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Check whether it is single store mode
|
45 |
+
*
|
46 |
+
* @return bool
|
47 |
+
*/
|
48 |
+
public function isSingleStoreMode() {
|
49 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
return true;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function getMappedStores() {
|
56 |
+
return Mage::helper("globallink")->get_mapped_locales();
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
60 |
+
|
61 |
+
?>
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcategory/Grid.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Block_Adminhtml_Glcategory_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
$this->setId('glcategoryGrid');
|
20 |
+
$this->setDefaultSort('entity_id');
|
21 |
+
$this->setDefaultDir('DESC');
|
22 |
+
$this->setSaveParametersInSession(true);
|
23 |
+
$this->setVarNameFilter('category_filter');
|
24 |
+
}
|
25 |
+
|
26 |
+
public function get_categories() {
|
27 |
+
$category = Mage::getModel('catalog/category');
|
28 |
+
$tree = $category->getTreeModel();
|
29 |
+
$tree->load();
|
30 |
+
|
31 |
+
$ids = $tree->getCollection()->getAllIds();
|
32 |
+
$arr = array();
|
33 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $ids);
|
34 |
+
if ($ids) {
|
35 |
+
foreach ($ids as $id) {
|
36 |
+
$cat = Mage::getModel('catalog/category');
|
37 |
+
$cat->load($id);
|
38 |
+
array_push($arr, $cat);
|
39 |
+
}
|
40 |
+
}
|
41 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $arr);
|
42 |
+
return $arr;
|
43 |
+
}
|
44 |
+
|
45 |
+
protected function _prepareCollection() {
|
46 |
+
$store = $this->_getStore();
|
47 |
+
$filter = Mage::getSingleton('core/session')->getCategoryFilter();
|
48 |
+
$object_type = Mage::helper("globallink")->_get_object_type_category();
|
49 |
+
Mage::getSingleton('core/session')->unsObjectType();
|
50 |
+
Mage::getSingleton('core/session')->setObjectType($object_type);
|
51 |
+
Mage::app()->setCurrentStore($store);
|
52 |
+
$root_category_id = Mage::app()->getStore()->getRootCategoryId();
|
53 |
+
$root_categories = Mage::getModel('catalog/category')->load($root_category_id)->getAllChildren();
|
54 |
+
$root_category_ids = explode(',', $root_categories);
|
55 |
+
$collection = Mage::getModel('catalog/category')->getCollection()
|
56 |
+
->addFieldToFilter('parent_id', array('in' => $root_category_ids))
|
57 |
+
->addAttributeToSort('name', 'ASC');
|
58 |
+
|
59 |
+
if (($key = array_search($root_category_id, $root_category_ids)) !== false) {
|
60 |
+
unset($root_category_ids[$key]);
|
61 |
+
$root_category_ids = array_values($root_category_ids);
|
62 |
+
}
|
63 |
+
|
64 |
+
if (!$filter || $filter == 0) {
|
65 |
+
$category_include_ids = array();
|
66 |
+
foreach ($root_category_ids as $category_id) {
|
67 |
+
$object_type = Mage::helper("globallink")->_get_object_type_category();
|
68 |
+
$result = Mage::helper("globallink")->get_gl_object_id_status($store->store_id, $category_id, $object_type);
|
69 |
+
if (!$result) {
|
70 |
+
$category_include_ids[] = $category_id;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
$collection->addAttributeToFilter('entity_id', array('in' => $category_include_ids));
|
75 |
+
}
|
76 |
+
|
77 |
+
$this->setCollection($collection);
|
78 |
+
parent::_prepareCollection();
|
79 |
+
return $this;
|
80 |
+
}
|
81 |
+
|
82 |
+
protected function _getStore() {
|
83 |
+
$storeId = $this->getRequest()->getParam('store', '');
|
84 |
+
if ($storeId == '') {
|
85 |
+
$storeId = Mage::helper("globallink")->get_default_gl_store_id();
|
86 |
+
}
|
87 |
+
return Mage::app()->getStore($storeId);
|
88 |
+
}
|
89 |
+
|
90 |
+
protected function _prepareColumns() {
|
91 |
+
|
92 |
+
// $this->addColumn('entity_id', array(
|
93 |
+
// 'header_css_class' => 'a-center',
|
94 |
+
// 'header' => '',
|
95 |
+
// 'type' => 'checkbox',
|
96 |
+
// 'width' => '5%',
|
97 |
+
// 'field_name' => 'gl_category_ids[]',
|
98 |
+
// 'align' => 'center',
|
99 |
+
// 'renderer' => new Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox(),
|
100 |
+
// 'index' => 'entity_id',
|
101 |
+
// 'filter' => false,
|
102 |
+
// ));
|
103 |
+
|
104 |
+
$this->addColumn('name', array(
|
105 |
+
'header' => Mage::helper('catalog')->__('Name'),
|
106 |
+
'index' => 'name',
|
107 |
+
'width' => '75%',
|
108 |
+
'type' => 'varchar',
|
109 |
+
));
|
110 |
+
|
111 |
+
$this->addColumn('action', array(
|
112 |
+
'header' => Mage::helper('catalog')->__('Active Submission'),
|
113 |
+
'width' => '20%',
|
114 |
+
'type' => 'action',
|
115 |
+
'renderer' => 'transperfect_globallink_block_adminhtml_renderer_action',
|
116 |
+
'filter' => false,
|
117 |
+
'sortable' => false,
|
118 |
+
));
|
119 |
+
|
120 |
+
return parent::_prepareColumns();
|
121 |
+
}
|
122 |
+
|
123 |
+
public function getGridUrl() {
|
124 |
+
return $this->getUrl('*/*', array('_current' => true));
|
125 |
+
}
|
126 |
+
|
127 |
+
public function getRowUrl() {
|
128 |
+
return '"';
|
129 |
+
}
|
130 |
+
|
131 |
+
protected function _prepareMassaction() {
|
132 |
+
$this->setMassactionIdField('entity_id');
|
133 |
+
$this->getMassactionBlock()->setFormFieldName('gl_category_ids[]');
|
134 |
+
$this->getMassactionBlock()->addItem('add', array(
|
135 |
+
'label' => 'Send for Translation',
|
136 |
+
'url' => $this->getUrl('*/*/massAdd'),
|
137 |
+
));
|
138 |
+
return $this;
|
139 |
+
}
|
140 |
+
|
141 |
+
}
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcmsblock.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* � 2013 Translations.com, a TransPerfect company
|
4 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
5 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
6 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
7 |
+
*
|
8 |
+
* By making use of the Software, you agree
|
9 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
10 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
11 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
12 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
13 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
14 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
15 |
+
*/
|
16 |
+
|
17 |
+
class Transperfect_Globallink_Block_Adminhtml_Glcmsblock extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
18 |
+
|
19 |
+
public function __construct() {
|
20 |
+
parent::__construct();
|
21 |
+
$this->_controller = 'adminhtml_glcmsblock';
|
22 |
+
$this->_blockGroup = 'globallink';
|
23 |
+
$this->setTemplate('globallink/adminhtml/glcmsblock.phtml');
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Prepare button and grid
|
28 |
+
*
|
29 |
+
* @return Mage_Adminhtml_Block_Catalog_Product
|
30 |
+
*/
|
31 |
+
protected function _prepareLayout() {
|
32 |
+
$this->setChild('grid', $this->getLayout()->createBlock('globallink/adminhtml_glcmsblock_grid', 'adminhtml_glcmsblock.grid')->setSaveParametersInSession(true));
|
33 |
+
return parent::_prepareLayout();
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Render grid
|
38 |
+
*
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
public function getGridHtml() {
|
42 |
+
return $this->getChildHtml('grid');
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Check whether it is single store mode
|
47 |
+
*
|
48 |
+
* @return bool
|
49 |
+
*/
|
50 |
+
public function isSingleStoreMode() {
|
51 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
return true;
|
55 |
+
}
|
56 |
+
|
57 |
+
public function getMappedStores() {
|
58 |
+
return Mage::helper("globallink")->get_mapped_locales();
|
59 |
+
}
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
?>
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcmsblock/Grid.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Block_Adminhtml_Glcmsblock_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
$this->setId('glcmsblockGrid');
|
20 |
+
$this->setDefaultSort('entity_id');
|
21 |
+
$this->setDefaultDir('DESC');
|
22 |
+
$this->setSaveParametersInSession(true);
|
23 |
+
$this->setVarNameFilter('product_filter');
|
24 |
+
}
|
25 |
+
|
26 |
+
protected function _prepareCollection() {
|
27 |
+
$store = $this->_getStore();
|
28 |
+
$object_type = Mage::helper("globallink")->_get_object_type_block();
|
29 |
+
Mage::getSingleton('core/session')->unsObjectType();
|
30 |
+
Mage::getSingleton('core/session')->setObjectType($object_type);
|
31 |
+
$collection = Mage::getModel('cms/block')->getCollection()->addStoreFilter($store->getId());
|
32 |
+
$this->setCollection($collection);
|
33 |
+
return parent::_prepareCollection();
|
34 |
+
}
|
35 |
+
|
36 |
+
protected function _getStore() {
|
37 |
+
$storeId = $this->getRequest()->getParam('store', '');
|
38 |
+
if ($storeId == '') {
|
39 |
+
$storeId = Mage::helper("globallink")->get_default_gl_store_id();
|
40 |
+
}
|
41 |
+
return Mage::app()->getStore($storeId);
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function _prepareColumns() {
|
45 |
+
|
46 |
+
// $this->addColumn('block_id', array(
|
47 |
+
// 'header_css_class' => 'a-center',
|
48 |
+
// 'header' => '',
|
49 |
+
// 'type' => 'checkbox',
|
50 |
+
// 'width' => '5%',
|
51 |
+
// 'field_name' => 'gl_block_ids[]',
|
52 |
+
// 'align' => 'center',
|
53 |
+
// 'renderer' => new Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox(),
|
54 |
+
// 'index' => 'block_id',
|
55 |
+
// 'filter' => false,
|
56 |
+
// ));
|
57 |
+
|
58 |
+
$this->addColumn('title', array(
|
59 |
+
'header' => Mage::helper('cms')->__('Title'),
|
60 |
+
'align' => 'left',
|
61 |
+
'index' => 'title',
|
62 |
+
'width' => '25%',
|
63 |
+
));
|
64 |
+
|
65 |
+
$this->addColumn('identifier', array(
|
66 |
+
'header' => Mage::helper('cms')->__('Identifier'),
|
67 |
+
'align' => 'left',
|
68 |
+
'index' => 'identifier',
|
69 |
+
'width' => '20%',
|
70 |
+
));
|
71 |
+
|
72 |
+
$this->addColumn('is_active', array(
|
73 |
+
'header' => Mage::helper('cms')->__('Status'),
|
74 |
+
'index' => 'is_active',
|
75 |
+
'type' => 'options',
|
76 |
+
'options' => array(
|
77 |
+
0 => Mage::helper('cms')->__('Disabled'),
|
78 |
+
1 => Mage::helper('cms')->__('Enabled')
|
79 |
+
),
|
80 |
+
'width' => '5%',
|
81 |
+
));
|
82 |
+
|
83 |
+
$this->addColumn('creation_time', array(
|
84 |
+
'header' => Mage::helper('cms')->__('Date Created'),
|
85 |
+
'index' => 'creation_time',
|
86 |
+
'type' => 'datetime',
|
87 |
+
'width' => '15%',
|
88 |
+
));
|
89 |
+
|
90 |
+
$this->addColumn('update_time', array(
|
91 |
+
'header' => Mage::helper('cms')->__('Last Modified'),
|
92 |
+
'index' => 'update_time',
|
93 |
+
'type' => 'datetime',
|
94 |
+
'width' => '15%',
|
95 |
+
));
|
96 |
+
|
97 |
+
$this->addColumn('action', array(
|
98 |
+
'header' => Mage::helper('catalog')->__('Active Submission'),
|
99 |
+
'width' => '20%',
|
100 |
+
'type' => 'action',
|
101 |
+
'renderer' => 'transperfect_globallink_block_adminhtml_renderer_action',
|
102 |
+
'filter' => false,
|
103 |
+
'sortable' => false,
|
104 |
+
));
|
105 |
+
|
106 |
+
return parent::_prepareColumns();
|
107 |
+
}
|
108 |
+
|
109 |
+
public function getGridUrl() {
|
110 |
+
return $this->getUrl('*/*', array('_current' => true));
|
111 |
+
}
|
112 |
+
|
113 |
+
public function getRowUrl() {
|
114 |
+
return '"';
|
115 |
+
}
|
116 |
+
|
117 |
+
protected function _prepareMassaction() {
|
118 |
+
$this->setMassactionIdField('entity_id');
|
119 |
+
$this->getMassactionBlock()->setFormFieldName('gl_block_ids[]');
|
120 |
+
$this->getMassactionBlock()->addItem('add', array(
|
121 |
+
'label' => 'Send for Translation',
|
122 |
+
'url' => $this->getUrl('*/*/massAdd'),
|
123 |
+
));
|
124 |
+
return $this;
|
125 |
+
}
|
126 |
+
|
127 |
+
}
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcmspage.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* � 2013 Translations.com, a TransPerfect company
|
4 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
5 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
6 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
7 |
+
*
|
8 |
+
* By making use of the Software, you agree
|
9 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
10 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
11 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
12 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
13 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
14 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
15 |
+
*/
|
16 |
+
class Transperfect_Globallink_Block_Adminhtml_Glcmspage extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
17 |
+
|
18 |
+
public function __construct() {
|
19 |
+
parent::__construct();
|
20 |
+
$this->_controller = 'adminhtml_glcmspage';
|
21 |
+
$this->_blockGroup = 'globallink';
|
22 |
+
$this->setTemplate('globallink/adminhtml/glcmspage.phtml');
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Prepare button and grid
|
27 |
+
*
|
28 |
+
* @return Mage_Adminhtml_Block_Catalog_Product
|
29 |
+
*/
|
30 |
+
protected function _prepareLayout() {
|
31 |
+
$this->setChild('grid', $this->getLayout()->createBlock('globallink/adminhtml_glcmspage_grid', 'adminhtml_glcmspage.grid')->setSaveParametersInSession(true));
|
32 |
+
return parent::_prepareLayout();
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Render grid
|
37 |
+
*
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
public function getGridHtml() {
|
41 |
+
return $this->getChildHtml('grid');
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Check whether it is single store mode
|
46 |
+
*
|
47 |
+
* @return bool
|
48 |
+
*/
|
49 |
+
public function isSingleStoreMode() {
|
50 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
51 |
+
return false;
|
52 |
+
}
|
53 |
+
return true;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function getMappedStores() {
|
57 |
+
return Mage::helper("globallink")->get_mapped_locales();
|
58 |
+
}
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
+
?>
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glcmspage/Grid.php
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class Transperfect_Globallink_Block_Adminhtml_Glcmspage_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
17 |
+
|
18 |
+
public function __construct() {
|
19 |
+
parent::__construct();
|
20 |
+
$this->setId('glcmspageGrid');
|
21 |
+
$this->setDefaultSort('entity_id');
|
22 |
+
$this->setDefaultDir('DESC');
|
23 |
+
$this->setSaveParametersInSession(true);
|
24 |
+
$this->setVarNameFilter('product_filter');
|
25 |
+
}
|
26 |
+
|
27 |
+
protected function _prepareCollection() {
|
28 |
+
$store = $this->_getStore();
|
29 |
+
$object_type = Mage::helper("globallink")->_get_object_type_page();
|
30 |
+
Mage::getSingleton('core/session')->unsObjectType();
|
31 |
+
Mage::getSingleton('core/session')->setObjectType($object_type);
|
32 |
+
$collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter($store->getId());
|
33 |
+
$this->setCollection($collection);
|
34 |
+
return parent::_prepareCollection();
|
35 |
+
}
|
36 |
+
|
37 |
+
protected function _getStore() {
|
38 |
+
$storeId = $this->getRequest()->getParam('store', '');
|
39 |
+
if ($storeId == '') {
|
40 |
+
$storeId = Mage::helper("globallink")->get_default_gl_store_id();
|
41 |
+
}
|
42 |
+
return Mage::app()->getStore($storeId);
|
43 |
+
}
|
44 |
+
|
45 |
+
protected function _prepareColumns() {
|
46 |
+
|
47 |
+
// $this->addColumn('page_id', array(
|
48 |
+
// 'header_css_class' => 'a-center',
|
49 |
+
// 'header' => '',
|
50 |
+
// 'type' => 'checkbox',
|
51 |
+
// 'width' => '5%',
|
52 |
+
// 'field_name' => 'gl_page_ids[]',
|
53 |
+
// 'align' => 'center',
|
54 |
+
// 'renderer' => new Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox(),
|
55 |
+
// 'index' => 'page_id',
|
56 |
+
// 'filter' => false,
|
57 |
+
// ));
|
58 |
+
|
59 |
+
$this->addColumn('title', array(
|
60 |
+
'header' => Mage::helper('cms')->__('Title'),
|
61 |
+
'align' => 'left',
|
62 |
+
'index' => 'title',
|
63 |
+
'width' => '25%',
|
64 |
+
));
|
65 |
+
|
66 |
+
$this->addColumn('identifier', array(
|
67 |
+
'header' => Mage::helper('cms')->__('Identifier'),
|
68 |
+
'align' => 'left',
|
69 |
+
'index' => 'identifier',
|
70 |
+
'width' => '10%',
|
71 |
+
));
|
72 |
+
|
73 |
+
$this->addColumn('root_template', array(
|
74 |
+
'header' => Mage::helper('cms')->__('Layout'),
|
75 |
+
'index' => 'root_template',
|
76 |
+
'type' => 'options',
|
77 |
+
'options' => Mage::getSingleton('page/source_layout')->getOptions(),
|
78 |
+
'width' => '10%',
|
79 |
+
));
|
80 |
+
|
81 |
+
$this->addColumn('is_active', array(
|
82 |
+
'header' => Mage::helper('cms')->__('Status'),
|
83 |
+
'index' => 'is_active',
|
84 |
+
'type' => 'options',
|
85 |
+
'options' => Mage::getSingleton('cms/page')->getAvailableStatuses(),
|
86 |
+
'width' => '5%',
|
87 |
+
));
|
88 |
+
|
89 |
+
$this->addColumn('creation_time', array(
|
90 |
+
'header' => Mage::helper('cms')->__('Date Created'),
|
91 |
+
'index' => 'creation_time',
|
92 |
+
'type' => 'datetime',
|
93 |
+
'width' => '12%',
|
94 |
+
));
|
95 |
+
|
96 |
+
$this->addColumn('update_time', array(
|
97 |
+
'header' => Mage::helper('cms')->__('Last Modified'),
|
98 |
+
'index' => 'update_time',
|
99 |
+
'type' => 'datetime',
|
100 |
+
'width' => '13%',
|
101 |
+
));
|
102 |
+
|
103 |
+
$this->addColumn('action', array(
|
104 |
+
'header' => Mage::helper('catalog')->__('Active Submission'),
|
105 |
+
'width' => '20%',
|
106 |
+
'type' => 'action',
|
107 |
+
'renderer' => 'transperfect_globallink_block_adminhtml_renderer_action',
|
108 |
+
'filter' => false,
|
109 |
+
'sortable' => false,
|
110 |
+
));
|
111 |
+
|
112 |
+
return parent::_prepareColumns();
|
113 |
+
}
|
114 |
+
|
115 |
+
public function getGridUrl() {
|
116 |
+
return $this->getUrl('*/*', array('_current' => true));
|
117 |
+
}
|
118 |
+
|
119 |
+
public function getRowUrl() {
|
120 |
+
return '"';
|
121 |
+
}
|
122 |
+
|
123 |
+
protected function _prepareMassaction() {
|
124 |
+
$this->setMassactionIdField('entity_id');
|
125 |
+
$this->getMassactionBlock()->setFormFieldName('gl_page_ids[]');
|
126 |
+
$this->getMassactionBlock()->addItem('add', array(
|
127 |
+
'label' => 'Send for Translation',
|
128 |
+
'url' => $this->getUrl('*/*/massAdd'),
|
129 |
+
));
|
130 |
+
return $this;
|
131 |
+
}
|
132 |
+
|
133 |
+
}
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glemailtemplate.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Block_Adminhtml_Glemailtemplate extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
$this->_controller = 'adminhtml_glemailtemplate';
|
20 |
+
$this->_blockGroup = 'globallink';
|
21 |
+
$this->setTemplate('globallink/adminhtml/glemailtemplate.phtml');
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Prepare button and grid
|
26 |
+
*
|
27 |
+
* @return Mage_Adminhtml_Block_Catalog_Product
|
28 |
+
*/
|
29 |
+
protected function _prepareLayout() {
|
30 |
+
$this->setChild('grid', $this->getLayout()->createBlock('globallink/adminhtml_glemailtemplate_grid', 'adminhtml_glemailtemplate.grid')->setSaveParametersInSession(true));
|
31 |
+
return parent::_prepareLayout();
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Render grid
|
36 |
+
*
|
37 |
+
* @return string
|
38 |
+
*/
|
39 |
+
public function getGridHtml() {
|
40 |
+
return $this->getChildHtml('grid');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Check whether it is single store mode
|
45 |
+
*
|
46 |
+
* @return bool
|
47 |
+
*/
|
48 |
+
public function isSingleStoreMode() {
|
49 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
return true;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function getMappedStores() {
|
56 |
+
return Mage::helper("globallink")->get_mapped_locales();
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
60 |
+
|
61 |
+
?>
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glemailtemplate/Grid.php
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Block_Adminhtml_Glemailtemplate_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
$this->setId('glemailtemplateGrid');
|
20 |
+
$this->setDefaultSort('template_id');
|
21 |
+
$this->setDefaultDir('DESC');
|
22 |
+
$this->setSaveParametersInSession(true);
|
23 |
+
$this->setVarNameFilter('product_filter');
|
24 |
+
}
|
25 |
+
|
26 |
+
protected function _prepareCollection() {
|
27 |
+
$collection = Mage::getResourceSingleton('core/email_template_collection');
|
28 |
+
$this->setCollection($collection);
|
29 |
+
return parent::_prepareCollection();
|
30 |
+
}
|
31 |
+
|
32 |
+
protected function _prepareColumns() {
|
33 |
+
|
34 |
+
// $this->addColumn('template_id', array(
|
35 |
+
// 'header_css_class' => 'a-center',
|
36 |
+
// 'header' => '',
|
37 |
+
// 'type' => 'checkbox',
|
38 |
+
// 'width' => '5%',
|
39 |
+
// 'field_name' => 'gl_template_ids[]',
|
40 |
+
// 'align' => 'center',
|
41 |
+
// 'renderer' => new Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox(),
|
42 |
+
// 'index' => 'template_id',
|
43 |
+
// 'filter' => false,
|
44 |
+
// ));
|
45 |
+
|
46 |
+
$this->addColumn('code', array(
|
47 |
+
'header' => Mage::helper('adminhtml')->__('Template Name'),
|
48 |
+
'index' => 'template_code',
|
49 |
+
'width' => '15%',
|
50 |
+
));
|
51 |
+
|
52 |
+
$this->addColumn('added_at', array(
|
53 |
+
'header' => Mage::helper('adminhtml')->__('Date Added'),
|
54 |
+
'index' => 'added_at',
|
55 |
+
'gmtoffset' => true,
|
56 |
+
'type' => 'datetime',
|
57 |
+
'width' => '20%',
|
58 |
+
));
|
59 |
+
|
60 |
+
$this->addColumn('modified_at', array(
|
61 |
+
'header' => Mage::helper('adminhtml')->__('Date Updated'),
|
62 |
+
'index' => 'modified_at',
|
63 |
+
'gmtoffset' => true,
|
64 |
+
'type' => 'datetime',
|
65 |
+
'width' => '20%',
|
66 |
+
));
|
67 |
+
|
68 |
+
$this->addColumn('subject', array(
|
69 |
+
'header' => Mage::helper('adminhtml')->__('Subject'),
|
70 |
+
'index' => 'template_subject',
|
71 |
+
'width' => '20%',
|
72 |
+
));
|
73 |
+
|
74 |
+
$this->addColumn('type', array(
|
75 |
+
'header' => Mage::helper('adminhtml')->__('Template Type'),
|
76 |
+
'index' => 'template_type',
|
77 |
+
'filter' => 'adminhtml/system_email_template_grid_filter_type',
|
78 |
+
'renderer' => 'adminhtml/system_email_template_grid_renderer_type',
|
79 |
+
'width' => '20%',
|
80 |
+
));
|
81 |
+
|
82 |
+
return $this;
|
83 |
+
}
|
84 |
+
|
85 |
+
public function getGridUrl() {
|
86 |
+
return $this->getUrl('*/*', array('_current' => true));
|
87 |
+
}
|
88 |
+
|
89 |
+
public function getRowUrl() {
|
90 |
+
return '"';
|
91 |
+
}
|
92 |
+
|
93 |
+
protected function _prepareMassaction() {
|
94 |
+
$this->setMassactionIdField('entity_id');
|
95 |
+
$this->getMassactionBlock()->setFormFieldName('gl_template_ids[]');
|
96 |
+
$this->getMassactionBlock()->addItem('add', array(
|
97 |
+
'label' => 'Send for Translation',
|
98 |
+
'url' => $this->getUrl('*/*/massAdd'),
|
99 |
+
));
|
100 |
+
return $this;
|
101 |
+
}
|
102 |
+
|
103 |
+
}
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glfield.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* � 2013 Translations.com, a TransPerfect company
|
4 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
5 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
6 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
7 |
+
*
|
8 |
+
* By making use of the Software, you agree
|
9 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
10 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
11 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
12 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
13 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
14 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
15 |
+
*/
|
16 |
+
class Transperfect_Globallink_Block_Adminhtml_Glfield extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
17 |
+
|
18 |
+
public function __construct() {
|
19 |
+
parent::__construct();
|
20 |
+
$this->_controller = 'adminhtml_glfield';
|
21 |
+
$this->_blockGroup = 'globallink';
|
22 |
+
$this->_headerText = 'Header Text';
|
23 |
+
$this->_addButtonLabel = 'Button Label';
|
24 |
+
$this->setTemplate('globallink/adminhtml/glfield.phtml');
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Prepare button and grid
|
29 |
+
*
|
30 |
+
* @return Mage_Adminhtml_Block_Catalog_Product
|
31 |
+
*/
|
32 |
+
protected function _prepareLayout() {
|
33 |
+
$this->setChild('grid', $this->getLayout()->createBlock('globallink/adminhtml_glfield_grid', 'adminhtml_glfield.grid')->setSaveParametersInSession(true));
|
34 |
+
return parent::_prepareLayout();
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Render grid
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
public function getGridHtml() {
|
43 |
+
return $this->getChildHtml('grid');
|
44 |
+
}
|
45 |
+
|
46 |
+
public function getCount() {
|
47 |
+
// $count = Mage::registry('gl_target_count');
|
48 |
+
// Mage::helper("globallink")->gl_debug(': before grid ', $count);
|
49 |
+
return 5000;
|
50 |
+
}
|
51 |
+
|
52 |
+
}
|
53 |
+
?>
|
54 |
+
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glfield/Grid.php
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* � 2013 Translations.com, a TransPerfect company
|
4 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
5 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
6 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
7 |
+
*
|
8 |
+
* By making use of the Software, you agree
|
9 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
10 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
11 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
12 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
13 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
14 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
15 |
+
*/
|
16 |
+
|
17 |
+
class Transperfect_Globallink_Block_Adminhtml_Glfield_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
18 |
+
|
19 |
+
public function __construct() {
|
20 |
+
parent::__construct();
|
21 |
+
$this->setId('glfieldGrid');
|
22 |
+
$this->setDefaultSort('globallink_field_id');
|
23 |
+
$this->setDefaultDir('ASC');
|
24 |
+
$this->setSaveParametersInSession(false);
|
25 |
+
$this->setVarNameFilter('glfield_filter');
|
26 |
+
}
|
27 |
+
|
28 |
+
protected function _prepareCollection() {
|
29 |
+
$object_type = $this->_getObjectType();
|
30 |
+
$collection = Mage::getModel('globallink/glfield')->getCollection();
|
31 |
+
$collection->addFieldToFilter('object_type', $object_type);
|
32 |
+
$this->setCollection($collection);
|
33 |
+
parent::_prepareCollection();
|
34 |
+
return $this;
|
35 |
+
}
|
36 |
+
|
37 |
+
protected function _getObjectType() {
|
38 |
+
$objectType = $this->getRequest()->getParam('selected_object_type', '');
|
39 |
+
$new_objectType = str_replace("-", "/", $objectType);
|
40 |
+
return $new_objectType;
|
41 |
+
}
|
42 |
+
|
43 |
+
protected function _prepareColumns() {
|
44 |
+
|
45 |
+
$this->addColumn('globallink_field_id', array(
|
46 |
+
'header_css_class' => 'a-center',
|
47 |
+
'header' => '<input type="checkbox" id="selectAllCheckBox" onclick="javascript:selectAll(this);" > Translate? ',
|
48 |
+
'type' => 'hidden',
|
49 |
+
'width' => '5%',
|
50 |
+
'field_name' => 'gl_field_ids[]',
|
51 |
+
'align' => 'center',
|
52 |
+
'renderer' => new Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox(),
|
53 |
+
'index' => 'globallink_field_id',
|
54 |
+
'filter' => false,
|
55 |
+
'sortable' => false,
|
56 |
+
'values' => Mage::helper("globallink")->getIncludeIds($this->_getObjectType()),
|
57 |
+
));
|
58 |
+
|
59 |
+
$this->addColumn('field_code', array(
|
60 |
+
'header' => Mage::helper('catalog')->__('Attribute Code'),
|
61 |
+
'index' => 'field_code',
|
62 |
+
'width' => '40%',
|
63 |
+
'type' => 'varchar',
|
64 |
+
));
|
65 |
+
|
66 |
+
$this->addColumn('field_name', array(
|
67 |
+
'header' => Mage::helper('catalog')->__('Attribute Label'),
|
68 |
+
'index' => 'field_name',
|
69 |
+
'width' => '40%',
|
70 |
+
'type' => 'varchar',
|
71 |
+
));
|
72 |
+
|
73 |
+
$this->addColumn('action', array(
|
74 |
+
'header_css_class' => 'a-center',
|
75 |
+
'header' => Mage::helper('catalog')->__('Action'),
|
76 |
+
'width' => '8%',
|
77 |
+
'align' => 'center',
|
78 |
+
'type' => 'action',
|
79 |
+
'renderer' => 'transperfect_globallink_block_adminhtml_renderer_delete',
|
80 |
+
'filter' => false,
|
81 |
+
'sortable' => false,
|
82 |
+
));
|
83 |
+
|
84 |
+
return parent::_prepareColumns();
|
85 |
+
}
|
86 |
+
|
87 |
+
public function getGridUrl() {
|
88 |
+
return $this->getUrl('*/*', array('_current' => true));
|
89 |
+
}
|
90 |
+
|
91 |
+
public function getRowUrl() {
|
92 |
+
return '"';
|
93 |
+
}
|
94 |
+
|
95 |
+
}
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glnewslettertemplate.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Block_Adminhtml_Glnewslettertemplate extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
$this->_controller = 'adminhtml_glnewslettertemplate';
|
20 |
+
$this->_blockGroup = 'globallink';
|
21 |
+
$this->setTemplate('globallink/adminhtml/glnewslettertemplate.phtml');
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Prepare button and grid
|
26 |
+
*
|
27 |
+
* @return Mage_Adminhtml_Block_Catalog_Product
|
28 |
+
*/
|
29 |
+
protected function _prepareLayout() {
|
30 |
+
$this->setChild('grid', $this->getLayout()->createBlock('globallink/adminhtml_glnewslettertemplate_grid', 'adminhtml_glnewslettertemplate.grid')->setSaveParametersInSession(true));
|
31 |
+
return parent::_prepareLayout();
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Render grid
|
36 |
+
*
|
37 |
+
* @return string
|
38 |
+
*/
|
39 |
+
public function getGridHtml() {
|
40 |
+
return $this->getChildHtml('grid');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Check whether it is single store mode
|
45 |
+
*
|
46 |
+
* @return bool
|
47 |
+
*/
|
48 |
+
public function isSingleStoreMode() {
|
49 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
return true;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function getMappedStores() {
|
56 |
+
return Mage::helper("globallink")->get_mapped_locales();
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
60 |
+
|
61 |
+
?>
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glnewslettertemplate/Grid.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Block_Adminhtml_Glnewslettertemplate_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
$this->setId('glnewslettertemplateGrid');
|
20 |
+
$this->setDefaultSort('template_id');
|
21 |
+
$this->setDefaultDir('DESC');
|
22 |
+
$this->setSaveParametersInSession(true);
|
23 |
+
$this->setVarNameFilter('product_filter');
|
24 |
+
}
|
25 |
+
|
26 |
+
protected function _prepareCollection() {
|
27 |
+
$collection = Mage::getResourceSingleton('newsletter/template_collection')
|
28 |
+
->useOnlyActual();
|
29 |
+
|
30 |
+
$this->setCollection($collection);
|
31 |
+
|
32 |
+
return parent::_prepareCollection();
|
33 |
+
}
|
34 |
+
|
35 |
+
protected function _prepareColumns() {
|
36 |
+
|
37 |
+
// $this->addColumn('template_id', array(
|
38 |
+
// 'header_css_class' => 'a-center',
|
39 |
+
// 'header' => '',
|
40 |
+
// 'type' => 'checkbox',
|
41 |
+
// 'width' => '5%',
|
42 |
+
// 'field_name' => 'gl_newsletter_ids[]',
|
43 |
+
// 'align' => 'center',
|
44 |
+
// 'renderer' => new Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox(),
|
45 |
+
// 'index' => 'template_id',
|
46 |
+
// 'filter' => false,
|
47 |
+
// ));
|
48 |
+
|
49 |
+
$this->addColumn('code', array(
|
50 |
+
'header' => Mage::helper('newsletter')->__('Template Name'),
|
51 |
+
'index' => 'template_code',
|
52 |
+
'width' => '15%',
|
53 |
+
));
|
54 |
+
|
55 |
+
$this->addColumn('added_at', array(
|
56 |
+
'header' => Mage::helper('newsletter')->__('Date Added'),
|
57 |
+
'index' => 'added_at',
|
58 |
+
'gmtoffset' => true,
|
59 |
+
'type' => 'datetime',
|
60 |
+
'width' => '15%',
|
61 |
+
));
|
62 |
+
|
63 |
+
$this->addColumn('modified_at', array(
|
64 |
+
'header' => Mage::helper('newsletter')->__('Date Updated'),
|
65 |
+
'index' => 'modified_at',
|
66 |
+
'gmtoffset' => true,
|
67 |
+
'type' => 'datetime',
|
68 |
+
'width' => '15%',
|
69 |
+
));
|
70 |
+
|
71 |
+
$this->addColumn('subject', array(
|
72 |
+
'header' => Mage::helper('newsletter')->__('Subject'),
|
73 |
+
'index' => 'template_subject',
|
74 |
+
'width' => '20%',
|
75 |
+
));
|
76 |
+
|
77 |
+
$this->addColumn('sender', array(
|
78 |
+
'header' => Mage::helper('newsletter')->__('Sender'),
|
79 |
+
'index' => 'template_sender_email',
|
80 |
+
'renderer' => 'adminhtml/newsletter_template_grid_renderer_sender',
|
81 |
+
'width' => '20%',
|
82 |
+
));
|
83 |
+
|
84 |
+
$this->addColumn('type', array(
|
85 |
+
'header' => Mage::helper('newsletter')->__('Template Type'),
|
86 |
+
'index' => 'template_type',
|
87 |
+
'type' => 'options',
|
88 |
+
'options' => array(
|
89 |
+
Mage_Newsletter_Model_Template::TYPE_HTML => 'html',
|
90 |
+
Mage_Newsletter_Model_Template::TYPE_TEXT => 'text'
|
91 |
+
),
|
92 |
+
'width' => '10%',
|
93 |
+
));
|
94 |
+
|
95 |
+
return $this;
|
96 |
+
}
|
97 |
+
|
98 |
+
public function getGridUrl() {
|
99 |
+
return $this->getUrl('*/*', array('_current' => true));
|
100 |
+
}
|
101 |
+
|
102 |
+
public function getRowUrl() {
|
103 |
+
return '"';
|
104 |
+
}
|
105 |
+
|
106 |
+
protected function _prepareMassaction() {
|
107 |
+
$this->setMassactionIdField('entity_id');
|
108 |
+
$this->getMassactionBlock()->setFormFieldName('gl_newsletter_ids[]');
|
109 |
+
$this->getMassactionBlock()->addItem('add', array(
|
110 |
+
'label' => 'Send for Translation',
|
111 |
+
'url' => $this->getUrl('*/*/massAdd'),
|
112 |
+
));
|
113 |
+
return $this;
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glproduct.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* � 2013 Translations.com, a TransPerfect company
|
4 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
5 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
6 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
7 |
+
*
|
8 |
+
* By making use of the Software, you agree
|
9 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
10 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
11 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
12 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
13 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
14 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
15 |
+
*/
|
16 |
+
class Transperfect_Globallink_Block_Adminhtml_Glproduct extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
17 |
+
|
18 |
+
public function __construct() {
|
19 |
+
parent::__construct();
|
20 |
+
$this->_controller = 'adminhtml_glproduct';
|
21 |
+
$this->_blockGroup = 'globallink';
|
22 |
+
$this->setTemplate('globallink/adminhtml/glproduct.phtml');
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Prepare button and grid
|
27 |
+
*
|
28 |
+
* @return Mage_Adminhtml_Block_Catalog_Product
|
29 |
+
*/
|
30 |
+
protected function _prepareLayout() {
|
31 |
+
$this->setChild('grid', $this->getLayout()->createBlock('globallink/adminhtml_glproduct_grid', 'adminhtml_glproduct.grid')->setSaveParametersInSession(true));
|
32 |
+
return parent::_prepareLayout();
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Render grid
|
37 |
+
*
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
public function getGridHtml() {
|
41 |
+
return $this->getChildHtml('grid');
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Check whether it is single store mode
|
46 |
+
*
|
47 |
+
* @return bool
|
48 |
+
*/
|
49 |
+
public function isSingleStoreMode() {
|
50 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
51 |
+
return false;
|
52 |
+
}
|
53 |
+
return true;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function getMappedStores() {
|
57 |
+
return Mage::helper("globallink")->get_mapped_locales();
|
58 |
+
}
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
+
?>
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glproduct/Grid.php
ADDED
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Block_Adminhtml_Glproduct_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
$this->setId('glproductGrid');
|
20 |
+
$this->setDefaultSort('entity_id');
|
21 |
+
$this->setDefaultDir('DESC');
|
22 |
+
$this->setSaveParametersInSession(true);
|
23 |
+
$this->setVarNameFilter('product_filter');
|
24 |
+
}
|
25 |
+
|
26 |
+
protected function _prepareCollection() {
|
27 |
+
$store = $this->_getStore();
|
28 |
+
$object_type = Mage::helper("globallink")->_get_object_type_product();
|
29 |
+
Mage::getSingleton('core/session')->unsObjectType();
|
30 |
+
Mage::getSingleton('core/session')->setObjectType($object_type);
|
31 |
+
$filter = Mage::getSingleton('core/session')->getProductFilter();
|
32 |
+
$collection = Mage::getModel('catalog/product')->getCollection()
|
33 |
+
->addAttributeToSelect('sku')
|
34 |
+
->addAttributeToSelect('name')
|
35 |
+
->addAttributeToSelect('attribute_set_id')
|
36 |
+
->addAttributeToSelect('type_id');
|
37 |
+
$object_id_collection = Mage::getModel('catalog/product')->getCollection()
|
38 |
+
->addAttributeToSelect('object_id');
|
39 |
+
|
40 |
+
if (!$filter || $filter == 0) {
|
41 |
+
$object_id_arr = array();
|
42 |
+
foreach ($object_id_collection as $object_id) {
|
43 |
+
$object_type = Mage::helper("globallink")->_get_object_type_product();
|
44 |
+
$result = Mage::helper("globallink")->get_gl_object_id_status($store->store_id, $object_id['entity_id'], $object_type);
|
45 |
+
if (!$result) {
|
46 |
+
$object_id_arr[] = $object_id['entity_id'];
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
$collection->addFieldToFilter('entity_id', array('in' => $object_id_arr));
|
51 |
+
}
|
52 |
+
|
53 |
+
if ($store->getId()) {
|
54 |
+
$adminStore = Mage_Core_Model_App::ADMIN_STORE_ID;
|
55 |
+
$collection->addStoreFilter($store);
|
56 |
+
$collection->joinAttribute(
|
57 |
+
'name', 'catalog_product/name', 'entity_id', null, 'inner', $adminStore
|
58 |
+
);
|
59 |
+
$collection->joinAttribute(
|
60 |
+
'custom_name', 'catalog_product/name', 'entity_id', null, 'inner', $store->getId()
|
61 |
+
);
|
62 |
+
$collection->joinAttribute(
|
63 |
+
'status', 'catalog_product/status', 'entity_id', null, 'inner', $store->getId()
|
64 |
+
);
|
65 |
+
$collection->joinAttribute(
|
66 |
+
'visibility', 'catalog_product/visibility', 'entity_id', null, 'inner', $store->getId()
|
67 |
+
);
|
68 |
+
}
|
69 |
+
else {
|
70 |
+
$collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner');
|
71 |
+
$collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner');
|
72 |
+
}
|
73 |
+
|
74 |
+
$this->setCollection($collection);
|
75 |
+
|
76 |
+
parent::_prepareCollection();
|
77 |
+
$this->getCollection()->addWebsiteNamesToResult();
|
78 |
+
return $this;
|
79 |
+
}
|
80 |
+
|
81 |
+
protected function _addColumnFilterToCollection($column) {
|
82 |
+
if ($this->getCollection()) {
|
83 |
+
if ($column->getId() == 'websites') {
|
84 |
+
$this->getCollection()->joinField('websites', 'catalog/product_website', 'website_id', 'product_id=entity_id', null, 'left');
|
85 |
+
}
|
86 |
+
}
|
87 |
+
return parent::_addColumnFilterToCollection($column);
|
88 |
+
}
|
89 |
+
|
90 |
+
protected function _getStore() {
|
91 |
+
$storeId = $this->getRequest()->getParam('store', '');
|
92 |
+
if ($storeId == '') {
|
93 |
+
$storeId = Mage::helper("globallink")->get_default_gl_store_id();
|
94 |
+
}
|
95 |
+
return Mage::app()->getStore($storeId);
|
96 |
+
}
|
97 |
+
|
98 |
+
protected function _prepareColumns() {
|
99 |
+
|
100 |
+
// $this->addColumn('product_id', array(
|
101 |
+
// 'header_css_class' => 'a-center',
|
102 |
+
// 'header' => '',
|
103 |
+
// 'type' => 'checkbox',
|
104 |
+
// 'width' => '5%',
|
105 |
+
// 'field_name' => 'gl_product_ids[]',
|
106 |
+
// 'align' => 'center',
|
107 |
+
// 'renderer' => new Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox(),
|
108 |
+
// 'index' => 'entity_id',
|
109 |
+
// 'filter' => false,
|
110 |
+
// ));
|
111 |
+
|
112 |
+
$this->addColumn('entity_id', array(
|
113 |
+
'header' => Mage::helper('catalog')->__('ID'),
|
114 |
+
'width' => '5%',
|
115 |
+
'type' => 'number',
|
116 |
+
'index' => 'entity_id',
|
117 |
+
));
|
118 |
+
|
119 |
+
$store = $this->_getStore();
|
120 |
+
if ($store->getId()) {
|
121 |
+
$this->addColumn('custom_name', array(
|
122 |
+
'header' => Mage::helper('catalog')->__('Name'),
|
123 |
+
'index' => 'custom_name',
|
124 |
+
'width' => '17%',
|
125 |
+
));
|
126 |
+
}
|
127 |
+
|
128 |
+
$this->addColumn('type', array(
|
129 |
+
'header' => Mage::helper('catalog')->__('Type'),
|
130 |
+
'width' => '10%',
|
131 |
+
'index' => 'type_id',
|
132 |
+
'type' => 'options',
|
133 |
+
'options' => Mage::getSingleton('catalog/product_type')->getOptionArray(),
|
134 |
+
));
|
135 |
+
|
136 |
+
$sets = Mage::getResourceModel('eav/entity_attribute_set_collection')
|
137 |
+
->setEntityTypeFilter(Mage::getModel('catalog/product')->getResource()->getTypeId())
|
138 |
+
->load()
|
139 |
+
->toOptionHash();
|
140 |
+
|
141 |
+
$this->addColumn('set_name', array(
|
142 |
+
'header' => Mage::helper('catalog')->__('Attrib. Set Name'),
|
143 |
+
'width' => '8%',
|
144 |
+
'index' => 'attribute_set_id',
|
145 |
+
'type' => 'options',
|
146 |
+
'options' => $sets,
|
147 |
+
));
|
148 |
+
|
149 |
+
$this->addColumn('sku', array(
|
150 |
+
'header' => Mage::helper('catalog')->__('SKU'),
|
151 |
+
'width' => '5%',
|
152 |
+
'index' => 'sku',
|
153 |
+
));
|
154 |
+
|
155 |
+
$this->addColumn('visibility', array(
|
156 |
+
'header' => Mage::helper('catalog')->__('Visibility'),
|
157 |
+
'width' => '10%',
|
158 |
+
'index' => 'visibility',
|
159 |
+
'type' => 'options',
|
160 |
+
'options' => Mage::getModel('catalog/product_visibility')->getOptionArray(),
|
161 |
+
));
|
162 |
+
|
163 |
+
$this->addColumn('status', array(
|
164 |
+
'header' => Mage::helper('catalog')->__('Status'),
|
165 |
+
'width' => '5%',
|
166 |
+
'index' => 'status',
|
167 |
+
'type' => 'options',
|
168 |
+
'options' => Mage::getSingleton('catalog/product_status')->getOptionArray(),
|
169 |
+
));
|
170 |
+
|
171 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
172 |
+
$this->addColumn('websites', array(
|
173 |
+
'header' => Mage::helper('catalog')->__('Websites'),
|
174 |
+
'width' => '10%',
|
175 |
+
'sortable' => false,
|
176 |
+
'index' => 'websites',
|
177 |
+
'type' => 'options',
|
178 |
+
'options' => Mage::getModel('core/website')->getCollection()->toOptionHash(),
|
179 |
+
));
|
180 |
+
}
|
181 |
+
|
182 |
+
$this->addColumn('action', array(
|
183 |
+
'header' => Mage::helper('catalog')->__('Active Submission'),
|
184 |
+
'width' => '20%',
|
185 |
+
'type' => 'action',
|
186 |
+
'renderer' => 'transperfect_globallink_block_adminhtml_renderer_action',
|
187 |
+
'filter' => false,
|
188 |
+
'sortable' => false,
|
189 |
+
));
|
190 |
+
|
191 |
+
return parent::_prepareColumns();
|
192 |
+
}
|
193 |
+
|
194 |
+
public function getGridUrl() {
|
195 |
+
return $this->getUrl('*/*', array('_current' => true));
|
196 |
+
}
|
197 |
+
|
198 |
+
protected function _prepareMassaction() {
|
199 |
+
$this->setMassactionIdField('entity_id');
|
200 |
+
$this->getMassactionBlock()->setFormFieldName('gl_product_ids[]');
|
201 |
+
$this->getMassactionBlock()->addItem('add', array(
|
202 |
+
'label' => 'Send for Translation',
|
203 |
+
'url' => $this->getUrl('*/*/massAdd'),
|
204 |
+
));
|
205 |
+
return $this;
|
206 |
+
}
|
207 |
+
|
208 |
+
public function getRowUrl() {
|
209 |
+
return '"';
|
210 |
+
}
|
211 |
+
|
212 |
+
}
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glreceivetranslations.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Block_Adminhtml_Glreceivetranslations extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
$this->_controller = 'adminhtml_glreceivetranslations';
|
20 |
+
$this->_blockGroup = 'globallink';
|
21 |
+
$this->_headerText = 'Header Text';
|
22 |
+
$this->_addButtonLabel = 'Button Label';
|
23 |
+
$this->setTemplate('globallink/adminhtml/glreceivetranslations.phtml');
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Prepare button and grid
|
28 |
+
*
|
29 |
+
* @return Mage_Adminhtml_Block_Catalog_Product
|
30 |
+
*/
|
31 |
+
protected function _prepareLayout() {
|
32 |
+
$this->setChild('grid', $this->getLayout()->createBlock('globallink/adminhtml_glreceivetranslations_grid', 'adminhtml_glreceivetranslations.grid')->setSaveParametersInSession(true));
|
33 |
+
return parent::_prepareLayout();
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Render grid
|
38 |
+
*
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
public function getGridHtml() {
|
42 |
+
return $this->getChildHtml('grid');
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getCount() {
|
46 |
+
// $count = Mage::registry('gl_target_count');
|
47 |
+
// Mage::helper("globallink")->gl_debug(': before grid ', $count);
|
48 |
+
return 5000;
|
49 |
+
}
|
50 |
+
|
51 |
+
}
|
52 |
+
?>
|
53 |
+
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Glreceivetranslations/Grid.php
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Block_Adminhtml_Glreceivetranslations_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
16 |
+
|
17 |
+
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
+
$this->setId('glreceivetranslationsGrid');
|
20 |
+
$this->setDefaultSort('globallink_job_id');
|
21 |
+
$this->setDefaultDir('DESC');
|
22 |
+
$this->setSaveParametersInSession(false);
|
23 |
+
$this->setVarNameFilter('glreceivetranslations_filter');
|
24 |
+
}
|
25 |
+
|
26 |
+
protected function _prepareCollection() {
|
27 |
+
$gl_arr = $this->_getReadyTargets();
|
28 |
+
$id_arr = array();
|
29 |
+
foreach ($gl_arr as $glObj) {
|
30 |
+
$id_arr[] = $glObj->glRowId;
|
31 |
+
}
|
32 |
+
$collection = Mage::getModel('globallink/glstatus')->getCollection();
|
33 |
+
$collection->addFieldToFilter('globallink_job_id', array('in' => $id_arr));
|
34 |
+
$this->setCollection($collection);
|
35 |
+
parent::_prepareCollection();
|
36 |
+
return $this;
|
37 |
+
}
|
38 |
+
|
39 |
+
public function _getReadyTargets() {
|
40 |
+
$gl_arr = Mage::registry('gl_target_arr');
|
41 |
+
Mage::helper("globallink")->gl_debug('in grid _getReadyTargets ', $gl_arr);
|
42 |
+
return $gl_arr;
|
43 |
+
}
|
44 |
+
|
45 |
+
protected function _prepareColumns() {
|
46 |
+
|
47 |
+
$this->addColumn('globallink_job_id', array(
|
48 |
+
'header_css_class' => 'a-center',
|
49 |
+
'header' => '',
|
50 |
+
'type' => 'checkbox',
|
51 |
+
'width' => '5%',
|
52 |
+
'field_name' => 'gl_status_ids[]',
|
53 |
+
'align' => 'center',
|
54 |
+
'renderer' => new Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox(),
|
55 |
+
'index' => 'globallink_job_id',
|
56 |
+
'filter' => false,
|
57 |
+
));
|
58 |
+
|
59 |
+
$this->addColumn('submission_name', array(
|
60 |
+
'header' => Mage::helper('catalog')->__('Submission Name'),
|
61 |
+
'index' => 'submission_name',
|
62 |
+
'width' => '18%',
|
63 |
+
'type' => 'options',
|
64 |
+
'options' => Mage::helper("globallink")->getSubmissionOptions(),
|
65 |
+
));
|
66 |
+
|
67 |
+
$this->addColumn('object_type', array(
|
68 |
+
'header' => Mage::helper('catalog')->__('Type'),
|
69 |
+
'index' => 'object_type',
|
70 |
+
'width' => '10%',
|
71 |
+
'type' => 'options',
|
72 |
+
'options' => Mage::helper("globallink")->getObjectTypeOptions(),
|
73 |
+
));
|
74 |
+
|
75 |
+
$this->addColumn('object_name', array(
|
76 |
+
'header' => Mage::helper('catalog')->__('Name'),
|
77 |
+
'index' => 'object_name',
|
78 |
+
'width' => '20%',
|
79 |
+
'type' => 'varchar',
|
80 |
+
));
|
81 |
+
|
82 |
+
$this->addColumn('submitter', array(
|
83 |
+
'header' => Mage::helper('catalog')->__('Submitter'),
|
84 |
+
'index' => 'submitter',
|
85 |
+
'width' => '9%',
|
86 |
+
'type' => 'options',
|
87 |
+
'options' => Mage::helper("globallink")->getSubmitters(),
|
88 |
+
));
|
89 |
+
|
90 |
+
$this->addColumn('gl_source_locale', array(
|
91 |
+
'header' => Mage::helper('catalog')->__('Source Language'),
|
92 |
+
'index' => 'gl_source_locale',
|
93 |
+
'width' => '14%',
|
94 |
+
'type' => 'options',
|
95 |
+
'options' => Mage::helper("globallink")->get_gl_locale_options(),
|
96 |
+
));
|
97 |
+
|
98 |
+
$this->addColumn('gl_target_locale', array(
|
99 |
+
'header' => Mage::helper('catalog')->__('Target Language'),
|
100 |
+
'index' => 'gl_target_locale',
|
101 |
+
'width' => '14%',
|
102 |
+
'type' => 'options',
|
103 |
+
'options' => Mage::helper("globallink")->get_gl_locale_options(),
|
104 |
+
));
|
105 |
+
|
106 |
+
$this->addColumn('status', array(
|
107 |
+
'header' => Mage::helper('catalog')->__('Status'),
|
108 |
+
'index' => 'status',
|
109 |
+
'width' => '10%',
|
110 |
+
'type' => 'options',
|
111 |
+
'options' => Mage::helper("globallink")->get_gl_status_options(),
|
112 |
+
));
|
113 |
+
|
114 |
+
return parent::_prepareColumns();
|
115 |
+
}
|
116 |
+
|
117 |
+
public function getGridUrl() {
|
118 |
+
return $this->getUrl('*/*', array('_current' => true));
|
119 |
+
}
|
120 |
+
|
121 |
+
public function getRowUrl() {
|
122 |
+
return '"';
|
123 |
+
}
|
124 |
+
|
125 |
+
}
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Renderer/Action.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class Transperfect_Globallink_Block_Adminhtml_Renderer_Action extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action {
|
17 |
+
|
18 |
+
public function render(Varien_Object $row) {
|
19 |
+
$object_type = Mage::getSingleton('core/session')->getObjectType();
|
20 |
+
|
21 |
+
if ($object_type == Mage::helper("globallink")->_get_object_type_block()) {
|
22 |
+
$object_id = $row['block_id'];
|
23 |
+
}
|
24 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_page()) {
|
25 |
+
$object_id = $row['page_id'];
|
26 |
+
}
|
27 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_product_attributes()) {
|
28 |
+
$object_id = $row['attribute_id'];
|
29 |
+
}
|
30 |
+
else {
|
31 |
+
$object_id = $row['entity_id'];
|
32 |
+
}
|
33 |
+
|
34 |
+
$what = "object_id, submission_name, submission_id";
|
35 |
+
$where = "WHERE object_id IN ('" . $object_id . "') AND object_type = '" . $object_type . "' AND status IN ('"
|
36 |
+
. Mage::helper("globallink")->_get_submission_status_sent() . "','" . Mage::helper("globallink")->_get_submission_status_ready() . "','"
|
37 |
+
. Mage::helper("globallink")->_get_submission_status_error() . "')";
|
38 |
+
$status_objects = Mage::helper("globallink")->get_status_objects($what, $where, FALSE);
|
39 |
+
$submission_arr = array();
|
40 |
+
$submission_link_arr = array();
|
41 |
+
foreach ($status_objects as $submission) {
|
42 |
+
$object_id = $submission['object_id'];
|
43 |
+
$submission_name = $submission['submission_name'];
|
44 |
+
$submission_id = $submission['submission_id'];
|
45 |
+
|
46 |
+
if (!array_key_exists($submission_name, $submission_arr)) {
|
47 |
+
$what = "gl_target_locale";
|
48 |
+
$where = "WHERE object_id = '" . $object_id . "' AND submission_id = '" . $submission_id . "' AND status IN ('"
|
49 |
+
. Mage::helper("globallink")->_get_submission_status_sent() . "','" . Mage::helper("globallink")->_get_submission_status_ready() . "','"
|
50 |
+
. Mage::helper("globallink")->_get_submission_status_error() . "')";
|
51 |
+
$target_locales = Mage::helper("globallink")->get_status_objects($what, $where, FALSE);
|
52 |
+
foreach ($target_locales as $target) {
|
53 |
+
$gl_locale_desc = Mage::helper("globallink")->get_gl_locale_desc($target['gl_target_locale']);
|
54 |
+
|
55 |
+
if (array_key_exists($submission_name, $submission_arr)) {
|
56 |
+
$submission_arr[$submission_name] .= '; ' . $gl_locale_desc;
|
57 |
+
}
|
58 |
+
else {
|
59 |
+
$submission_arr[$submission_name] = $gl_locale_desc;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
$url = Mage::helper("adminhtml")->getUrl("globallink/adminhtml_glactivesubmissions/index", array("selected_submission_name" => urlencode($submission_name)));
|
64 |
+
$submission_link_arr[] = '<p><a href="' . $url . '">' . $submission_name . '</a> - ' . $submission_arr[$submission_name] . '</p>';
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
return implode("", $submission_link_arr);
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
app/code/community/Transperfect/Globallink/Block/Adminhtml/Renderer/Delete.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class Transperfect_Globallink_Block_Adminhtml_Renderer_Delete extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action {
|
17 |
+
|
18 |
+
public function render(Varien_Object $row) {
|
19 |
+
$field_id = $row['globallink_field_id'];
|
20 |
+
$user_submitted = $row['user_submitted'];
|
21 |
+
if ($user_submitted == 1) {
|
22 |
+
$url = Mage::helper("adminhtml")->getUrl("globallink/adminhtml_glfield/delete", array("id" => $field_id, 'object_type' => $this->getRequest()->getParam('selected_object_type')));
|
23 |
+
$delete_link = '<p><a href="' . $url . '">Delete</a></p>';
|
24 |
+
return $delete_link;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/community/Transperfect/Globallink/Helper/Data.php
ADDED
@@ -0,0 +1,1127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once Mage::getBaseDir('app') . '/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/GlobalLink.php';
|
17 |
+
require_once Mage::getBaseDir('app') . '/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/gl_ws_receive_translations.php';
|
18 |
+
require_once Mage::getBaseDir('app') . '/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/gl_ws_common.php';
|
19 |
+
|
20 |
+
class Transperfect_Globallink_Helper_Data extends Mage_Core_Helper_Abstract {
|
21 |
+
|
22 |
+
function _get_object_type_product() {
|
23 |
+
return "catalog/product";
|
24 |
+
}
|
25 |
+
|
26 |
+
function _get_object_type_product_attributes() {
|
27 |
+
return "catalog/product_attributes";
|
28 |
+
}
|
29 |
+
|
30 |
+
function _get_object_type_category() {
|
31 |
+
return "catalog/category";
|
32 |
+
}
|
33 |
+
|
34 |
+
function _get_object_type_block() {
|
35 |
+
return "cms/block";
|
36 |
+
}
|
37 |
+
|
38 |
+
function _get_object_type_page() {
|
39 |
+
return "cms/page";
|
40 |
+
}
|
41 |
+
|
42 |
+
function _get_object_type_email() {
|
43 |
+
return "adminhtml/email_template";
|
44 |
+
}
|
45 |
+
|
46 |
+
function _get_object_type_newsletter() {
|
47 |
+
return "newsletter/template";
|
48 |
+
}
|
49 |
+
|
50 |
+
function _get_submission_status_sent() {
|
51 |
+
return "Sent for Translations";
|
52 |
+
}
|
53 |
+
|
54 |
+
function _get_submission_status_cancelled() {
|
55 |
+
return "Cancelled";
|
56 |
+
}
|
57 |
+
|
58 |
+
function _get_submission_status_complete() {
|
59 |
+
return "Translation Complete";
|
60 |
+
}
|
61 |
+
|
62 |
+
function _get_submission_status_deleted() {
|
63 |
+
return "Source Deleted";
|
64 |
+
}
|
65 |
+
|
66 |
+
function _get_submission_status_ready() {
|
67 |
+
return "Ready for Import";
|
68 |
+
}
|
69 |
+
|
70 |
+
function _get_submission_status_error() {
|
71 |
+
return "Error";
|
72 |
+
}
|
73 |
+
|
74 |
+
function gl_debug($from, $message) {
|
75 |
+
Mage::log("[" . $from . "][" . print_r($message, true) . "]");
|
76 |
+
if ($this->setting_enabled('gl_logging')) {
|
77 |
+
Mage::log("[" . $from . "][" . print_r($message, true) . "]", null, 'globallink.log');
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
function get_cron_job_code() {
|
82 |
+
return "gl_cron_auto_update";
|
83 |
+
}
|
84 |
+
|
85 |
+
function get_cron_status_success() {
|
86 |
+
return "success";
|
87 |
+
}
|
88 |
+
|
89 |
+
function get_cron_status_error() {
|
90 |
+
return "error";
|
91 |
+
}
|
92 |
+
|
93 |
+
function get_wsdl_path() {
|
94 |
+
$burl = Mage::getBaseDir('app');
|
95 |
+
$wsdl_path = $burl . "/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/";
|
96 |
+
return $wsdl_path;
|
97 |
+
}
|
98 |
+
|
99 |
+
function get_status_objects($what = "*", $where = "", $quote = TRUE) {
|
100 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
101 |
+
if ($quote) {
|
102 |
+
$where = $db->quote($where);
|
103 |
+
}
|
104 |
+
|
105 |
+
$sql = " SELECT $what FROM globallink_status $where ;";
|
106 |
+
$data = $db->query($sql);
|
107 |
+
$arr = array();
|
108 |
+
if ($data) {
|
109 |
+
while ($row = $data->fetch(PDO::FETCH_ASSOC)) {
|
110 |
+
array_push($arr, $row);
|
111 |
+
}
|
112 |
+
}
|
113 |
+
return $arr;
|
114 |
+
}
|
115 |
+
|
116 |
+
function get_all_gl_locales($remove_mapped = FALSE) {
|
117 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
118 |
+
$sql = "SELECT * FROM globallink_locale ORDER BY gl_locale_desc;";
|
119 |
+
|
120 |
+
$locales = array();
|
121 |
+
|
122 |
+
$results = $db->query($sql);
|
123 |
+
if ($results) {
|
124 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
125 |
+
$store_id = 'NULL';
|
126 |
+
if (isset($row['store_id'])) {
|
127 |
+
if ($remove_mapped == TRUE) {
|
128 |
+
continue;
|
129 |
+
}
|
130 |
+
$store_id = $row['store_id'];
|
131 |
+
}
|
132 |
+
$locales[$row['gl_locale_code']] = array('gl_locale_code' => $row['gl_locale_code'],
|
133 |
+
'gl_locale_desc' => $row['gl_locale_desc'], 'store_id' => $store_id);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
return $locales;
|
138 |
+
}
|
139 |
+
|
140 |
+
function get_gl_locale_options() {
|
141 |
+
$arr = $this->get_mapped_locales();
|
142 |
+
$options = array();
|
143 |
+
foreach ($arr as $gl_locale) {
|
144 |
+
$options[$gl_locale['gl_locale_code']] = $gl_locale['gl_locale_desc'];
|
145 |
+
}
|
146 |
+
return $options;
|
147 |
+
}
|
148 |
+
|
149 |
+
function get_gl_locale_desc($gl_locale_code) {
|
150 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
151 |
+
$sql = "SELECT gl_locale_desc FROM globallink_locale WHERE gl_locale_code = '$gl_locale_code';";
|
152 |
+
|
153 |
+
$results = $db->query($sql);
|
154 |
+
if ($results) {
|
155 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
156 |
+
if (isset($row['gl_locale_desc'])) {
|
157 |
+
$gl_locale_desc = $row['gl_locale_desc'];
|
158 |
+
}
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
return $gl_locale_desc;
|
163 |
+
}
|
164 |
+
|
165 |
+
function get_gl_status_options() {
|
166 |
+
$statuses = array(
|
167 |
+
$this->_get_submission_status_ready() => $this->_get_submission_status_ready(),
|
168 |
+
$this->_get_submission_status_deleted() => $this->_get_submission_status_deleted(),
|
169 |
+
$this->_get_submission_status_error() => $this->_get_submission_status_error()
|
170 |
+
);
|
171 |
+
return $statuses;
|
172 |
+
}
|
173 |
+
|
174 |
+
public function getSubmissionNames() {
|
175 |
+
$gl_sub_arr = $this->get_status_objects("DISTINCT submission_name", "WHERE status IN ('"
|
176 |
+
. $this->_get_submission_status_sent() . "','" . $this->_get_submission_status_deleted() . "','" . $this->_get_submission_status_cancelled() . "','"
|
177 |
+
. $this->_get_submission_status_error() . "','" . $this->_get_submission_status_ready() . "') ORDER BY submission_name ", FALSE);
|
178 |
+
$submissions = array();
|
179 |
+
foreach ($gl_sub_arr as $submission_row) {
|
180 |
+
$submissions[] = $submission_row['submission_name'];
|
181 |
+
}
|
182 |
+
return $submissions;
|
183 |
+
}
|
184 |
+
|
185 |
+
public function getActiveSubmissionNames() {
|
186 |
+
$this->get_submission_status();
|
187 |
+
$gl_sub_arr = $this->get_status_objects("DISTINCT submission_name", "WHERE status IN ('"
|
188 |
+
. $this->_get_submission_status_sent() . "','" . $this->_get_submission_status_ready() . "','" . $this->_get_submission_status_cancelled() . "','"
|
189 |
+
. $this->_get_submission_status_error() . "') ORDER BY submission_name ", FALSE);
|
190 |
+
$submissions = array();
|
191 |
+
foreach ($gl_sub_arr as $submission_row) {
|
192 |
+
$submissions[] = $submission_row['submission_name'];
|
193 |
+
}
|
194 |
+
return $submissions;
|
195 |
+
}
|
196 |
+
|
197 |
+
public function getSubmitters() {
|
198 |
+
$gl_sub_arr = $this->get_status_objects("DISTINCT submitter", "WHERE status IN ('"
|
199 |
+
. $this->_get_submission_status_sent() . "','" . $this->_get_submission_status_ready() . "','" . $this->_get_submission_status_cancelled() . "','"
|
200 |
+
. $this->_get_submission_status_error() . "') ORDER BY submitter ", FALSE);
|
201 |
+
$submitters = array();
|
202 |
+
foreach ($gl_sub_arr as $submitter_row) {
|
203 |
+
$submitters[] = $submitter_row['submitter'];
|
204 |
+
}
|
205 |
+
return $submitters;
|
206 |
+
}
|
207 |
+
|
208 |
+
public function getSubmissionOptions() {
|
209 |
+
$arr = $this->getSubmissionNames();
|
210 |
+
$options = array();
|
211 |
+
foreach ($arr as $option) {
|
212 |
+
$options[$option] = $option;
|
213 |
+
}
|
214 |
+
return $options;
|
215 |
+
}
|
216 |
+
|
217 |
+
public function getObjectTypeOptions($remove_field_arr = NULL) {
|
218 |
+
$options = array(
|
219 |
+
'catalog/product' => 'Product',
|
220 |
+
'catalog/product_attributes' => 'Product Attributes',
|
221 |
+
'catalog/category' => 'Product Category',
|
222 |
+
'cms/block' => 'CMS Block',
|
223 |
+
'cms/page' => 'CMS Page',
|
224 |
+
'adminhtml/email_template' => 'Transactional Email Template',
|
225 |
+
'newsletter/template' => 'Newsletter Template',
|
226 |
+
);
|
227 |
+
|
228 |
+
if ($remove_field_arr != NULL) {
|
229 |
+
foreach ($remove_field_arr as $remove_field) {
|
230 |
+
unset($options[$remove_field]);
|
231 |
+
}
|
232 |
+
}
|
233 |
+
|
234 |
+
asort($options);
|
235 |
+
|
236 |
+
return $options;
|
237 |
+
}
|
238 |
+
|
239 |
+
function get_default_gl_store_id() {
|
240 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
241 |
+
$sql = "SELECT * FROM globallink_locale WHERE store_id IS NOT NULL AND gl_default = 1;";
|
242 |
+
$store_id = '';
|
243 |
+
$results = $db->query($sql);
|
244 |
+
if ($results) {
|
245 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
246 |
+
if (isset($row['store_id'])) {
|
247 |
+
$store_id = $row['store_id'];
|
248 |
+
break;
|
249 |
+
}
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
return $store_id;
|
254 |
+
}
|
255 |
+
|
256 |
+
function get_mapped_locales() {
|
257 |
+
$stores = Mage::app()->getStores();
|
258 |
+
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
|
259 |
+
$admin_store = Mage::app()->getStore();
|
260 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
261 |
+
$sql = "SELECT * FROM globallink_locale WHERE store_id IS NOT NULL ORDER BY gl_locale_desc;";
|
262 |
+
|
263 |
+
$targetLanguages = array();
|
264 |
+
|
265 |
+
$results = $db->query($sql);
|
266 |
+
if ($results) {
|
267 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
268 |
+
$store_id = 'NULL';
|
269 |
+
$store_name = 'NULL';
|
270 |
+
if (isset($row['store_id'])) {
|
271 |
+
$store_id = $row['store_id'];
|
272 |
+
if ($store_id == Mage_Core_Model_App::ADMIN_STORE_ID) {
|
273 |
+
$store_name = $admin_store->getName();
|
274 |
+
}
|
275 |
+
else {
|
276 |
+
foreach ($stores as $store) {
|
277 |
+
if ($store->getId() == $store_id) {
|
278 |
+
$store_name = $store->getName();
|
279 |
+
}
|
280 |
+
}
|
281 |
+
}
|
282 |
+
}
|
283 |
+
$targetLanguages[$row['gl_locale_code']] = array('gl_locale_code' => $row['gl_locale_code'],
|
284 |
+
'gl_locale_desc' => $row['gl_locale_desc'], 'store_id' => $store_id, 'store_name' => $store_name, 'default' => $row['gl_default']);
|
285 |
+
}
|
286 |
+
}
|
287 |
+
|
288 |
+
return $targetLanguages;
|
289 |
+
}
|
290 |
+
|
291 |
+
function get_gl_locale_codes($what = "*", $where = "") {
|
292 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
293 |
+
$sql = " SELECT $what FROM globallink_locale $where ;";
|
294 |
+
$data = $db->query($sql);
|
295 |
+
|
296 |
+
$arr = array();
|
297 |
+
if ($data) {
|
298 |
+
while ($row = $data->fetch(PDO::FETCH_ASSOC)) {
|
299 |
+
$arr[] = $row[$what];
|
300 |
+
}
|
301 |
+
}
|
302 |
+
return $arr;
|
303 |
+
}
|
304 |
+
|
305 |
+
function get_gl_configurations() {
|
306 |
+
$gl_config = array();
|
307 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
308 |
+
$sql = "SELECT * FROM globallink_projects;";
|
309 |
+
$results = $db->query($sql);
|
310 |
+
if ($results) {
|
311 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
312 |
+
$gl_config[$row['globallink_project_id']] = array('globallink_project_id' => $row['globallink_project_id'],
|
313 |
+
'globallink_url' => $row['globallink_url'], 'project_short_code' => $row['project_short_code'],
|
314 |
+
'classifier' => $row['classifier'], 'mime_type' => $row['mime_type'],
|
315 |
+
'files_per_submission' => $row['files_per_submission'],
|
316 |
+
'max_target_count' => $row['max_target_count'],
|
317 |
+
);
|
318 |
+
}
|
319 |
+
}
|
320 |
+
$usql = "SELECT * FROM globallink_users;";
|
321 |
+
$uresults = $db->query($usql);
|
322 |
+
if ($uresults) {
|
323 |
+
while ($row = $uresults->fetch(PDO::FETCH_ASSOC)) {
|
324 |
+
$keys = array_keys($gl_config);
|
325 |
+
foreach ($keys as $key) {
|
326 |
+
$gl_config[$key]['globallink_user_id'] = $row['globallink_user_id'];
|
327 |
+
$gl_config[$key]['globallink_user_name'] = $row['globallink_user_name'];
|
328 |
+
$gl_config[$key]['globallink_user_password'] = $this->decrypt_gl_pw($row['globallink_user_name'], $row['globallink_user_password']);
|
329 |
+
}
|
330 |
+
}
|
331 |
+
}
|
332 |
+
return $gl_config;
|
333 |
+
}
|
334 |
+
|
335 |
+
function encrypt_gl_pw($user_id, $pw) {
|
336 |
+
$encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($user_id), $pw, MCRYPT_MODE_CBC, md5(md5($user_id))));
|
337 |
+
return $encrypted;
|
338 |
+
}
|
339 |
+
|
340 |
+
function decrypt_gl_pw($user_id, $pw) {
|
341 |
+
$decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($user_id), base64_decode($pw), MCRYPT_MODE_CBC, md5(md5($user_id))), "\0");
|
342 |
+
return $decrypted;
|
343 |
+
}
|
344 |
+
|
345 |
+
function insert_child_element($dom, $root, $elem_name, $elem_value, $attributes = NULL) {
|
346 |
+
if ($elem_name) {
|
347 |
+
$item = $dom->createElement($elem_name);
|
348 |
+
if (isset($attributes) && is_array($attributes)) {
|
349 |
+
foreach ($attributes as $key => $value) {
|
350 |
+
$item->setAttribute($key, $value);
|
351 |
+
}
|
352 |
+
}
|
353 |
+
$text = $dom->createTextNode($elem_value);
|
354 |
+
$item->appendChild($text);
|
355 |
+
$root->appendChild($item);
|
356 |
+
}
|
357 |
+
}
|
358 |
+
|
359 |
+
function parse_target_xml($target_xml) {
|
360 |
+
$dom = new DomDocument;
|
361 |
+
|
362 |
+
try {
|
363 |
+
$dom->preserveWhiteSpace = FALSE;
|
364 |
+
$dom->loadXML($target_xml);
|
365 |
+
|
366 |
+
$gl_object = array();
|
367 |
+
|
368 |
+
$contents = $dom->getElementsByTagName('content');
|
369 |
+
foreach ($contents as $content) {
|
370 |
+
if (!is_null($content->attributes)) {
|
371 |
+
foreach ($content->attributes as $attrName => $attrNode) {
|
372 |
+
if ('object_type' == $attrName) {
|
373 |
+
$gl_object['object_type'] = $attrNode->value;
|
374 |
+
}
|
375 |
+
elseif ('object_id' == $attrName) {
|
376 |
+
$gl_object['object_id'] = $attrNode->value;
|
377 |
+
}
|
378 |
+
}
|
379 |
+
}
|
380 |
+
}
|
381 |
+
|
382 |
+
$names = $dom->getElementsByTagName('name');
|
383 |
+
foreach ($names as $name) {
|
384 |
+
$gl_object['name'] = $name->nodeValue;
|
385 |
+
}
|
386 |
+
|
387 |
+
$attributes = $dom->getElementsByTagName('attribute');
|
388 |
+
$attr_arr = array();
|
389 |
+
|
390 |
+
foreach ($attributes as $attribute) {
|
391 |
+
$translated_attr = $attribute->nodeValue;
|
392 |
+
if (!is_null($attribute->attributes)) {
|
393 |
+
$attr_id = '';
|
394 |
+
$attr_code = '';
|
395 |
+
foreach ($attribute->attributes as $attrName => $attrNode) {
|
396 |
+
switch ($attrName) {
|
397 |
+
case 'attribute_id':
|
398 |
+
$attr_id = $attrNode->value;
|
399 |
+
continue 2;
|
400 |
+
case 'attribute_code':
|
401 |
+
$attr_code = $attrNode->value;
|
402 |
+
continue 2;
|
403 |
+
}
|
404 |
+
}
|
405 |
+
$attr_arr[$attr_code] = $translated_attr;
|
406 |
+
}
|
407 |
+
}
|
408 |
+
|
409 |
+
$gl_object['attributes'] = $attr_arr;
|
410 |
+
|
411 |
+
return $gl_object;
|
412 |
+
}
|
413 |
+
catch (Exception $ex) {
|
414 |
+
$this->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Exception in parsing target XML ', $ex->getMessage());
|
415 |
+
throw $ex;
|
416 |
+
}
|
417 |
+
}
|
418 |
+
|
419 |
+
function create_source_xml($gl_object) {
|
420 |
+
|
421 |
+
if (!isset($gl_object) || count($gl_object) == 0) {
|
422 |
+
return "";
|
423 |
+
}
|
424 |
+
|
425 |
+
$dom = new DOMDocument('1.0', 'UTF-8');
|
426 |
+
$dom->formatOutput = TRUE;
|
427 |
+
|
428 |
+
try {
|
429 |
+
$root = $dom->createElement("content");
|
430 |
+
$dom->appendChild($root);
|
431 |
+
|
432 |
+
$type = $dom->createAttribute('object_type');
|
433 |
+
$type->value = $gl_object['object_type'];
|
434 |
+
$root->appendChild($type);
|
435 |
+
|
436 |
+
$pid = $dom->createAttribute('object_id');
|
437 |
+
$pid->value = $gl_object['object_id'];
|
438 |
+
$root->appendChild($pid);
|
439 |
+
|
440 |
+
if (isset($gl_object['name'])) {
|
441 |
+
$this->insert_child_element($dom, $root, "name", $gl_object['name']);
|
442 |
+
}
|
443 |
+
|
444 |
+
if (isset($gl_object['attributes'])) {
|
445 |
+
$attr_arr = $gl_object['attributes'];
|
446 |
+
foreach ($attr_arr as $attr_code => $attr_value) {
|
447 |
+
if ($attr_value != "") {
|
448 |
+
$this->insert_child_element($dom, $root, "attribute", $attr_value, array('attribute_code' => $attr_code));
|
449 |
+
}
|
450 |
+
}
|
451 |
+
}
|
452 |
+
}
|
453 |
+
catch (Exception $ex) {
|
454 |
+
$this->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Exception in creating XML ', $ex->getMessage());
|
455 |
+
throw $ex;
|
456 |
+
}
|
457 |
+
|
458 |
+
return $dom->saveXML();
|
459 |
+
}
|
460 |
+
|
461 |
+
function get_formatted_file_name($string) {
|
462 |
+
$bad = array_merge(
|
463 |
+
array_map('chr', range(0, 31)), array("<", ">", ":", '"', "/", "\\", "|", "?", "*"));
|
464 |
+
|
465 |
+
$name = str_replace($bad, "_", $string);
|
466 |
+
|
467 |
+
if (strlen($string) > 50) {
|
468 |
+
$name = substr($string, 0, 50);
|
469 |
+
}
|
470 |
+
return $name;
|
471 |
+
}
|
472 |
+
|
473 |
+
public function insert_gl_status($gl_array, $status) {
|
474 |
+
foreach ($gl_array as $globallink) {
|
475 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
476 |
+
$target_locale_arr = $globallink->targetLocale;
|
477 |
+
$due_date = intval($globallink->dueDate / 1000);
|
478 |
+
foreach ($target_locale_arr as $target_locale) {
|
479 |
+
$where = " WHERE object_type = '" . $globallink->objectType . "' AND object_id = " . $globallink->objectId
|
480 |
+
. " AND gl_source_locale = '" . $globallink->sourceLocale . "' AND gl_target_locale = '" . $target_locale . "'";
|
481 |
+
|
482 |
+
$existing_row = $this->get_status_objects("*", $where, FALSE);
|
483 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][globallink_status UPDATE SQL]", $existing_row);
|
484 |
+
if (count($existing_row) > 0) {
|
485 |
+
$job_id = $existing_row[0]['globallink_job_id'];
|
486 |
+
$time = time();
|
487 |
+
$object_name = $db->quote($globallink->objectName);
|
488 |
+
$submission_name = $db->quote($globallink->submissionName);
|
489 |
+
$document_name = $db->quote($globallink->sourceFileName);
|
490 |
+
$sql = "UPDATE globallink_status SET globallink_user_id = $globallink->glUserId ,
|
491 |
+
globallink_project_id = $globallink->glProjectId,
|
492 |
+
object_type = '$globallink->objectType', object_id = $globallink->objectId,
|
493 |
+
object_name = $object_name, document_name = $document_name,
|
494 |
+
document_id = '$globallink->documentTicket', submission_name = $submission_name,
|
495 |
+
submission_id = '$globallink->submissionTicket', gl_source_locale = '$globallink->sourceLocale',
|
496 |
+
gl_target_locale = '$target_locale', create_date = $time , update_date = $time,
|
497 |
+
due_date = $due_date , status = '$status', submitter = '$globallink->submitter', last_modified = $time, changed = 0 WHERE globallink_job_id = $job_id ;";
|
498 |
+
|
499 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][globallink_status UPDATE SQL]", $sql);
|
500 |
+
$db->query($sql);
|
501 |
+
}
|
502 |
+
else {
|
503 |
+
$time = time();
|
504 |
+
$object_name = $db->quote($globallink->objectName);
|
505 |
+
$submission_name = $db->quote($globallink->submissionName);
|
506 |
+
$document_name = $db->quote($globallink->sourceFileName);
|
507 |
+
$sql = "INSERT INTO globallink_status (
|
508 |
+
globallink_user_id, globallink_project_id, object_type,
|
509 |
+
object_id, object_name, document_name, document_id,
|
510 |
+
submission_name, submission_id, gl_source_locale,
|
511 |
+
gl_target_locale, create_date, update_date,
|
512 |
+
due_date, status, submitter, last_modified, changed) VALUES (
|
513 |
+
$globallink->glUserId, $globallink->glProjectId,
|
514 |
+
'$globallink->objectType', $globallink->objectId, $object_name,
|
515 |
+
$document_name, '$globallink->documentTicket', $submission_name,
|
516 |
+
'$globallink->submissionTicket', '$globallink->sourceLocale',
|
517 |
+
'$target_locale', $time, $time, $due_date, '$status', '$globallink->submitter', $time, 0);";
|
518 |
+
|
519 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][globallink_status INSERT SQL]", $sql);
|
520 |
+
$db->query($sql);
|
521 |
+
}
|
522 |
+
}
|
523 |
+
}
|
524 |
+
}
|
525 |
+
|
526 |
+
public function gl_get_all_completed_targets() {
|
527 |
+
$gl_tgt_array = getReadyTranslationsDetailsFromPD();
|
528 |
+
$gl_arr = array();
|
529 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Completed Targets Before]", $gl_tgt_array);
|
530 |
+
foreach ($gl_tgt_array as &$gl_target) {
|
531 |
+
$document_id = $gl_target->documentTicket;
|
532 |
+
$submission_id = $gl_target->submissionTicket;
|
533 |
+
$target_locale = $gl_target->targetLocale;
|
534 |
+
$where = " WHERE document_id = '" . $document_id . "' AND submission_id ='" . $submission_id . "' AND gl_target_locale = '" . $target_locale . "'";
|
535 |
+
$arr = $this->get_status_objects("*", $where, FALSE);
|
536 |
+
$_arr_count = 0;
|
537 |
+
foreach ($arr as $row) {
|
538 |
+
$_arr_count++;
|
539 |
+
$object_type = $row['object_type'];
|
540 |
+
$object_id = $row['object_id'];
|
541 |
+
$row_id = $row['globallink_job_id'];
|
542 |
+
if ($row['status'] == $this->_get_submission_status_sent()) {
|
543 |
+
$status_massage = $this->_get_submission_status_ready();
|
544 |
+
$this->update_gl_status($row_id, $status_massage);
|
545 |
+
}
|
546 |
+
$source = $this->check_gl_translation_source($object_type, $object_id);
|
547 |
+
if (!$source) {
|
548 |
+
$status_massage = $this->_get_submission_status_deleted();
|
549 |
+
$row['status'] = $status_massage;
|
550 |
+
$this->update_gl_status($row_id, $status_massage);
|
551 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Status Update -]", $source);
|
552 |
+
}
|
553 |
+
$gl_target->glRowId = $row['globallink_job_id'];
|
554 |
+
$gl_target->objectType = $row['object_type'];
|
555 |
+
$gl_target->objectId = $row['object_id'];
|
556 |
+
$gl_target->objectName = $row['object_name'];
|
557 |
+
$gl_target->status = $row['status'];
|
558 |
+
$gl_target->glUserId = $row['globallink_user_id'];
|
559 |
+
$gl_target->glProjectId = $row['globallink_project_id'];
|
560 |
+
}
|
561 |
+
if ($_arr_count > 0) {
|
562 |
+
$gl_arr[$gl_target->glRowId] = $gl_target;
|
563 |
+
}
|
564 |
+
}
|
565 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Completed Targets After]", $gl_arr);
|
566 |
+
return $gl_arr;
|
567 |
+
}
|
568 |
+
|
569 |
+
function delete_and_update_attribute_set_config($attr_set_id, $attr_arr) {
|
570 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
571 |
+
$sql = "DELETE FROM globallink_attribute_sets WHERE attribute_set_id = $attr_set_id;";
|
572 |
+
$db->query($sql);
|
573 |
+
foreach ($attr_arr as $attr_id => $attribute) {
|
574 |
+
$attr_code = $db->quote($attribute['attribute']['attribute_code']);
|
575 |
+
$translatable = $attribute['translatable'];
|
576 |
+
$sql = "INSERT INTO globallink_attribute_sets VALUES ($attr_set_id, $attr_id, $attr_code, $translatable);";
|
577 |
+
$db->query($sql);
|
578 |
+
}
|
579 |
+
}
|
580 |
+
|
581 |
+
function get_attribute_set_config($attr_set_id = "") {
|
582 |
+
$where = "";
|
583 |
+
if ($attr_set_id != "") {
|
584 |
+
$where = "WHERE attribute_set_id = " . $attr_set_id . " ";
|
585 |
+
}
|
586 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
587 |
+
$sql = "SELECT * FROM globallink_attribute_sets " . $where . ";";
|
588 |
+
$arr = array();
|
589 |
+
$results = $db->query($sql);
|
590 |
+
if ($results) {
|
591 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
592 |
+
if ($row['include_in_translation'] == 1) {
|
593 |
+
$arr[$row['attribute_set_id']][$row['attribute_id']] = $row['include_in_translation'];
|
594 |
+
}
|
595 |
+
}
|
596 |
+
}
|
597 |
+
return $arr;
|
598 |
+
}
|
599 |
+
|
600 |
+
function get_attribute_set_code($attr_set_id = "") {
|
601 |
+
$where = "";
|
602 |
+
if ($attr_set_id != "") {
|
603 |
+
$where = "WHERE attribute_set_id = " . $attr_set_id . " ";
|
604 |
+
}
|
605 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
606 |
+
$sql = "SELECT * FROM globallink_attribute_sets " . $where . ";";
|
607 |
+
$arr = array();
|
608 |
+
$results = $db->query($sql);
|
609 |
+
if ($results) {
|
610 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
611 |
+
if ($row['include_in_translation'] == 1) {
|
612 |
+
$arr[] = $row['attribute_code'];
|
613 |
+
}
|
614 |
+
}
|
615 |
+
}
|
616 |
+
return $arr;
|
617 |
+
}
|
618 |
+
|
619 |
+
function get_object_attributes($object_type) {
|
620 |
+
$where = "WHERE object_type = '" . $object_type . "'";
|
621 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
622 |
+
$sql = "SELECT * FROM globallink_field " . $where . ";";
|
623 |
+
$arr = array();
|
624 |
+
$results = $db->query($sql);
|
625 |
+
if ($results) {
|
626 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
627 |
+
if ($row['include_in_translation'] == 1) {
|
628 |
+
$arr[] = $row['field_code'];
|
629 |
+
}
|
630 |
+
}
|
631 |
+
}
|
632 |
+
return $arr;
|
633 |
+
}
|
634 |
+
|
635 |
+
public function getIncludeIds($objectType) {
|
636 |
+
$sql = "SELECT globallink_field_id FROM globallink_field WHERE object_type = '$objectType' AND include_in_translation = 1;";
|
637 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
638 |
+
$arr = array();
|
639 |
+
$results = $db->query($sql);
|
640 |
+
if ($results) {
|
641 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
642 |
+
$arr[] = $row['globallink_field_id'];
|
643 |
+
}
|
644 |
+
}
|
645 |
+
|
646 |
+
return $arr;
|
647 |
+
}
|
648 |
+
|
649 |
+
public function getFieldIds($objectType) {
|
650 |
+
$sql = "SELECT globallink_field_id FROM globallink_field WHERE object_type = '$objectType';";
|
651 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
652 |
+
$arr = array();
|
653 |
+
$results = $db->query($sql);
|
654 |
+
if ($results) {
|
655 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
656 |
+
$arr[] = $row['globallink_field_id'];
|
657 |
+
}
|
658 |
+
}
|
659 |
+
|
660 |
+
return $arr;
|
661 |
+
}
|
662 |
+
|
663 |
+
public function getIncludeFields($object_type) {
|
664 |
+
$sql = "SELECT field_code FROM globallink_field WHERE object_type = '$object_type' AND include_in_translation = 1;";
|
665 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
666 |
+
$arr = array();
|
667 |
+
$results = $db->query($sql);
|
668 |
+
if ($results) {
|
669 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
670 |
+
$arr[] = $row['field_code'];
|
671 |
+
}
|
672 |
+
}
|
673 |
+
|
674 |
+
return $arr;
|
675 |
+
}
|
676 |
+
|
677 |
+
public function get_pd_user_projects() {
|
678 |
+
if (Mage::getSingleton('adminhtml/session')->getData('gl_projects') != null) {
|
679 |
+
return Mage::getSingleton('adminhtml/session')->getData('gl_projects');
|
680 |
+
}
|
681 |
+
else {
|
682 |
+
$proj_arr = get_user_PD_projects();
|
683 |
+
Mage::getSingleton('adminhtml/session')->setData('gl_projects', $proj_arr);
|
684 |
+
return $proj_arr;
|
685 |
+
}
|
686 |
+
}
|
687 |
+
|
688 |
+
public function cron_update_all_completed_records() {
|
689 |
+
$success = TRUE;
|
690 |
+
$count = 0;
|
691 |
+
try {
|
692 |
+
$translation = array();
|
693 |
+
$gl_arr = $this->gl_get_all_completed_targets();
|
694 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Completed Targets]", $gl_arr);
|
695 |
+
foreach ($gl_arr as $globallink) {
|
696 |
+
$row_id = $globallink->glRowId;
|
697 |
+
$target_ticket = $globallink->targetTicket;
|
698 |
+
try {
|
699 |
+
$translated_content = downloadTargetResource($target_ticket);
|
700 |
+
$translation = array('row_id' => $row_id, 'target_locale' => $globallink->targetLocale,
|
701 |
+
'target_ticket' => $target_ticket, 'translated_content' => $translated_content);
|
702 |
+
$this->update_translated_record_in_magento($translation);
|
703 |
+
$this->update_gl_status($row_id, 'Translation Complete');
|
704 |
+
sendDownloadConfirmation($target_ticket);
|
705 |
+
$count++;
|
706 |
+
}
|
707 |
+
catch (SoapFault $sf) {
|
708 |
+
$success = FALSE;
|
709 |
+
$this->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ": Globallink WebService Error for [$globallink->glRowId][$globallink->objectType][$globallink->objectName]", $sf->getMessage());
|
710 |
+
$this->update_gl_status($row_id, 'Sent for Translations');
|
711 |
+
}
|
712 |
+
catch (Exception $ex) {
|
713 |
+
$success = FALSE;
|
714 |
+
$this->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ": Globallink Generic Error for [$globallink->glRowId][$globallink->objectType][$globallink->objectName]", $ex->getMessage());
|
715 |
+
$this->update_gl_status($row_id, 'Sent for Translations');
|
716 |
+
}
|
717 |
+
}
|
718 |
+
|
719 |
+
if ($count > 0) {
|
720 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "$count records successfully retrieved and imported");
|
721 |
+
$message = $this->__($count . ' translated documents retrieved and imported into Magento.');
|
722 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
723 |
+
if ($count != count($gl_arr)) {
|
724 |
+
$warning = "There was some error while importing $count documents into Magento. Please check logs for more details.";
|
725 |
+
Mage::getSingleton('adminhtml/session')->addWarning($warning);
|
726 |
+
}
|
727 |
+
}
|
728 |
+
else {
|
729 |
+
$message = $this->__($count . ' translated documents retrieved and imported into Magento.');
|
730 |
+
Mage::getSingleton('adminhtml/session')->addError($message);
|
731 |
+
}
|
732 |
+
}
|
733 |
+
catch (SoapFault $sf) {
|
734 |
+
$success = FALSE;
|
735 |
+
$this->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
736 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink WebService Error - ' . $sf->getMessage());
|
737 |
+
}
|
738 |
+
catch (Exception $ex) {
|
739 |
+
$success = FALSE;
|
740 |
+
$this->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
741 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
742 |
+
}
|
743 |
+
|
744 |
+
return $success;
|
745 |
+
}
|
746 |
+
|
747 |
+
public function update_translated_record_in_magento($translation) {
|
748 |
+
|
749 |
+
$gl_object = $this->parse_target_xml($translation['translated_content']);
|
750 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Translated Content]", $gl_object);
|
751 |
+
$mapped_langs = $this->get_mapped_locales();
|
752 |
+
$tgt_lang_store_id = $mapped_langs[$translation['target_locale']]['store_id'];
|
753 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Translation Store Id]", $tgt_lang_store_id);
|
754 |
+
|
755 |
+
if ($gl_object['object_type'] == $this->_get_object_type_product()) {
|
756 |
+
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
|
757 |
+
Mage::getSingleton('catalog/product_action')->updateAttributes(array($gl_object['object_id']), $gl_object['attributes'], intval($tgt_lang_store_id));
|
758 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Attributes saved successfully for Product Id]", $gl_object['object_id']);
|
759 |
+
}
|
760 |
+
elseif ($gl_object['object_type'] == $this->_get_object_type_product_attributes()) {
|
761 |
+
$session = Mage::getSingleton('adminhtml/session');
|
762 |
+
$attr_model = Mage::getModel('catalog/resource_eav_attribute');
|
763 |
+
$attr_model->load($gl_object['object_id']);
|
764 |
+
if (!$attr_model->getId()) {
|
765 |
+
$warning = "Product attribute has been deleted. Cannot import translation.";
|
766 |
+
Mage::getSingleton('adminhtml/session')->addWarning($warning);
|
767 |
+
return FALSE;
|
768 |
+
}
|
769 |
+
$option_arr = array();
|
770 |
+
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', $attr_model->attribute_code);
|
771 |
+
foreach ($attribute->getSource()->getAllOptions(false) as $option) {
|
772 |
+
$option_arr[$option['value']] = $option['label'];
|
773 |
+
}
|
774 |
+
|
775 |
+
$product = Mage::getModel('catalog/product')->load();
|
776 |
+
$attribute_title = $product->getResource()->getAttribute($attr_model->attribute_code)->getStoreLabels();
|
777 |
+
$attribute_title[0] = $attr_model->frontend_label;
|
778 |
+
$stores = Mage::app()->getStores();
|
779 |
+
$attribute_arr = array();
|
780 |
+
foreach ($stores as $store_key => $object) {
|
781 |
+
$store_id = Mage::app()->getStore($store_key)->getId();
|
782 |
+
$config = Mage::getModel('eav/config');
|
783 |
+
$get_attribute = $config->getAttribute(Mage_Catalog_Model_Product::ENTITY, $attr_model->attribute_code);
|
784 |
+
$attribute_val = $get_attribute->setStoreId($store_id)->getSource()->getAllOptions();
|
785 |
+
unset($attribute_val[0]);
|
786 |
+
foreach ($attribute_val as $val) {
|
787 |
+
$attribute_arr[$val['value']][$store_id] = $val['label'];
|
788 |
+
}
|
789 |
+
|
790 |
+
foreach ($option_arr as $key => $option) {
|
791 |
+
$attribute_arr[$key][0] = $option;
|
792 |
+
}
|
793 |
+
}
|
794 |
+
|
795 |
+
if (!empty($gl_object['attributes']['frontend_label'])) {
|
796 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
797 |
+
$delete_query = "DELETE FROM eav_attribute_label WHERE attribute_id = '{$gl_object['object_id']}' AND store_id = '{$tgt_lang_store_id}'";
|
798 |
+
$db->query($delete_query);
|
799 |
+
$data = Mage::helper('catalog')->stripTags($gl_object['attributes']['frontend_label']);
|
800 |
+
$insert_query = "INSERT INTO eav_attribute_label (attribute_id, store_id, value) VALUES ('{$gl_object['object_id']}', '{$tgt_lang_store_id}', '{$data}')";
|
801 |
+
$db->query($insert_query);
|
802 |
+
}
|
803 |
+
$data = array();
|
804 |
+
$data['option'] = array('value' => $attribute_arr);
|
805 |
+
$attributes = $gl_object['attributes'];
|
806 |
+
foreach ($attributes as $key => $attribute) {
|
807 |
+
if ($key != 'frontend_label') {
|
808 |
+
if (!empty($option_arr[$key])) {
|
809 |
+
$data['option']['value'][$key][$tgt_lang_store_id] = $attribute;
|
810 |
+
}
|
811 |
+
}
|
812 |
+
}
|
813 |
+
|
814 |
+
$attr_model->addData($data);
|
815 |
+
$attr_model->save();
|
816 |
+
// Clear translation cache because attribute labels are stored in translation
|
817 |
+
//Mage::app()->cleanCache(array(Mage_Core_Model_Translate::CACHE_TAG));
|
818 |
+
$session->setAttributeData(false);
|
819 |
+
}
|
820 |
+
elseif ($gl_object['object_type'] == $this->_get_object_type_page()) {
|
821 |
+
$page_id = $gl_object['object_id'];
|
822 |
+
$source_page = Mage::getModel('cms/page')->load($page_id);
|
823 |
+
$identifier = $source_page->getIdentifier() . '-' . strtolower($translation['target_locale']);
|
824 |
+
|
825 |
+
//Check if a page exist with same identifier
|
826 |
+
$t_page = Mage::getModel('cms/page')->load($identifier, 'identifier');
|
827 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][T page]", $t_page);
|
828 |
+
if (!is_null($t_page) && is_object($t_page)) {
|
829 |
+
$t_page->delete();
|
830 |
+
}
|
831 |
+
|
832 |
+
$new_page = unserialize(serialize($source_page));
|
833 |
+
$new_page->setId(NULL);
|
834 |
+
$object_type = $this->_get_object_type_page();
|
835 |
+
$field_config_arr = Mage::helper("globallink")->getIncludeFields($object_type);
|
836 |
+
$new_page_arr = array();
|
837 |
+
$new_page_arr['identifier'] = $identifier;
|
838 |
+
|
839 |
+
if (isset($source_page['root_template']))
|
840 |
+
$new_page_arr['root_template'] = $source_page['root_template'];
|
841 |
+
|
842 |
+
foreach ($field_config_arr as $field) {
|
843 |
+
if (isset($gl_object['attributes'][$field]))
|
844 |
+
$new_page_arr[$field] = $gl_object['attributes'][$field];
|
845 |
+
}
|
846 |
+
|
847 |
+
$new_page->setData($new_page_arr);
|
848 |
+
$new_page->setStores(array($tgt_lang_store_id));
|
849 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source Page]", $source_page);
|
850 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source Page]", $new_page);
|
851 |
+
$new_page->save();
|
852 |
+
}
|
853 |
+
elseif ($gl_object['object_type'] == $this->_get_object_type_block()) {
|
854 |
+
$block_id = $gl_object['object_id'];
|
855 |
+
$source_block = Mage::getModel('cms/block')->load($block_id);
|
856 |
+
$identifier = $source_block->getIdentifier() . '-' . strtolower($translation['target_locale']);
|
857 |
+
$title = $source_block->getTitle() . ' - ' . $translation['target_locale'];
|
858 |
+
|
859 |
+
//Check if a block exist with same identifier
|
860 |
+
$t_block = Mage::getModel('cms/block')->load($identifier, 'identifier');
|
861 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][T block]", $t_block);
|
862 |
+
if (!is_null($t_block) && is_object($t_block)) {
|
863 |
+
$t_block->delete();
|
864 |
+
}
|
865 |
+
|
866 |
+
$new_block = unserialize(serialize($source_block));
|
867 |
+
$new_block->setId(NULL);
|
868 |
+
$object_type = $this->_get_object_type_block();
|
869 |
+
$field_config_arr = Mage::helper("globallink")->getIncludeFields($object_type);
|
870 |
+
$new_block_arr = array();
|
871 |
+
$new_block_arr['identifier'] = $identifier;
|
872 |
+
$new_block_arr['title'] = $title;
|
873 |
+
|
874 |
+
foreach ($field_config_arr as $field) {
|
875 |
+
if (isset($gl_object['attributes'][$field]))
|
876 |
+
$new_block_arr[$field] = $gl_object['attributes'][$field];
|
877 |
+
}
|
878 |
+
|
879 |
+
$new_block->setData($new_block_arr);
|
880 |
+
$new_block->setStores(array($tgt_lang_store_id));
|
881 |
+
|
882 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source block]", $source_block);
|
883 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source block]", $new_block);
|
884 |
+
$new_block->save();
|
885 |
+
}
|
886 |
+
elseif ($gl_object['object_type'] == $this->_get_object_type_category()) {
|
887 |
+
$category_id = $gl_object['object_id'];
|
888 |
+
$source_category = Mage::getModel('catalog/category')->load($category_id);
|
889 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source category]", $source_category);
|
890 |
+
|
891 |
+
$new_category = unserialize(serialize($source_category));
|
892 |
+
if (isset($gl_object['attributes']['name']))
|
893 |
+
$new_category->setName($gl_object['attributes']['name']);
|
894 |
+
if (isset($gl_object['attributes']['description']))
|
895 |
+
$new_category->setDescription($gl_object['attributes']['description']);
|
896 |
+
if (isset($gl_object['attributes']['meta_title']))
|
897 |
+
$new_category->setMetaTitle($gl_object['attributes']['meta_title']);
|
898 |
+
if (isset($gl_object['attributes']['meta_keywords']))
|
899 |
+
$new_category->setMetaKeywords($gl_object['attributes']['meta_keywords']);
|
900 |
+
if (isset($gl_object['attributes']['meta_description']))
|
901 |
+
$new_category->setMetaDescription($gl_object['attributes']['meta_description']);
|
902 |
+
|
903 |
+
$new_category->setStoreId($tgt_lang_store_id);
|
904 |
+
|
905 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source category]", $new_category);
|
906 |
+
$new_category->save();
|
907 |
+
unset($new_category);
|
908 |
+
}
|
909 |
+
elseif ($gl_object['object_type'] == $this->_get_object_type_email()) {
|
910 |
+
$template_id = $gl_object['object_id'];
|
911 |
+
$source_template = Mage::getModel('adminhtml/email_template')->load($template_id);
|
912 |
+
$code = $source_template->getTemplateCode() . '-' . strtolower($translation['target_locale']);
|
913 |
+
|
914 |
+
$new_template = unserialize(serialize($source_template));
|
915 |
+
|
916 |
+
//Check if a template exist with same identifier
|
917 |
+
$t_template = Mage::getModel('adminhtml/email_template')->load($code, 'template_code');
|
918 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][T template]", $t_template);
|
919 |
+
if (!is_null($t_template) && is_object($t_template)) {
|
920 |
+
$t_template->delete();
|
921 |
+
}
|
922 |
+
else {
|
923 |
+
$new_template->setAddedAt(NULL);
|
924 |
+
}
|
925 |
+
|
926 |
+
$new_template->setId(NULL);
|
927 |
+
$new_template->setTemplateCode($code);
|
928 |
+
if (isset($gl_object['attributes']['template_subject']))
|
929 |
+
$new_template->setTemplateSubject($gl_object['attributes']['template_subject']);
|
930 |
+
if (isset($gl_object['attributes']['template_text']))
|
931 |
+
$new_template->setTemplateText($gl_object['attributes']['template_text']);
|
932 |
+
|
933 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source template]", $source_template);
|
934 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source template]", $new_template);
|
935 |
+
$new_template->save();
|
936 |
+
}
|
937 |
+
elseif ($gl_object['object_type'] == $this->_get_object_type_newsletter()) {
|
938 |
+
$newsletter_id = $gl_object['object_id'];
|
939 |
+
$source_newsletter = Mage::getModel('newsletter/template')->load($newsletter_id);
|
940 |
+
$code = $source_newsletter->getTemplateCode() . '-' . strtolower($translation['target_locale']);
|
941 |
+
|
942 |
+
$new_newsletter = unserialize(serialize($source_newsletter));
|
943 |
+
|
944 |
+
//Check if a newsletter exist with same identifier
|
945 |
+
$t_newsletter = Mage::getModel('newsletter/template')->load($code, 'template_code');
|
946 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][T newsletter]", $t_newsletter);
|
947 |
+
if (!is_null($t_newsletter) && is_object($t_newsletter)) {
|
948 |
+
$t_newsletter->delete();
|
949 |
+
}
|
950 |
+
else {
|
951 |
+
$now = $lastDate = date('yyyy-mm-dd H:i:s', Mage::getModel('core/date')->timestamp(time()));
|
952 |
+
$new_newsletter->setAddedAt($now);
|
953 |
+
}
|
954 |
+
|
955 |
+
$new_newsletter->setId(NULL);
|
956 |
+
$new_newsletter->setTemplateCode($code);
|
957 |
+
if (isset($gl_object['attributes']['template_subject']))
|
958 |
+
$new_newsletter->setTemplateSubject($gl_object['attributes']['template_subject']);
|
959 |
+
if (isset($gl_object['attributes']['template_text']))
|
960 |
+
$new_newsletter->setTemplateText($gl_object['attributes']['template_text']);
|
961 |
+
|
962 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source newsletter]", $source_newsletter);
|
963 |
+
$this->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source newsletter]", $new_newsletter);
|
964 |
+
$new_newsletter->save();
|
965 |
+
}
|
966 |
+
|
967 |
+
return TRUE;
|
968 |
+
}
|
969 |
+
|
970 |
+
public function update_gl_status($row_id, $status) {
|
971 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
972 |
+
$sql = "UPDATE globallink_status SET status = '$status' WHERE globallink_job_id = '$row_id';";
|
973 |
+
$db->query($sql);
|
974 |
+
}
|
975 |
+
|
976 |
+
public function update_gl_status_changed($object_type, $object_id) {
|
977 |
+
$last_modified = time();
|
978 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
979 |
+
$sql = "UPDATE globallink_status SET last_modified = '$last_modified', changed = 1 WHERE object_type = '$object_type' AND object_id = '$object_id';";
|
980 |
+
$db->query($sql);
|
981 |
+
}
|
982 |
+
|
983 |
+
public function check_gl_translation_source($object_type, $object_id) {
|
984 |
+
if ($object_type == $this->_get_object_type_product() || $object_type == $this->_get_object_type_page() ||
|
985 |
+
$object_type == $this->_get_object_type_block() || $object_type == $this->_get_object_type_category()) {
|
986 |
+
$source_product = Mage::getModel($object_type)->load($object_id);
|
987 |
+
if ($source_product->getId()) {
|
988 |
+
return TRUE;
|
989 |
+
}
|
990 |
+
}
|
991 |
+
elseif ($object_type == $this->_get_object_type_email() || $object_type == $this->_get_object_type_newsletter()) {
|
992 |
+
$source_template = Mage::getModel($object_type)->load($object_id);
|
993 |
+
if ($source_template->getTemplateId()) {
|
994 |
+
return TRUE;
|
995 |
+
}
|
996 |
+
}
|
997 |
+
elseif ($object_type == $this->_get_object_type_product_attributes()) {
|
998 |
+
$source_attribute = Mage::getModel('catalog/resource_eav_attribute')->load($object_id);
|
999 |
+
if ($source_attribute->getId()) {
|
1000 |
+
return TRUE;
|
1001 |
+
}
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
return FALSE;
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
public function get_gl_object_id_status($store_id, $object_id, $object_type) {
|
1008 |
+
$store_id_what = "gl_locale_code";
|
1009 |
+
$store_id_where = "WHERE store_id = $store_id";
|
1010 |
+
$store_id_results = $this->get_gl_locale_codes($store_id_what, $store_id_where);
|
1011 |
+
$store_id_local = $store_id_results[0];
|
1012 |
+
|
1013 |
+
$mapped_locale_where = "WHERE store_id <> $store_id AND store_id IS NOT NULL";
|
1014 |
+
$mapped_locale_results = $this->get_gl_locale_codes($store_id_what, $mapped_locale_where);
|
1015 |
+
|
1016 |
+
$what = "COUNT(*)";
|
1017 |
+
$where = "WHERE object_type = '$object_type' AND object_id = '$object_id'
|
1018 |
+
AND gl_source_locale = '$store_id_local' AND gl_target_locale IN ('" . implode("','", $mapped_locale_results) . "')";
|
1019 |
+
$locale_count = $this->get_status_objects($what, $where, FALSE);
|
1020 |
+
|
1021 |
+
if ($locale_count[0]['COUNT(*)'] == count($mapped_locale_results)) {
|
1022 |
+
$where = "WHERE object_type = '$object_type' AND object_id = '$object_id'
|
1023 |
+
AND gl_source_locale = '$store_id_local' AND changed = 1";
|
1024 |
+
$changed_count = $this->get_status_objects($what, $where, FALSE);
|
1025 |
+
|
1026 |
+
if ($changed_count[0]['COUNT(*)'] == 0) {
|
1027 |
+
return TRUE;
|
1028 |
+
}
|
1029 |
+
}
|
1030 |
+
|
1031 |
+
return FALSE;
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
public function insert_cron_schedule($status) {
|
1035 |
+
$timecreated = strftime("%Y-%m-%d %H:%M:%S", mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")));
|
1036 |
+
$timescheduled = strftime("%Y-%m-%d %H:%M:%S", mktime(date("H"), date("i") + 5, date("s"), date("m"), date("d"), date("Y")));
|
1037 |
+
$jobCode = $this->get_cron_job_code();
|
1038 |
+
try {
|
1039 |
+
$schedule = Mage::getModel('cron/schedule');
|
1040 |
+
$schedule->setJobCode($jobCode)
|
1041 |
+
->setCreatedAt($timecreated)
|
1042 |
+
->setScheduledAt($timescheduled)
|
1043 |
+
->setStatus($status)
|
1044 |
+
->save();
|
1045 |
+
}
|
1046 |
+
catch (Exception $e) {
|
1047 |
+
throw new Exception(Mage::helper('cron')->__('Unable to save Cron expression'));
|
1048 |
+
}
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
public function save_settings($settings_arr) {
|
1052 |
+
try {
|
1053 |
+
foreach ($settings_arr as $key => $settings) {
|
1054 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1055 |
+
$sql = "UPDATE globallink_settings SET gl_setting_info = '" . serialize($settings) . "'WHERE gl_setting_name = '" . $key . "';";
|
1056 |
+
$db->query($sql);
|
1057 |
+
}
|
1058 |
+
}
|
1059 |
+
catch (Exception $e) {
|
1060 |
+
throw new Exception(Mage::helper('cron')->__('Unable to save settings'));
|
1061 |
+
}
|
1062 |
+
}
|
1063 |
+
|
1064 |
+
function get_gl_settings() {
|
1065 |
+
$gl_setting = array();
|
1066 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1067 |
+
$sql = "SELECT * FROM globallink_settings;";
|
1068 |
+
$results = $db->query($sql);
|
1069 |
+
if ($results) {
|
1070 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
1071 |
+
$gl_setting[$row['gl_setting_name']] = unserialize($row['gl_setting_info']);
|
1072 |
+
}
|
1073 |
+
}
|
1074 |
+
return $gl_setting;
|
1075 |
+
}
|
1076 |
+
|
1077 |
+
public function setting_enabled($setting) {
|
1078 |
+
$settings_arr = $this->get_gl_settings();
|
1079 |
+
return $settings_arr[$setting];
|
1080 |
+
}
|
1081 |
+
|
1082 |
+
public function update_gl_submission_ticket_status($submission_id, $status) {
|
1083 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1084 |
+
$sql = "UPDATE globallink_status SET status = '$status' WHERE submission_id = '$submission_id';";
|
1085 |
+
$db->query($sql);
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
public function get_submission_status() {
|
1089 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1090 |
+
$sql = "SELECT DISTINCT submission_id FROM globallink_status WHERE status in ('" . $this->_get_submission_status_sent() . "',
|
1091 |
+
'" . $this->_get_submission_status_error() . "','" . $this->_get_submission_status_ready() . "');";
|
1092 |
+
$results = $db->query($sql);
|
1093 |
+
if ($results) {
|
1094 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
1095 |
+
if ($row['submission_id']) {
|
1096 |
+
try {
|
1097 |
+
$status = get_status($row['submission_id']);
|
1098 |
+
if (!$status || $status == 'CANCELLED') {
|
1099 |
+
$this->update_gl_submission_ticket_status($row['submission_id'], $this->_get_submission_status_cancelled());
|
1100 |
+
}
|
1101 |
+
}
|
1102 |
+
catch (SoapFault $sf) {
|
1103 |
+
$this->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ": Globallink WebService Error submission has been deleted ", $sf->getMessage());
|
1104 |
+
$this->update_gl_submission_ticket_status($row['submission_id'], $this->_get_submission_status_cancelled());
|
1105 |
+
}
|
1106 |
+
catch (Exception $ex) {
|
1107 |
+
$this->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ": Globallink Generic Error submission has been deleted", $ex->getMessage());
|
1108 |
+
$this->update_gl_submission_ticket_status($row['submission_id'], $this->_get_submission_status_cancelled());
|
1109 |
+
}
|
1110 |
+
}
|
1111 |
+
}
|
1112 |
+
}
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
public function clear_cancelled_submissions() {
|
1116 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1117 |
+
$sql = "SELECT DISTINCT submission_id FROM globallink_status WHERE status = '" . $this->_get_submission_status_cancelled() . "';";
|
1118 |
+
$results = $db->query($sql);
|
1119 |
+
if ($results) {
|
1120 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
1121 |
+
if ($row['submission_id']) {
|
1122 |
+
$this->update_gl_submission_ticket_status($row['submission_id'], '');
|
1123 |
+
}
|
1124 |
+
}
|
1125 |
+
}
|
1126 |
+
}
|
1127 |
+
}
|
app/code/community/Transperfect/Globallink/Model/Glfield.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class Transperfect_Globallink_Model_Glfield extends Mage_Core_Model_Abstract {
|
17 |
+
|
18 |
+
protected function _construct() {
|
19 |
+
parent::_construct();
|
20 |
+
$this->_init('globallink/glfield');
|
21 |
+
}
|
22 |
+
|
23 |
+
}
|
24 |
+
|
app/code/community/Transperfect/Globallink/Model/Glstatus.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Model_Glstatus extends Mage_Core_Model_Abstract {
|
16 |
+
|
17 |
+
protected function _construct() {
|
18 |
+
parent::_construct();
|
19 |
+
$this->_init('globallink/glstatus');
|
20 |
+
}
|
21 |
+
|
22 |
+
// public function cron_update() {
|
23 |
+
// Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ , "GlobalLink Cron Update Start");
|
24 |
+
// Mage::helper("globallink")->cron_update_all_completed_records();
|
25 |
+
// Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ , "GlobalLink Cron Update End");
|
26 |
+
// }
|
27 |
+
|
28 |
+
}
|
29 |
+
|
app/code/community/Transperfect/Globallink/Model/Gltranslatecsv.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
/*
|
17 |
+
* To change this template, choose Tools | Templates
|
18 |
+
* and open the template in the editor.
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Transperfect_Globallink_Model_Gltranslatecsv extends Mage_Core_Model_Translate {
|
22 |
+
|
23 |
+
public function _construct() {
|
24 |
+
parent::_construct();
|
25 |
+
$this->_init('globallink/gltranslatecsv');
|
26 |
+
}
|
27 |
+
|
28 |
+
public function readCSVFile($locale = "en_US") {
|
29 |
+
$arr = array();
|
30 |
+
$fileName = 'Mage_Weee';
|
31 |
+
$file = $this->_getAdvancedModuleFilePath($locale, $fileName);
|
32 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $file);
|
33 |
+
$data = $this->_getFileData($file);
|
34 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $data);
|
35 |
+
$parser = new Varien_File_Csv();
|
36 |
+
$parser->setDelimiter(self::CSV_SEPARATOR);
|
37 |
+
$new_data = array();
|
38 |
+
foreach ($data as $key => $value) {
|
39 |
+
$new_data[] = array($key, $value . '11112222');
|
40 |
+
}
|
41 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $new_data);
|
42 |
+
$parser->saveData($file, $new_data);
|
43 |
+
return $arr;
|
44 |
+
}
|
45 |
+
|
46 |
+
protected function _getAdvancedModuleFilePath($locale, $fileName) {
|
47 |
+
$file = Mage::getBaseDir('locale');
|
48 |
+
$file.= DS . $locale . DS . $fileName . '.csv';
|
49 |
+
return $file;
|
50 |
+
}
|
51 |
+
|
52 |
+
}
|
53 |
+
|
54 |
+
?>
|
app/code/community/Transperfect/Globallink/Model/Mysql4/Glfield.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class Transperfect_Globallink_Model_Mysql4_Glfield extends Mage_Core_Model_Mysql4_Abstract {
|
17 |
+
|
18 |
+
protected function _construct() {
|
19 |
+
$this->_init('globallink/glfield', 'globallink_field_id');
|
20 |
+
}
|
21 |
+
|
22 |
+
}
|
23 |
+
|
app/code/community/Transperfect/Globallink/Model/Mysql4/Glfield/Collection.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class Transperfect_Globallink_Model_Mysql4_Glfield_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
17 |
+
|
18 |
+
public function _construct() {
|
19 |
+
parent::_construct();
|
20 |
+
$this->_init('globallink/glfield');
|
21 |
+
}
|
22 |
+
|
23 |
+
}
|
app/code/community/Transperfect/Globallink/Model/Mysql4/Glstatus.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class Transperfect_Globallink_Model_Mysql4_Glstatus extends Mage_Core_Model_Mysql4_Abstract {
|
17 |
+
|
18 |
+
protected function _construct() {
|
19 |
+
$this->_init('globallink/glstatus', 'globallink_job_id');
|
20 |
+
}
|
21 |
+
|
22 |
+
}
|
23 |
+
|
app/code/community/Transperfect/Globallink/Model/Mysql4/Glstatus/Collection.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
class Transperfect_Globallink_Model_Mysql4_Glstatus_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
16 |
+
|
17 |
+
public function _construct() {
|
18 |
+
parent::_construct();
|
19 |
+
$this->_init('globallink/glstatus');
|
20 |
+
}
|
21 |
+
|
22 |
+
}
|
app/code/community/Transperfect/Globallink/Model/Observer.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
include_once 'app/Mage.php';
|
16 |
+
Mage::app('admin')->setUseSessionInUrl(false);
|
17 |
+
$gl_ws_path = Mage::getBaseDir('app') . "/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/";
|
18 |
+
require_once $gl_ws_path . 'GlobalLink.php';
|
19 |
+
require_once $gl_ws_path . 'gl_ws_receive_translations.php';
|
20 |
+
|
21 |
+
class Transperfect_Globallink_Model_Observer {
|
22 |
+
|
23 |
+
public function __construct() {
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
public function product_update($observer) {
|
28 |
+
$product = $observer->getEvent()->getProduct();
|
29 |
+
$orig_data = $product->getOrigData();
|
30 |
+
$new_data = $product->getData();
|
31 |
+
$attr_id = $orig_data['attribute_set_id'];
|
32 |
+
$attr_arr = Mage::helper("globallink")->get_attribute_set_code($attr_id);
|
33 |
+
foreach ($attr_arr as $attr) {
|
34 |
+
$orig_attr = $orig_data[$attr];
|
35 |
+
$new_attr = $new_data[$attr];
|
36 |
+
if ($new_attr != $orig_attr) {
|
37 |
+
$object_type = Mage::helper("globallink")->_get_object_type_product();
|
38 |
+
$object_id = $new_data['entity_id'];
|
39 |
+
Mage::helper("globallink")->update_gl_status_changed($object_type, $object_id);
|
40 |
+
return $this;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
return $this;
|
45 |
+
}
|
46 |
+
|
47 |
+
public function category_update($observer) {
|
48 |
+
$category = $observer->getEvent()->getCategory();
|
49 |
+
$orig_data = $category->getOrigData();
|
50 |
+
$new_data = $category->getData();
|
51 |
+
$object_type = Mage::helper("globallink")->_get_object_type_category();
|
52 |
+
$attr_arr = Mage::helper("globallink")->get_object_attributes($object_type);
|
53 |
+
foreach ($attr_arr as $attr) {
|
54 |
+
$orig_attr = $orig_data[$attr];
|
55 |
+
$new_attr = $new_data[$attr];
|
56 |
+
if ($new_attr != $orig_attr) {
|
57 |
+
$object_id = $new_data['entity_id'];
|
58 |
+
Mage::helper("globallink")->update_gl_status_changed($object_type, $object_id);
|
59 |
+
return $this;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
public function run_cron() {
|
67 |
+
$gl_cron_enabled = Mage::helper("globallink")->setting_enabled('gl_cron');
|
68 |
+
if ($gl_cron_enabled == 1) {
|
69 |
+
update_translated_contents_automatically('config.xml');
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
public function update_translated_contents_automatically($cron_type) {
|
74 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]Cron started from ", $cron_type);
|
75 |
+
$end_count = 0;
|
76 |
+
$start_count = 0;
|
77 |
+
try {
|
78 |
+
$translation = array();
|
79 |
+
$gl_arr = Mage::helper("globallink")->gl_get_all_completed_targets();
|
80 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Completed Targets]", $gl_arr);
|
81 |
+
foreach ($gl_arr as $globallink) {
|
82 |
+
$row_id = $globallink->glRowId;
|
83 |
+
$target_ticket = $globallink->targetTicket;
|
84 |
+
$what = 'status';
|
85 |
+
$where = 'WHERE globallink_job_id = ' . $row_id;
|
86 |
+
$result_arr = Mage::helper("globallink")->get_status_objects($what, $where, FALSE);
|
87 |
+
if ($result_arr[0]['status'] == Mage::helper("globallink")->_get_submission_status_ready()) {
|
88 |
+
try {
|
89 |
+
$start_count++;
|
90 |
+
$translated_content = downloadTargetResource($target_ticket);
|
91 |
+
$translation = array('row_id' => $row_id, 'target_locale' => $globallink->targetLocale,
|
92 |
+
'target_ticket' => $target_ticket, 'translated_content' => $translated_content);
|
93 |
+
Mage::helper("globallink")->update_translated_record_in_magento($translation);
|
94 |
+
Mage::helper("globallink")->update_gl_status($row_id, 'Translation Complete');
|
95 |
+
sendDownloadConfirmation($target_ticket);
|
96 |
+
$end_count++;
|
97 |
+
}
|
98 |
+
catch (SoapFault $sf) {
|
99 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ": Globallink WebService Error for [$globallink->glRowId][$globallink->objectType][$globallink->objectName]", $sf->getMessage());
|
100 |
+
Mage::helper("globallink")->update_gl_status($row_id, Mage::helper("globallink")->_get_submission_status_error());
|
101 |
+
Mage::helper("globallink")->insert_cron_schedule(Mage::helper("globallink")->get_cron_status_error());
|
102 |
+
}
|
103 |
+
catch (Exception $ex) {
|
104 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ": Globallink Generic Error for [$globallink->glRowId][$globallink->objectType][$globallink->objectName]", $ex->getMessage());
|
105 |
+
Mage::helper("globallink")->update_gl_status($row_id, Mage::helper("globallink")->_get_submission_status_error());
|
106 |
+
Mage::helper("globallink")->insert_cron_schedule(Mage::helper("globallink")->get_cron_status_error());
|
107 |
+
}
|
108 |
+
}
|
109 |
+
else {
|
110 |
+
$what = 'object_name';
|
111 |
+
$where = 'WHERE globallink_job_id = ' . $row_id;
|
112 |
+
$result_arr = Mage::helper("globallink")->get_status_objects($what, $where, FALSE);
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
if ($end_count > 0) {
|
117 |
+
Mage::helper("globallink")->insert_cron_schedule(Mage::helper("globallink")->get_cron_status_success());
|
118 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "$end_count records successfully retrieved and imported");
|
119 |
+
}
|
120 |
+
}
|
121 |
+
catch (SoapFault $sf) {
|
122 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
123 |
+
}
|
124 |
+
catch (Exception $ex) {
|
125 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
app/code/community/Transperfect/Globallink/Model/Resource/Mysql4/Setup.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class Transperfect_Globallink_Model_Resource_Mysql4_Setup extends Mage_Core_Model_Resource_Setup {
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
+
?>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/AdaptorController.php
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'gl_ws/GlobalLink.php';
|
17 |
+
require_once 'gl_ws/gl_ws_send_translations.php';
|
18 |
+
|
19 |
+
class Transperfect_Globallink_Adminhtml_AdaptorController extends Mage_Adminhtml_Controller_Action {
|
20 |
+
|
21 |
+
public function postAction() {
|
22 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Starting Product Upload.");
|
23 |
+
$success = TRUE;
|
24 |
+
$gl_submission_arr = array();
|
25 |
+
$gl_product = array();
|
26 |
+
|
27 |
+
try {
|
28 |
+
$post = $this->getRequest()->getPost();
|
29 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
30 |
+
|
31 |
+
$url = $post['current_url'];
|
32 |
+
$pos = strpos($url, 'active_tab');
|
33 |
+
if ($pos) {
|
34 |
+
$end = $pos;
|
35 |
+
for ($index = 0; $index < 2; $index++) {
|
36 |
+
$end = strpos($url, '/', $end + 1);
|
37 |
+
}
|
38 |
+
$sub = substr($url, $pos, intval($end - $pos));
|
39 |
+
if (isset($sub) && $sub != '') {
|
40 |
+
$url = str_replace($sub, 'active_tab/my_global_link_tab', $url);
|
41 |
+
$this->_redirectUrl($url);
|
42 |
+
}
|
43 |
+
else {
|
44 |
+
$this->_redirectUrl($post['current_url']);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
else {
|
48 |
+
$url = $url . 'active_tab/my_global_link_tab/';
|
49 |
+
$this->_redirectUrl($url);
|
50 |
+
}
|
51 |
+
|
52 |
+
$gl_submission_arr['gl_submission_name'] = $post['gl_submission_name'];
|
53 |
+
$gl_submission_arr['gl_due_date'] = $post['gl_due_date'];
|
54 |
+
$gl_submission_arr['gl_priority'] = $post['gl_priority'];
|
55 |
+
$gl_submission_arr['gl_source_locale'] = $post['gl_source_locale'];
|
56 |
+
$gl_submission_arr['gl_target_locales'] = $post['gl_target_locales'];
|
57 |
+
$gl_submission_arr['gl_project'] = $post['gl_project'];
|
58 |
+
|
59 |
+
$product_id = $post['product_id'];
|
60 |
+
$selected_attribute_ids = $post['gl_product_attribute_ids'];
|
61 |
+
|
62 |
+
$gl_product['object_id'] = $product_id;
|
63 |
+
$object_type = Mage::helper("globallink")->_get_object_type_product();
|
64 |
+
$gl_product['object_type'] = $object_type;
|
65 |
+
|
66 |
+
$target_locales = $gl_submission_arr['gl_target_locales'];
|
67 |
+
foreach ($target_locales as $target_locale) {
|
68 |
+
if (!$this->check_existing_submission($object_type, $product_id, $gl_submission_arr['gl_source_locale'], $target_locale)) {
|
69 |
+
Mage::getSingleton('adminhtml/session')->addError('The selected record has already been sent out for translation.');
|
70 |
+
return $this;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
$mapped_locale_arr = Mage::helper("globallink")->get_mapped_locales();
|
75 |
+
$source_store_id = $mapped_locale_arr[$gl_submission_arr['gl_source_locale']]['store_id'];
|
76 |
+
$model = Mage::getModel($object_type); //getting product model
|
77 |
+
$product = $model->setStoreId($source_store_id)->load($product_id);
|
78 |
+
|
79 |
+
$gl_attr_arr = array();
|
80 |
+
|
81 |
+
$attributes = $product->getAttributes();
|
82 |
+
foreach ($attributes as $attribute) {
|
83 |
+
if ($attribute->getIsVisible() && !$attribute->getIsGlobal()) {
|
84 |
+
if ($attribute->getFrontendInput() == 'text' || $attribute->getFrontendInput() == 'textarea') {
|
85 |
+
$attr_id = $attribute->getId();
|
86 |
+
if (in_array($attr_id, $selected_attribute_ids)) {
|
87 |
+
$gl_attr_arr[$attribute->getAttributeCode()] = $attribute->getFrontend()->getValue($product);
|
88 |
+
}
|
89 |
+
}
|
90 |
+
}
|
91 |
+
}
|
92 |
+
$gl_product['attributes'] = $gl_attr_arr;
|
93 |
+
|
94 |
+
$source_xml = Mage::helper("globallink")->create_source_xml($gl_product);
|
95 |
+
$source_name = Mage::helper("globallink")->get_formatted_file_name($product->getName());
|
96 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source File Name]", $source_name);
|
97 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source XML]", $source_xml);
|
98 |
+
|
99 |
+
$time_arr = explode('/', $gl_submission_arr['gl_due_date']);
|
100 |
+
$due_date = mktime(0, 0, 0, $time_arr[0], $time_arr[1], $time_arr[2]) * 1000;
|
101 |
+
|
102 |
+
$globalLink_arr = array();
|
103 |
+
|
104 |
+
foreach ($target_locales as $target_locale) {
|
105 |
+
$globalLink = new GlobalLink;
|
106 |
+
$globalLink->objectId = $product_id;
|
107 |
+
$globalLink->objectType = $object_type;
|
108 |
+
$globalLink->objectName = $product->getName();
|
109 |
+
$globalLink->sourceLocale = $gl_submission_arr['gl_source_locale'];
|
110 |
+
$globalLink->targetLocale = array($target_locale);
|
111 |
+
$globalLink->sourceXML = $source_xml;
|
112 |
+
$globalLink->sourceFileName = $source_name;
|
113 |
+
$globalLink->submissionName = $gl_submission_arr['gl_submission_name'];
|
114 |
+
$globalLink->dueDate = $due_date;
|
115 |
+
$globalLink->priority = $gl_submission_arr['gl_priority'];
|
116 |
+
|
117 |
+
array_push($globalLink_arr, $globalLink);
|
118 |
+
}
|
119 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Preparing to send to GlobalLink Server]", $globalLink_arr);
|
120 |
+
|
121 |
+
sendDocumentsForTranslationToPD($globalLink_arr, $gl_submission_arr['gl_project']);
|
122 |
+
$status = "Sent for Translations";
|
123 |
+
Mage::helper("globallink")->insert_gl_status($globalLink_arr, $status);
|
124 |
+
}
|
125 |
+
catch (SoapFault $sf) {
|
126 |
+
$success = FALSE;
|
127 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
128 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink WebService Error - ' . $sf->getMessage());
|
129 |
+
return $this;
|
130 |
+
}
|
131 |
+
catch (Exception $ex) {
|
132 |
+
$success = FALSE;
|
133 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
134 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
135 |
+
return $this;
|
136 |
+
}
|
137 |
+
|
138 |
+
if ($success) {
|
139 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Successfully sent to GlobalLink Server");
|
140 |
+
$message = $this->__('Product has been successfully sent for translation.');
|
141 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
142 |
+
}
|
143 |
+
|
144 |
+
$this->_redirect('adminhtml/catalog_product');
|
145 |
+
return $this;
|
146 |
+
}
|
147 |
+
|
148 |
+
public function check_existing_submission($object_type, $object_id, $source_locale, $target_locale) {
|
149 |
+
$where = " WHERE object_type = '" . $object_type . "' AND object_id = " . $object_id
|
150 |
+
. " AND gl_source_locale = '" . $source_locale . "' AND gl_target_locale = '"
|
151 |
+
. $target_locale . "' AND status = 'Sent for Translations' ";
|
152 |
+
|
153 |
+
$rows = Mage::helper("globallink")->get_status_objects("*", $where, FALSE);
|
154 |
+
if (count($rows) > 0) {
|
155 |
+
return FALSE;
|
156 |
+
}
|
157 |
+
|
158 |
+
return TRUE;
|
159 |
+
}
|
160 |
+
|
161 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/AttributesetsController.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class Transperfect_Globallink_Adminhtml_AttributesetsController extends Mage_Adminhtml_Controller_Action {
|
17 |
+
|
18 |
+
public function indexAction() {
|
19 |
+
$this->loadLayout();
|
20 |
+
$this->_addContent($this->getLayout()->createBlock('adminhtml/template')->setTemplate('globallink/adminhtml/attributesets.phtml'));
|
21 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
22 |
+
$this->renderLayout();
|
23 |
+
}
|
24 |
+
|
25 |
+
public function loadAction() {
|
26 |
+
$params = $this->getRequest()->getParams();
|
27 |
+
$attribute_set_dropdown = $params['attribute-set-dropdown'];
|
28 |
+
$this->_redirect('*/*', array('selected_attributeset_value' => $attribute_set_dropdown));
|
29 |
+
}
|
30 |
+
|
31 |
+
public function postAction() {
|
32 |
+
$success = TRUE;
|
33 |
+
try {
|
34 |
+
$post = $this->getRequest()->getPost();
|
35 |
+
$attribute_set_id = $post['attribute_set_id'];
|
36 |
+
$attributes = Mage::getModel('catalog/product_attribute_api')->items($attribute_set_id);
|
37 |
+
$attr_arr = array();
|
38 |
+
foreach ($attributes as $attr) {
|
39 |
+
$attribute = Mage::getModel('eav/entity_attribute')->load($attr['attribute_id']);
|
40 |
+
if ($attribute->getIsVisible() && !$attribute->getIsGlobal()) {
|
41 |
+
if ($attribute->getFrontendInput() == 'text' || $attribute->getFrontendInput() == 'textarea') {
|
42 |
+
$attr_arr[$attr['attribute_id']] = array('attribute_set_id' => $attribute_set_id, 'attribute_id' => $attr['attribute_id'],
|
43 |
+
'attribute_code' => $attribute->getAttributeCode(), 'attribute_type' => $attribute->getFrontendInput(), 'attribute_name' => $attribute->getFrontendLabel());
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
$attribute_ids = $post['attribute_ids'];
|
48 |
+
$insert_arr = array();
|
49 |
+
foreach ($attribute_ids as $attr_id) {
|
50 |
+
// Select All Checkbox is set to on if checked
|
51 |
+
if ($attr_id == 'on') {
|
52 |
+
continue;
|
53 |
+
}
|
54 |
+
$insert_arr[$attr_id]['attribute'] = $attr_arr[$attr_id];
|
55 |
+
$insert_arr[$attr_id]['translatable'] = 1;
|
56 |
+
}
|
57 |
+
foreach ($attr_arr as $_att_id => $_attribute) {
|
58 |
+
if (!isset($insert_arr[$_att_id]['attribute'])) {
|
59 |
+
$insert_arr[$_att_id]['attribute'] = $_attribute;
|
60 |
+
$insert_arr[$_att_id]['translatable'] = 0;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
Mage::helper("globallink")->delete_and_update_attribute_set_config($attribute_set_id, $insert_arr);
|
65 |
+
}
|
66 |
+
catch (Exception $ex) {
|
67 |
+
$success = FALSE;
|
68 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
69 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
70 |
+
}
|
71 |
+
|
72 |
+
if ($success) {
|
73 |
+
Mage::helper("globallink")->gl_debug("AdaptorController-postAction", "Successfully sent to Global Link Server");
|
74 |
+
$message = $this->__('Attribute settings saved successfully.');
|
75 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
76 |
+
}
|
77 |
+
|
78 |
+
$this->_redirect('*/*', array('_query' => array('selected_attributeset_value' => $attribute_set_id)));
|
79 |
+
}
|
80 |
+
|
81 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/ConfigurationController.php
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'gl_ws/gl_ws_common.php';
|
17 |
+
|
18 |
+
class Transperfect_Globallink_Adminhtml_ConfigurationController extends Mage_Adminhtml_Controller_Action {
|
19 |
+
|
20 |
+
public function indexAction() {
|
21 |
+
$this->loadLayout();
|
22 |
+
$this->_addContent($this->getLayout()->createBlock('adminhtml/template')->setTemplate('globallink/adminhtml/configuration.phtml'));
|
23 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
24 |
+
$this->renderLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
public function postAction() {
|
28 |
+
$success = TRUE;
|
29 |
+
try {
|
30 |
+
$post = $this->getRequest()->getPost();
|
31 |
+
$globallink_user_id = isset($post['globallink_user_id']) ? $post['globallink_user_id'] : 0;
|
32 |
+
$globallink_project_id = isset($post['globallink_project_id']) ? $post['globallink_project_id'] : 0;
|
33 |
+
$globallink_url = isset($post['globallink_url']) ? $post['globallink_url'] : "";
|
34 |
+
$project_short_code = isset($post['project_short_code']) ? $post['project_short_code'] : "";
|
35 |
+
$classifier = isset($post['classifier']) ? $post['classifier'] : "";
|
36 |
+
$mime_type = isset($post['mime_type']) ? $post['mime_type'] : "";
|
37 |
+
$files_per_submission = isset($post['files_per_submission']) ? $post['files_per_submission'] : 100;
|
38 |
+
$max_target_count = isset($post['max_target_count']) ? $post['max_target_count'] : 10;
|
39 |
+
$globallink_user_name = isset($post['globallink_user_name']) ? $post['globallink_user_name'] : "";
|
40 |
+
$globallink_user_password = isset($post['globallink_user_password']) ? $post['globallink_user_password'] : "";
|
41 |
+
|
42 |
+
$message = test_GlobalLink_connectivity($globallink_user_name, $globallink_user_password, $globallink_url, $project_short_code, $classifier);
|
43 |
+
|
44 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
45 |
+
|
46 |
+
if ($globallink_project_id == 0) {
|
47 |
+
$sql = "INSERT INTO globallink_projects (globallink_url, project_short_code, classifier, mime_type, files_per_submission, max_target_count)
|
48 |
+
VALUES ( '" . $globallink_url . "', '" . $project_short_code . "', '" . $classifier . "', '" . $mime_type . "', " . $files_per_submission . ", " . $max_target_count . ");";
|
49 |
+
$db->query($sql);
|
50 |
+
}
|
51 |
+
else {
|
52 |
+
$sql = "UPDATE globallink_projects SET globallink_url = '" . $globallink_url . "',
|
53 |
+
project_short_code = '" . $project_short_code . "', classifier = '" . $classifier . "',
|
54 |
+
mime_type = '" . $mime_type . "', files_per_submission = " . $files_per_submission . ", max_target_count = " . $max_target_count . "
|
55 |
+
WHERE globallink_project_id = " . $globallink_project_id . ";";
|
56 |
+
$db->query($sql);
|
57 |
+
}
|
58 |
+
|
59 |
+
if ($globallink_user_id == 0) {
|
60 |
+
$sql = "INSERT INTO globallink_users (globallink_user_name, globallink_user_password) VALUES ( '" . $globallink_user_name . "', '" . Mage::helper("globallink")->encrypt_gl_pw($globallink_user_name, $globallink_user_password) . "');";
|
61 |
+
$db->query($sql);
|
62 |
+
}
|
63 |
+
else {
|
64 |
+
$sql = "UPDATE globallink_users SET globallink_user_name = '" . $globallink_user_name . "',
|
65 |
+
globallink_user_password = '" . Mage::helper("globallink")->encrypt_gl_pw($globallink_user_name, $globallink_user_password) .
|
66 |
+
"' WHERE globallink_user_id = " . $globallink_user_id . ";";
|
67 |
+
$db->query($sql);
|
68 |
+
}
|
69 |
+
}
|
70 |
+
catch (SoapFault $sf) {
|
71 |
+
$success = FALSE;
|
72 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
73 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink WebService Error - ' . $sf->getMessage());
|
74 |
+
}
|
75 |
+
catch (Exception $ex) {
|
76 |
+
$success = FALSE;
|
77 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
78 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
79 |
+
}
|
80 |
+
|
81 |
+
if ($success) {
|
82 |
+
if (!isset($message) || $message == '') {
|
83 |
+
$message = $this->__('Settings saved successfully.');
|
84 |
+
}
|
85 |
+
if (strstr($message, 'Fail') != FALSE) {
|
86 |
+
Mage::getSingleton('adminhtml/session')->addError($message);
|
87 |
+
}
|
88 |
+
else {
|
89 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
Mage::getSingleton('adminhtml/session')->unsetData('gl_projects');
|
94 |
+
$this->_redirect('*/*');
|
95 |
+
}
|
96 |
+
|
97 |
+
public function settingsAction() {
|
98 |
+
$success = TRUE;
|
99 |
+
try {
|
100 |
+
$post = $this->getRequest()->getPost();
|
101 |
+
$settings_arr = array();
|
102 |
+
$settings_arr['gl_logging'] = isset($post['globallink_adaptor_logging']) ? $post['globallink_adaptor_logging'] : 0;
|
103 |
+
$settings_arr['gl_cron'] = isset($post['globallink_adaptor_cron']) ? $post['globallink_adaptor_cron'] : 0;
|
104 |
+
|
105 |
+
Mage::helper("globallink")->save_settings($settings_arr);
|
106 |
+
}
|
107 |
+
catch (Exception $e) {
|
108 |
+
$success = FALSE;
|
109 |
+
Mage::helper("globallink")->gl_debug($e->getFile() . ' - Line ' . $e->getLine() . ': Globallink Generic Error = ', $e->getMessage());
|
110 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $e->getMessage());
|
111 |
+
}
|
112 |
+
|
113 |
+
if ($success) {
|
114 |
+
$message = $this->__('Settings saved successfully.');
|
115 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
116 |
+
}
|
117 |
+
|
118 |
+
$this->_redirect('*/*');
|
119 |
+
}
|
120 |
+
|
121 |
+
public function downloadAction() {
|
122 |
+
$file = Mage::getBaseDir('base') . '\var\log\globallink.log';
|
123 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Downloading GlobalLink Log]", $file);
|
124 |
+
if (file_exists($file)) {
|
125 |
+
header('Content-Description: File Transfer');
|
126 |
+
header('Content-Type: application/octet-stream');
|
127 |
+
header('Content-Disposition: attachment; filename=' . basename($file));
|
128 |
+
header('Content-Transfer-Encoding: binary');
|
129 |
+
header('Expires: 0');
|
130 |
+
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
131 |
+
header('Pragma: public');
|
132 |
+
ob_clean();
|
133 |
+
flush();
|
134 |
+
readfile($file);
|
135 |
+
}
|
136 |
+
$this->_redirect('*/*');
|
137 |
+
}
|
138 |
+
|
139 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlactivesubmissionsController.php
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'gl_ws/GlobalLink.php';
|
17 |
+
require_once 'gl_ws/gl_ws_send_translations.php';
|
18 |
+
|
19 |
+
class Transperfect_Globallink_Adminhtml_GlactivesubmissionsController extends Mage_Adminhtml_Controller_Action {
|
20 |
+
|
21 |
+
public function indexAction() {
|
22 |
+
$this->loadLayout();
|
23 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
24 |
+
$this->renderLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
public function selectAction() {
|
28 |
+
sleep(6);
|
29 |
+
$success = TRUE;
|
30 |
+
try {
|
31 |
+
$post = $this->getRequest()->getPost();
|
32 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
33 |
+
|
34 |
+
$selected_row_ids = $post['gl_status_ids'];
|
35 |
+
if ($selected_row_ids[0] == 'on') {
|
36 |
+
unset($selected_row_ids[0]);
|
37 |
+
}
|
38 |
+
$row_ids = implode(",", $selected_row_ids);
|
39 |
+
|
40 |
+
$gl_sub_arr = Mage::helper("globallink")->get_status_objects("*", "WHERE globallink_job_id IN ( $row_ids)", FALSE);
|
41 |
+
$globallink_arr = array();
|
42 |
+
|
43 |
+
foreach ($gl_sub_arr as $row) {
|
44 |
+
$globallink = new GlobalLink;
|
45 |
+
$globallink->glRowId = $row['globallink_job_id'];
|
46 |
+
$globallink->submissionTicket = $row['submission_id'];
|
47 |
+
$globallink->documentTicket = $row['document_id'];
|
48 |
+
array_push($globallink_arr, $globallink);
|
49 |
+
}
|
50 |
+
|
51 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $globallink_arr);
|
52 |
+
cancel_select_PD_documents($globallink_arr);
|
53 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $globallink_arr);
|
54 |
+
$this->update_gl_row_status_after_cancellation($globallink_arr);
|
55 |
+
}
|
56 |
+
catch (SoapFault $sf) {
|
57 |
+
$success = FALSE;
|
58 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
59 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink WebService Error - ' . $sf->getMessage());
|
60 |
+
}
|
61 |
+
catch (Exception $ex) {
|
62 |
+
$success = FALSE;
|
63 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
64 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
65 |
+
}
|
66 |
+
|
67 |
+
if ($success) {
|
68 |
+
$message = $this->__('Selected document(s) cancelled successfully.');
|
69 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
70 |
+
}
|
71 |
+
|
72 |
+
$this->_redirect('*/*');
|
73 |
+
}
|
74 |
+
|
75 |
+
public function cancelAction() {
|
76 |
+
sleep(6);
|
77 |
+
$success = TRUE;
|
78 |
+
try {
|
79 |
+
$post = $this->getRequest()->getPost();
|
80 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
81 |
+
$selected_submission = urldecode($db->quote($post['selected_submission_name']));
|
82 |
+
$what = " DISTINCT submission_id ";
|
83 |
+
$status = Mage::helper("globallink")->_get_submission_status_sent() . "','" . Mage::helper("globallink")->_get_submission_status_ready()
|
84 |
+
. "','" . Mage::helper("globallink")->_get_submission_status_error();
|
85 |
+
$where = " WHERE submission_name = $selected_submission and status IN ('" . $status . "') ";
|
86 |
+
$gl_sub_arr = Mage::helper("globallink")->get_status_objects($what, $where, FALSE);
|
87 |
+
|
88 |
+
$globallink = new GlobalLink;
|
89 |
+
foreach ($gl_sub_arr as $row) {
|
90 |
+
if ($row['submission_id'] != '') {
|
91 |
+
$globallink->submissionTicket = $row['submission_id'];
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $globallink);
|
96 |
+
cancel_select_PD_submission($globallink);
|
97 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $globallink);
|
98 |
+
$this->update_gl_submission_status_after_cancellation($globallink);
|
99 |
+
}
|
100 |
+
catch (SoapFault $sf) {
|
101 |
+
$success = FALSE;
|
102 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
103 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink WebService Error - ' . $sf->getMessage());
|
104 |
+
}
|
105 |
+
catch (Exception $ex) {
|
106 |
+
$success = FALSE;
|
107 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
108 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
109 |
+
}
|
110 |
+
|
111 |
+
if ($success) {
|
112 |
+
$message = $this->__('Submission cancelled successfully.');
|
113 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
114 |
+
}
|
115 |
+
|
116 |
+
$this->_redirect('*/*');
|
117 |
+
}
|
118 |
+
|
119 |
+
public function clearCancelledAction() {
|
120 |
+
$success = TRUE;
|
121 |
+
try {
|
122 |
+
Mage::helper("globallink")->clear_cancelled_submissions();
|
123 |
+
}
|
124 |
+
catch (SoapFault $sf) {
|
125 |
+
$success = FALSE;
|
126 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
127 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink WebService Error - ' . $sf->getMessage());
|
128 |
+
}
|
129 |
+
catch (Exception $ex) {
|
130 |
+
$success = FALSE;
|
131 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
132 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
133 |
+
}
|
134 |
+
|
135 |
+
if ($success) {
|
136 |
+
$message = $this->__('Cleared cancelled submissions successfully.');
|
137 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
138 |
+
}
|
139 |
+
|
140 |
+
$this->_redirect('*/*');
|
141 |
+
}
|
142 |
+
|
143 |
+
function update_gl_submission_status_after_cancellation($globallink) {
|
144 |
+
if ($globallink->cancelled == TRUE) {
|
145 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
146 |
+
$ticket = $db->quote($globallink->submissionTicket);
|
147 |
+
$sql = "UPDATE globallink_status SET status = 'Cancelled', changed = 1 WHERE submission_id = $ticket;";
|
148 |
+
$db->query($sql);
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
function update_gl_row_status_after_cancellation($globallink_arr) {
|
153 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
154 |
+
foreach ($globallink_arr as $globallink) {
|
155 |
+
if ($globallink->cancelled == TRUE) {
|
156 |
+
$sql = "UPDATE globallink_status SET status = 'Cancelled', changed = 1 WHERE globallink_job_id = $globallink->glRowId;";
|
157 |
+
$db->query($sql);
|
158 |
+
}
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlcategoryController.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
|
17 |
+
require_once 'gl_ws/GlobalLink.php';
|
18 |
+
require_once 'gl_ws/gl_ws_send_translations.php';
|
19 |
+
|
20 |
+
class Transperfect_Globallink_Adminhtml_GlcategoryController extends Mage_Adminhtml_Controller_Action {
|
21 |
+
|
22 |
+
public function indexAction() {
|
23 |
+
$this->loadLayout();
|
24 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
25 |
+
$this->renderLayout();
|
26 |
+
}
|
27 |
+
|
28 |
+
public function filterAction() {
|
29 |
+
$post = $this->getRequest()->getPost();
|
30 |
+
$radio = $post['globallink_category_filter'];
|
31 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
32 |
+
Mage::getSingleton('core/session')->unsCategoryFilter();
|
33 |
+
Mage::getSingleton('core/session')->setCategoryFilter($radio);
|
34 |
+
$store = $post['store_id'];
|
35 |
+
if ($store != '') {
|
36 |
+
$this->_redirect('globallink/adminhtml_glcategory', array('_query' => array('store' => $store)));
|
37 |
+
return $this;
|
38 |
+
}
|
39 |
+
else {
|
40 |
+
$this->_redirect('*/*');
|
41 |
+
return $this;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
public function massAddAction() {
|
46 |
+
$object_type = Mage::helper("globallink")->_get_object_type_category();
|
47 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Starting Object Upload.");
|
48 |
+
$post = $this->getRequest()->getPost();
|
49 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
50 |
+
|
51 |
+
$selected_category_ids = $post['gl_category_ids'];
|
52 |
+
$selected_store_id = $post['store'];
|
53 |
+
if (count($selected_category_ids) > 0) {
|
54 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Category Id Selected]", $selected_category_ids[0]);
|
55 |
+
Mage::getSingleton('adminhtml/session')->setData('gl_selected_ids', $selected_category_ids[0]);
|
56 |
+
$this->_redirect('globallink/adminhtml_glcreatesubmission', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
57 |
+
return $this;
|
58 |
+
}
|
59 |
+
else {
|
60 |
+
Mage::getSingleton('adminhtml/session')->addError('Please select a record.');
|
61 |
+
$this->_redirect('*/*');
|
62 |
+
return $this;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlcmsblockController.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'gl_ws/GlobalLink.php';
|
17 |
+
require_once 'gl_ws/gl_ws_send_translations.php';
|
18 |
+
|
19 |
+
class Transperfect_Globallink_Adminhtml_GlcmsblockController extends Mage_Adminhtml_Controller_Action {
|
20 |
+
|
21 |
+
public function indexAction() {
|
22 |
+
$this->loadLayout();
|
23 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
24 |
+
$this->renderLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
public function filterAction() {
|
28 |
+
$post = $this->getRequest()->getPost();
|
29 |
+
$radio = $post['globallink_cmsblock_filter'];
|
30 |
+
Mage::getSingleton('core/session')->unsProductFilter();
|
31 |
+
Mage::getSingleton('core/session')->setProductFilter($radio);
|
32 |
+
$store = $post['store_id'];
|
33 |
+
if ($store != '') {
|
34 |
+
$this->_redirect('globallink/adminhtml_glcmsblock', array('_query' => array('store' => $store)));
|
35 |
+
return $this;
|
36 |
+
}
|
37 |
+
else {
|
38 |
+
$this->_redirect('*/*');
|
39 |
+
return $this;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
public function massAddAction() {
|
44 |
+
$object_type = Mage::helper("globallink")->_get_object_type_block();
|
45 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Starting Object Upload.");
|
46 |
+
$post = $this->getRequest()->getPost();
|
47 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
48 |
+
$selected_store_id = $post['store'];
|
49 |
+
$selected_block_ids = $post['gl_block_ids'];
|
50 |
+
if (count($selected_block_ids) > 0) {
|
51 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Block Id Selected]", $selected_block_ids[0]);
|
52 |
+
Mage::getSingleton('adminhtml/session')->setData('gl_selected_ids', $selected_block_ids[0]);
|
53 |
+
$this->_redirect('globallink/adminhtml_glcreatesubmission', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
else {
|
57 |
+
Mage::getSingleton('adminhtml/session')->addError('Please select a record.');
|
58 |
+
$this->_redirect('*/*');
|
59 |
+
return $this;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlcmspageController.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'gl_ws/GlobalLink.php';
|
17 |
+
require_once 'gl_ws/gl_ws_send_translations.php';
|
18 |
+
|
19 |
+
class Transperfect_Globallink_Adminhtml_GlcmspageController extends Mage_Adminhtml_Controller_Action {
|
20 |
+
|
21 |
+
public function indexAction() {
|
22 |
+
$this->loadLayout();
|
23 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
24 |
+
$this->renderLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
public function filterAction() {
|
28 |
+
$post = $this->getRequest()->getPost();
|
29 |
+
$radio = $post['globallink_cmspage_filter'];
|
30 |
+
Mage::getSingleton('core/session')->unsProductFilter();
|
31 |
+
Mage::getSingleton('core/session')->setProductFilter($radio);
|
32 |
+
$store = $post['store_id'];
|
33 |
+
if ($store != '') {
|
34 |
+
$this->_redirect('globallink/adminhtml_glcmspage', array('_query' => array('store' => $store)));
|
35 |
+
return $this;
|
36 |
+
}
|
37 |
+
else {
|
38 |
+
$this->_redirect('*/*');
|
39 |
+
return $this;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
public function massAddAction() {
|
44 |
+
$object_type = Mage::helper("globallink")->_get_object_type_page();
|
45 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Starting Object Upload.");
|
46 |
+
$post = $this->getRequest()->getPost();
|
47 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
48 |
+
$selected_store_id = $post['store'];
|
49 |
+
$selected_page_ids = $post['gl_page_ids'];
|
50 |
+
if (count($selected_page_ids) > 0) {
|
51 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][page Id Selected]", $selected_page_ids[0]);
|
52 |
+
Mage::getSingleton('adminhtml/session')->setData('gl_selected_ids', $selected_page_ids[0]);
|
53 |
+
$this->_redirect('globallink/adminhtml_glcreatesubmission', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
else {
|
57 |
+
Mage::getSingleton('adminhtml/session')->addError('Please select a record.');
|
58 |
+
$this->_redirect('*/*');
|
59 |
+
return $this;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlcreatesubmissionController.php
ADDED
@@ -0,0 +1,711 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'gl_ws/GlobalLink.php';
|
17 |
+
require_once 'gl_ws/gl_ws_send_translations.php';
|
18 |
+
|
19 |
+
class Transperfect_Globallink_Adminhtml_GlcreatesubmissionController extends Mage_Adminhtml_Controller_Action {
|
20 |
+
|
21 |
+
public function indexAction() {
|
22 |
+
$this->loadLayout();
|
23 |
+
$this->_addContent($this->getLayout()->createBlock('adminhtml/template')->setTemplate('globallink/adminhtml/glcreatesubmission.phtml'));
|
24 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
25 |
+
$this->renderLayout();
|
26 |
+
}
|
27 |
+
|
28 |
+
public function cancelAction() {
|
29 |
+
$post = $this->getRequest()->getPost();
|
30 |
+
$object_type = $post['object_type'];
|
31 |
+
$store_id = $post['store'];
|
32 |
+
Mage::getSingleton('adminhtml/session')->unsetData('gl_selected_ids');
|
33 |
+
if ($object_type == Mage::helper("globallink")->_get_object_type_product()) {
|
34 |
+
$this->_redirect('globallink/adminhtml_glproduct', array('_query' => array('store' => $store_id)));
|
35 |
+
return $this;
|
36 |
+
}
|
37 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_product_attributes()) {
|
38 |
+
$this->_redirect('globallink/adminhtml_glproductattributes', array('_query' => array('store' => $store_id)));
|
39 |
+
return $this;
|
40 |
+
}
|
41 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_category()) {
|
42 |
+
$this->_redirect('globallink/adminhtml_glcategory', array('_query' => array('store' => $store_id)));
|
43 |
+
return $this;
|
44 |
+
}
|
45 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_block()) {
|
46 |
+
$this->_redirect('globallink/adminhtml_glcmsblock', array('_query' => array('store' => $store_id)));
|
47 |
+
return $this;
|
48 |
+
}
|
49 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_page()) {
|
50 |
+
$this->_redirect('globallink/adminhtml_glcmspage', array('_query' => array('store' => $store_id)));
|
51 |
+
return $this;
|
52 |
+
}
|
53 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_email()) {
|
54 |
+
$this->_redirect('globallink/adminhtml_glemailtemplate', array('_query' => array('store' => $store_id)));
|
55 |
+
return $this;
|
56 |
+
}
|
57 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_newsletter()) {
|
58 |
+
$this->_redirect('globallink/adminhtml_glnewslettertemplate', array('_query' => array('store' => $store_id)));
|
59 |
+
return $this;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
public function sendAction() {
|
64 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Starting Object Upload.");
|
65 |
+
$post = $this->getRequest()->getPost();
|
66 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
67 |
+
|
68 |
+
|
69 |
+
$selected_ids = explode(',', Mage::getSingleton('adminhtml/session')->getData('gl_selected_ids'));
|
70 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Ids Selected]", $selected_ids);
|
71 |
+
$success = TRUE;
|
72 |
+
|
73 |
+
$object_type = $post['object_type'];
|
74 |
+
$submitter = Mage::getSingleton('admin/session')->getUser()->getUsername();
|
75 |
+
$gl_locales = Mage::helper("globallink")->get_all_gl_locales();
|
76 |
+
$selected_store_id = $gl_locales[$post['gl_source_locale']]['store_id'];
|
77 |
+
|
78 |
+
if (!$this->check_active_stores($post['gl_target_locales'])) {
|
79 |
+
$this->_redirect('*/*', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
80 |
+
return $this;
|
81 |
+
}
|
82 |
+
|
83 |
+
try {
|
84 |
+
$gl_submission_arr = array();
|
85 |
+
$gl_submission_arr['gl_submission_name'] = $post['gl_submission_name'];
|
86 |
+
$gl_submission_arr['gl_due_date'] = $post['gl_due_date'];
|
87 |
+
$gl_submission_arr['gl_priority'] = $post['gl_priority'];
|
88 |
+
$gl_submission_arr['gl_source_locale'] = $post['gl_source_locale'];
|
89 |
+
$gl_submission_arr['gl_target_locales'] = $post['gl_target_locales'];
|
90 |
+
$gl_submission_arr['gl_submission_instructions'] = $post['gl_submission_instructions'];
|
91 |
+
$gl_submission_arr['gl_project'] = $post['gl_project'];
|
92 |
+
$gl_submission_arr['gl_submitter'] = $submitter;
|
93 |
+
|
94 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Selected Store]", $selected_store_id);
|
95 |
+
|
96 |
+
$globalLink_arr = array();
|
97 |
+
if ($object_type == Mage::helper("globallink")->_get_object_type_product()) {
|
98 |
+
$this->read_product_data($selected_store_id, $selected_ids, $globalLink_arr, $gl_submission_arr);
|
99 |
+
}
|
100 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_product_attributes()) {
|
101 |
+
$this->read_product_attribute_data($selected_ids, $globalLink_arr, $gl_submission_arr);
|
102 |
+
}
|
103 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_category()) {
|
104 |
+
$field_config_arr = Mage::helper("globallink")->getIncludeFields($object_type);
|
105 |
+
if (is_array($field_config_arr) && count($field_config_arr) == 0) {
|
106 |
+
Mage::getSingleton('adminhtml/session')->addError('No fields are configured for translation for type - ' . $object_type . '.');
|
107 |
+
$this->_redirect('*/*');
|
108 |
+
return $this;
|
109 |
+
}
|
110 |
+
$this->read_category_data($selected_store_id, $selected_ids, $globalLink_arr, $gl_submission_arr, $field_config_arr);
|
111 |
+
}
|
112 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_block()) {
|
113 |
+
$field_config_arr = Mage::helper("globallink")->getIncludeFields($object_type);
|
114 |
+
if (is_array($field_config_arr) && count($field_config_arr) == 0) {
|
115 |
+
Mage::getSingleton('adminhtml/session')->addError('No fields are configured for translation for type - ' . $object_type . '.');
|
116 |
+
$this->_redirect('*/*');
|
117 |
+
return $this;
|
118 |
+
}
|
119 |
+
$this->read_block_data($selected_store_id, $selected_ids, $globalLink_arr, $gl_submission_arr, $field_config_arr);
|
120 |
+
}
|
121 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_page()) {
|
122 |
+
$field_config_arr = Mage::helper("globallink")->getIncludeFields($object_type);
|
123 |
+
if (is_array($field_config_arr) && count($field_config_arr) == 0) {
|
124 |
+
Mage::getSingleton('adminhtml/session')->addError('No fields are configured for translation for type - ' . $object_type . '.');
|
125 |
+
$this->_redirect('*/*');
|
126 |
+
return $this;
|
127 |
+
}
|
128 |
+
$this->read_page_data($selected_store_id, $selected_ids, $globalLink_arr, $gl_submission_arr, $field_config_arr);
|
129 |
+
}
|
130 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_email()) {
|
131 |
+
$field_config_arr = Mage::helper("globallink")->getIncludeFields($object_type);
|
132 |
+
if (is_array($field_config_arr) && count($field_config_arr) == 0) {
|
133 |
+
Mage::getSingleton('adminhtml/session')->addError('No fields are configured for translation for type - ' . $object_type . '.');
|
134 |
+
$this->_redirect('*/*');
|
135 |
+
return $this;
|
136 |
+
}
|
137 |
+
$this->read_email_data($selected_store_id, $selected_ids, $globalLink_arr, $gl_submission_arr, $field_config_arr);
|
138 |
+
}
|
139 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_newsletter()) {
|
140 |
+
$field_config_arr = Mage::helper("globallink")->getIncludeFields($object_type);
|
141 |
+
if (is_array($field_config_arr) && count($field_config_arr) == 0) {
|
142 |
+
Mage::getSingleton('adminhtml/session')->addError('No fields are configured for translation for type - ' . $object_type . '.');
|
143 |
+
$this->_redirect('*/*');
|
144 |
+
return $this;
|
145 |
+
}
|
146 |
+
$this->read_newsletter_data($selected_store_id, $selected_ids, $globalLink_arr, $gl_submission_arr, $field_config_arr);
|
147 |
+
}
|
148 |
+
|
149 |
+
$count = count($globalLink_arr);
|
150 |
+
if ($count > 0) {
|
151 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Preparing to send to GlobalLink Server]", $globalLink_arr);
|
152 |
+
sendDocumentsForTranslationToPD($globalLink_arr, $gl_submission_arr['gl_project']);
|
153 |
+
$status = "Sent for Translations";
|
154 |
+
Mage::helper("globallink")->insert_gl_status($globalLink_arr, $status);
|
155 |
+
}
|
156 |
+
}
|
157 |
+
catch (SoapFault $sf) {
|
158 |
+
$success = FALSE;
|
159 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
160 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink WebService Error - ' . $sf->getMessage());
|
161 |
+
$this->_redirect('*/*', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
162 |
+
return $this;
|
163 |
+
}
|
164 |
+
catch (Exception $ex) {
|
165 |
+
$success = FALSE;
|
166 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
167 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
168 |
+
$this->_redirect('*/*', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
169 |
+
return $this;
|
170 |
+
}
|
171 |
+
|
172 |
+
if ($success) {
|
173 |
+
if ($count > 0) {
|
174 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Successfully sent to GlobalLink Server");
|
175 |
+
$message = $this->__('Content has been successfully sent for translation.');
|
176 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
177 |
+
}
|
178 |
+
Mage::getSingleton('adminhtml/session')->unsetData('gl_selected_ids');
|
179 |
+
if ($object_type == Mage::helper("globallink")->_get_object_type_product()) {
|
180 |
+
$this->_redirect('globallink/adminhtml_glproduct', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
181 |
+
return $this;
|
182 |
+
}
|
183 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_product_attributes()) {
|
184 |
+
$this->_redirect('globallink/adminhtml_glproductattributes', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
185 |
+
return $this;
|
186 |
+
}
|
187 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_category()) {
|
188 |
+
$this->_redirect('globallink/adminhtml_glcategory', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
189 |
+
return $this;
|
190 |
+
}
|
191 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_block()) {
|
192 |
+
$this->_redirect('globallink/adminhtml_glcmsblock', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
193 |
+
return $this;
|
194 |
+
}
|
195 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_page()) {
|
196 |
+
$this->_redirect('globallink/adminhtml_glcmspage', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
197 |
+
return $this;
|
198 |
+
}
|
199 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_email()) {
|
200 |
+
$this->_redirect('globallink/adminhtml_glemailtemplate', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
201 |
+
return $this;
|
202 |
+
}
|
203 |
+
elseif ($object_type == Mage::helper("globallink")->_get_object_type_newsletter()) {
|
204 |
+
$this->_redirect('globallink/adminhtml_glnewslettertemplate', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
205 |
+
return $this;
|
206 |
+
}
|
207 |
+
|
208 |
+
$this->_redirect('*/*');
|
209 |
+
return $this;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
private function read_product_data($selected_store_id, $selected_product_ids, &$globalLink_arr, $gl_submission_arr) {
|
214 |
+
$object_type = Mage::helper("globallink")->_get_object_type_product();
|
215 |
+
foreach ($selected_product_ids as $product_id) {
|
216 |
+
// Select All Checkbox is set to on if checked
|
217 |
+
if ($product_id == 'on') {
|
218 |
+
continue;
|
219 |
+
}
|
220 |
+
$target_locales = $gl_submission_arr['gl_target_locales'];
|
221 |
+
$m_product = Mage::getModel($object_type)->setStoreId($selected_store_id)->load($product_id);
|
222 |
+
|
223 |
+
$gl_product = array();
|
224 |
+
$gl_product['object_id'] = $product_id;
|
225 |
+
$gl_product['object_type'] = $object_type;
|
226 |
+
|
227 |
+
$gl_attr_arr = array();
|
228 |
+
$attributes = $m_product->getAttributes();
|
229 |
+
$attribute_set_id = $m_product->getAttributeSetId();
|
230 |
+
|
231 |
+
$attr_config_arr = Mage::helper("globallink")->get_attribute_set_config($attribute_set_id);
|
232 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Product Id Selected]", $selected_product_ids);
|
233 |
+
|
234 |
+
if (is_array($attr_config_arr) && count($attr_config_arr) == 0) {
|
235 |
+
Mage::getSingleton('adminhtml/session')->addError('No attributes are configured for product id - ' . $product_id . '.');
|
236 |
+
continue;
|
237 |
+
}
|
238 |
+
|
239 |
+
foreach ($attributes as $attribute) {
|
240 |
+
if (isset($attr_config_arr[$attribute_set_id])
|
241 |
+
&& isset($attr_config_arr[$attribute_set_id][$attribute->getAttributeId()])) {
|
242 |
+
if ($attr_config_arr[$attribute_set_id][$attribute->getAttributeId()] == 1) {
|
243 |
+
if ($attribute->getFrontend()->getValue($m_product) != '') {
|
244 |
+
$gl_attr_arr[$attribute->getAttributeCode()] = $attribute->getFrontend()->getValue($m_product);
|
245 |
+
}
|
246 |
+
}
|
247 |
+
}
|
248 |
+
}
|
249 |
+
|
250 |
+
if (count($gl_attr_arr) == 0) {
|
251 |
+
Mage::getSingleton('adminhtml/session')->addError($object_type . ' - ' . $m_product->getName() . ' is empty.');
|
252 |
+
continue;
|
253 |
+
}
|
254 |
+
|
255 |
+
$gl_product['attributes'] = $gl_attr_arr;
|
256 |
+
|
257 |
+
$source_xml = Mage::helper("globallink")->create_source_xml($gl_product);
|
258 |
+
$source_name = Mage::helper("globallink")->get_formatted_file_name($m_product->getName()) . ".xml";
|
259 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source File Name]", $source_name);
|
260 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source XML]", $source_xml);
|
261 |
+
|
262 |
+
$time_arr = explode('/', $gl_submission_arr['gl_due_date']);
|
263 |
+
$due_date = mktime(0, 0, 0, $time_arr[0], $time_arr[1], $time_arr[2]) * 1000;
|
264 |
+
|
265 |
+
foreach ($target_locales as $key => $target_locale) {
|
266 |
+
if (!$this->check_existing_submission($object_type, $product_id, $gl_submission_arr['gl_source_locale'], $target_locale)) {
|
267 |
+
Mage::getSingleton('adminhtml/session')->addError('Product id - ' . $product_id . ' has already been sent out for translation for target language - ' . $target_locale . '.');
|
268 |
+
unset($target_locales[$key]);
|
269 |
+
}
|
270 |
+
}
|
271 |
+
|
272 |
+
$globalLink = new GlobalLink;
|
273 |
+
$globalLink->objectId = $product_id;
|
274 |
+
$globalLink->objectType = $object_type;
|
275 |
+
$globalLink->objectName = $m_product->getName();
|
276 |
+
$globalLink->sourceLocale = $gl_submission_arr['gl_source_locale'];
|
277 |
+
$globalLink->targetLocale = $target_locales;
|
278 |
+
$globalLink->sourceXML = $source_xml;
|
279 |
+
$globalLink->sourceFileName = $source_name;
|
280 |
+
$globalLink->submissionName = $gl_submission_arr['gl_submission_name'];
|
281 |
+
$globalLink->dueDate = $due_date;
|
282 |
+
$globalLink->priority = $gl_submission_arr['gl_priority'];
|
283 |
+
$globalLink->submissionInstructions = $gl_submission_arr['gl_submission_instructions'];
|
284 |
+
$globalLink->submitter = $gl_submission_arr['gl_submitter'];
|
285 |
+
array_push($globalLink_arr, $globalLink);
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
+
private function read_product_attribute_data($selected_product_attribute_ids, &$globalLink_arr, $gl_submission_arr) {
|
290 |
+
$object_type = Mage::helper("globallink")->_get_object_type_product_attributes();
|
291 |
+
// Select All Checkbox is set to on if checked
|
292 |
+
foreach ($selected_product_attribute_ids as $attribute_id) {
|
293 |
+
$model = Mage::getModel('catalog/resource_eav_attribute');
|
294 |
+
$model->load($attribute_id);
|
295 |
+
|
296 |
+
if (!$model->getId()) {
|
297 |
+
continue;
|
298 |
+
}
|
299 |
+
|
300 |
+
$target_locales = $gl_submission_arr['gl_target_locales'];
|
301 |
+
|
302 |
+
$gl_product_attribute = array();
|
303 |
+
$gl_product_attribute['object_id'] = $attribute_id;
|
304 |
+
$gl_product_attribute['object_type'] = $object_type;
|
305 |
+
|
306 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Product Attribute Id Selected]", $selected_product_attribute_ids);
|
307 |
+
|
308 |
+
$gl_attr_arr = array();
|
309 |
+
|
310 |
+
$gl_attr_arr['frontend_label'] = $model->frontend_label;
|
311 |
+
|
312 |
+
$attribute = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $model->attribute_code);
|
313 |
+
$options_arr = $attribute->getSource()->getAllOptions(false);
|
314 |
+
|
315 |
+
if (!empty($options_arr)){
|
316 |
+
foreach ($options_arr as $option) {
|
317 |
+
$gl_attr_arr[$option['value']] = $option['label'];
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
if (count($gl_attr_arr) == 0) {
|
322 |
+
Mage::getSingleton('adminhtml/session')->addError($object_type . ' - ' . $model->attribute_code . ' is empty.');
|
323 |
+
continue;
|
324 |
+
}
|
325 |
+
|
326 |
+
$gl_product_attribute['attributes'] = $gl_attr_arr;
|
327 |
+
|
328 |
+
$source_xml = Mage::helper("globallink")->create_source_xml($gl_product_attribute);
|
329 |
+
|
330 |
+
//get attribute name
|
331 |
+
$source_name = Mage::helper("globallink")->get_formatted_file_name($model->attribute_code) . ".xml";
|
332 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source File Name]", $source_name);
|
333 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source XML]", $source_xml);
|
334 |
+
|
335 |
+
$time_arr = explode('/', $gl_submission_arr['gl_due_date']);
|
336 |
+
$due_date = mktime(0, 0, 0, $time_arr[0], $time_arr[1], $time_arr[2]) * 1000;
|
337 |
+
|
338 |
+
foreach ($target_locales as $key => $target_locale) {
|
339 |
+
if (!$this->check_existing_submission($object_type, $attribute_id, $gl_submission_arr['gl_source_locale'], $target_locale)) {
|
340 |
+
Mage::getSingleton('adminhtml/session')->addError('Product attribute id - ' . $attribute_id . ' has already been sent out for translation for target language - ' . $target_locale . '.');
|
341 |
+
unset($target_locales[$key]);
|
342 |
+
}
|
343 |
+
}
|
344 |
+
|
345 |
+
$globalLink = new GlobalLink;
|
346 |
+
$globalLink->objectId = $attribute_id;
|
347 |
+
$globalLink->objectType = $object_type;
|
348 |
+
$globalLink->objectName = $model->attribute_code;
|
349 |
+
$globalLink->sourceLocale = $gl_submission_arr['gl_source_locale'];
|
350 |
+
$globalLink->targetLocale = $target_locales;
|
351 |
+
$globalLink->sourceXML = $source_xml;
|
352 |
+
$globalLink->sourceFileName = $source_name;
|
353 |
+
$globalLink->submissionName = $gl_submission_arr['gl_submission_name'];
|
354 |
+
$globalLink->dueDate = $due_date;
|
355 |
+
$globalLink->priority = $gl_submission_arr['gl_priority'];
|
356 |
+
$globalLink->submissionInstructions = $gl_submission_arr['gl_submission_instructions'];
|
357 |
+
$globalLink->submitter = $gl_submission_arr['gl_submitter'];
|
358 |
+
array_push($globalLink_arr, $globalLink);
|
359 |
+
}
|
360 |
+
}
|
361 |
+
|
362 |
+
private function read_category_data($selected_store_id, $selected_category_ids, &$globalLink_arr, $gl_submission_arr, $field_config_arr) {
|
363 |
+
$object_type = Mage::helper("globallink")->_get_object_type_category();
|
364 |
+
foreach ($selected_category_ids as $category_id) {
|
365 |
+
// Select All Checkbox is set to on if checked
|
366 |
+
if ($category_id == 'on') {
|
367 |
+
continue;
|
368 |
+
}
|
369 |
+
$t_category = Mage::getModel($object_type)->setStoreId($selected_store_id)->load($category_id);
|
370 |
+
Mage::helper("globallink")->gl_debug('Selected Category Object', $t_category);
|
371 |
+
$gl_category = array();
|
372 |
+
$gl_category['object_id'] = $category_id;
|
373 |
+
$gl_category['object_type'] = $object_type;
|
374 |
+
|
375 |
+
$gl_attr_arr = array();
|
376 |
+
foreach ($field_config_arr as $field) {
|
377 |
+
if ($t_category->getData($field) != '') {
|
378 |
+
$gl_attr_arr[$field] = $t_category->getData($field);
|
379 |
+
}
|
380 |
+
}
|
381 |
+
if (count($gl_attr_arr) == 0) {
|
382 |
+
Mage::getSingleton('adminhtml/session')->addError($object_type . ' - ' . $t_category->getName() . ' is empty.');
|
383 |
+
continue;
|
384 |
+
}
|
385 |
+
|
386 |
+
$gl_category['attributes'] = $gl_attr_arr;
|
387 |
+
Mage::helper("globallink")->gl_debug('Selected category Arr', $gl_category);
|
388 |
+
|
389 |
+
$source_xml = Mage::helper("globallink")->create_source_xml($gl_category);
|
390 |
+
$source_name = Mage::helper("globallink")->get_formatted_file_name($t_category->getName()) . ".xml";
|
391 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source File Name]", $source_name);
|
392 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source XML]", $source_xml);
|
393 |
+
|
394 |
+
$time_arr = explode('/', $gl_submission_arr['gl_due_date']);
|
395 |
+
$due_date = mktime(0, 0, 0, $time_arr[0], $time_arr[1], $time_arr[2]) * 1000;
|
396 |
+
|
397 |
+
$target_locales = $gl_submission_arr['gl_target_locales'];
|
398 |
+
|
399 |
+
foreach ($target_locales as $key => $target_locale) {
|
400 |
+
if (!$this->check_existing_submission($object_type, $category_id, $gl_submission_arr['gl_source_locale'], $target_locale)) {
|
401 |
+
Mage::getSingleton('adminhtml/session')->addError($t_category->getName() . ' has already been sent out for translation for target language ' . $target_locale . '.');
|
402 |
+
unset($target_locales[$key]);
|
403 |
+
}
|
404 |
+
}
|
405 |
+
|
406 |
+
$globalLink = new GlobalLink;
|
407 |
+
$globalLink->objectId = $category_id;
|
408 |
+
$globalLink->objectType = $object_type;
|
409 |
+
$globalLink->objectName = $t_category->getName();
|
410 |
+
$globalLink->sourceLocale = $gl_submission_arr['gl_source_locale'];
|
411 |
+
$globalLink->targetLocale = $target_locales;
|
412 |
+
$globalLink->sourceXML = $source_xml;
|
413 |
+
$globalLink->sourceFileName = $source_name;
|
414 |
+
$globalLink->submissionName = $gl_submission_arr['gl_submission_name'];
|
415 |
+
$globalLink->dueDate = $due_date;
|
416 |
+
$globalLink->priority = $gl_submission_arr['gl_priority'];
|
417 |
+
$globalLink->submissionInstructions = $gl_submission_arr['gl_submission_instructions'];
|
418 |
+
$globalLink->submitter = $gl_submission_arr['gl_submitter'];
|
419 |
+
array_push($globalLink_arr, $globalLink);
|
420 |
+
}
|
421 |
+
}
|
422 |
+
|
423 |
+
private function read_block_data($selected_store_id, $selected_block_ids, &$globalLink_arr, $gl_submission_arr, $field_config_arr) {
|
424 |
+
$object_type = Mage::helper("globallink")->_get_object_type_block();
|
425 |
+
foreach ($selected_block_ids as $block_id) {
|
426 |
+
// Select All Checkbox is set to on if checked
|
427 |
+
if ($block_id == 'on') {
|
428 |
+
continue;
|
429 |
+
}
|
430 |
+
$block = Mage::getModel($object_type)->setStoreId($selected_store_id)->load($block_id);
|
431 |
+
Mage::helper("globallink")->gl_debug('Selected block Arr', $block);
|
432 |
+
|
433 |
+
$gl_cmsblock = array();
|
434 |
+
$gl_cmsblock['object_id'] = $block_id;
|
435 |
+
$gl_cmsblock['object_type'] = $object_type;
|
436 |
+
|
437 |
+
$gl_attr_arr = array();
|
438 |
+
foreach ($field_config_arr as $field) {
|
439 |
+
if ($block->getData($field) != '') {
|
440 |
+
$gl_attr_arr[$field] = $block->getData($field);
|
441 |
+
}
|
442 |
+
}
|
443 |
+
if (count($gl_attr_arr) == 0) {
|
444 |
+
Mage::getSingleton('adminhtml/session')->addError($object_type . ' - ' . $block->getTitle() . ' is empty.');
|
445 |
+
continue;
|
446 |
+
}
|
447 |
+
|
448 |
+
$gl_cmsblock['attributes'] = $gl_attr_arr;
|
449 |
+
Mage::helper("globallink")->gl_debug('Selected block Arr', $gl_cmsblock);
|
450 |
+
|
451 |
+
$source_xml = Mage::helper("globallink")->create_source_xml($gl_cmsblock);
|
452 |
+
$source_name = Mage::helper("globallink")->get_formatted_file_name($block->getTitle()) . ".xml";
|
453 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source File Name]", $source_name);
|
454 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source XML]", $source_xml);
|
455 |
+
|
456 |
+
$time_arr = explode('/', $gl_submission_arr['gl_due_date']);
|
457 |
+
$due_date = mktime(0, 0, 0, $time_arr[0], $time_arr[1], $time_arr[2]) * 1000;
|
458 |
+
|
459 |
+
$target_locales = $gl_submission_arr['gl_target_locales'];
|
460 |
+
foreach ($target_locales as $key => $target_locale) {
|
461 |
+
if (!$this->check_existing_submission($object_type, $block_id, $gl_submission_arr['gl_source_locale'], $target_locale)) {
|
462 |
+
Mage::getSingleton('adminhtml/session')->addError($block->getTitle() . ' has already been sent out for translation for target language ' . $target_locale . '.');
|
463 |
+
unset($target_locales[$key]);
|
464 |
+
}
|
465 |
+
}
|
466 |
+
|
467 |
+
$globalLink = new GlobalLink;
|
468 |
+
$globalLink->objectId = $block_id;
|
469 |
+
$globalLink->objectType = $object_type;
|
470 |
+
$globalLink->objectName = $block->getTitle();
|
471 |
+
$globalLink->sourceLocale = $gl_submission_arr['gl_source_locale'];
|
472 |
+
$globalLink->targetLocale = $target_locales;
|
473 |
+
$globalLink->sourceXML = $source_xml;
|
474 |
+
$globalLink->sourceFileName = $source_name;
|
475 |
+
$globalLink->submissionName = $gl_submission_arr['gl_submission_name'];
|
476 |
+
$globalLink->dueDate = $due_date;
|
477 |
+
$globalLink->priority = $gl_submission_arr['gl_priority'];
|
478 |
+
$globalLink->submissionInstructions = $gl_submission_arr['gl_submission_instructions'];
|
479 |
+
$globalLink->submitter = $gl_submission_arr['gl_submitter'];
|
480 |
+
array_push($globalLink_arr, $globalLink);
|
481 |
+
}
|
482 |
+
}
|
483 |
+
|
484 |
+
private function read_page_data($selected_store_id, $selected_page_ids, &$globalLink_arr, $gl_submission_arr, $field_config_arr) {
|
485 |
+
$object_type = Mage::helper("globallink")->_get_object_type_page();
|
486 |
+
foreach ($selected_page_ids as $page_id) {
|
487 |
+
// Select All Checkbox is set to on if checked
|
488 |
+
if ($page_id == 'on') {
|
489 |
+
continue;
|
490 |
+
}
|
491 |
+
|
492 |
+
$page = Mage::getModel($object_type)->setStoreId($selected_store_id)->load($page_id);
|
493 |
+
$title = $page->getTitle();
|
494 |
+
if (isset($page['published_revision_id']) && $page['published_revision_id'] != 0) {
|
495 |
+
$page = Mage::getModel('enterprise_cms/page_revision')->load($page['published_revision_id']);
|
496 |
+
}
|
497 |
+
|
498 |
+
Mage::helper("globallink")->gl_debug('Selected Page Arr', $page);
|
499 |
+
|
500 |
+
$gl_cmspage = array();
|
501 |
+
$gl_cmspage['object_id'] = $page_id;
|
502 |
+
$gl_cmspage['object_type'] = $object_type;
|
503 |
+
|
504 |
+
$gl_attr_arr = array();
|
505 |
+
foreach ($field_config_arr as $field) {
|
506 |
+
if ($page->getData($field) != '') {
|
507 |
+
$gl_attr_arr[$field] = $page->getData($field);
|
508 |
+
}
|
509 |
+
if ($field == 'title') {
|
510 |
+
$gl_attr_arr['title'] = $title;
|
511 |
+
}
|
512 |
+
}
|
513 |
+
if (count($gl_attr_arr) == 0) {
|
514 |
+
Mage::getSingleton('adminhtml/session')->addError($object_type . ' - ' . $title . ' is empty.');
|
515 |
+
continue;
|
516 |
+
}
|
517 |
+
|
518 |
+
$gl_cmspage['attributes'] = $gl_attr_arr;
|
519 |
+
Mage::helper("globallink")->gl_debug('Selected Page Arr', $gl_cmspage);
|
520 |
+
|
521 |
+
$source_xml = Mage::helper("globallink")->create_source_xml($gl_cmspage);
|
522 |
+
$source_name = Mage::helper("globallink")->get_formatted_file_name($title) . ".xml";
|
523 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source File Name]", $source_name);
|
524 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source XML]", $source_xml);
|
525 |
+
|
526 |
+
$time_arr = explode('/', $gl_submission_arr['gl_due_date']);
|
527 |
+
$due_date = mktime(0, 0, 0, $time_arr[0], $time_arr[1], $time_arr[2]) * 1000;
|
528 |
+
$target_locales = $gl_submission_arr['gl_target_locales'];
|
529 |
+
foreach ($target_locales as $key => $target_locale) {
|
530 |
+
if (!$this->check_existing_submission($object_type, $page_id, $gl_submission_arr['gl_source_locale'], $target_locale)) {
|
531 |
+
Mage::getSingleton('adminhtml/session')->addError($title . ' has already been sent out for translation for target language ' . $target_locale . '.');
|
532 |
+
unset($target_locales[$key]);
|
533 |
+
}
|
534 |
+
}
|
535 |
+
|
536 |
+
$globalLink = new GlobalLink;
|
537 |
+
$globalLink->objectId = $page_id;
|
538 |
+
$globalLink->objectType = $object_type;
|
539 |
+
$globalLink->objectName = $title;
|
540 |
+
$globalLink->sourceLocale = $gl_submission_arr['gl_source_locale'];
|
541 |
+
$globalLink->targetLocale = $target_locales;
|
542 |
+
$globalLink->sourceXML = $source_xml;
|
543 |
+
$globalLink->sourceFileName = $source_name;
|
544 |
+
$globalLink->submissionName = $gl_submission_arr['gl_submission_name'];
|
545 |
+
$globalLink->dueDate = $due_date;
|
546 |
+
$globalLink->priority = $gl_submission_arr['gl_priority'];
|
547 |
+
$globalLink->submissionInstructions = $gl_submission_arr['gl_submission_instructions'];
|
548 |
+
$globalLink->submitter = $gl_submission_arr['gl_submitter'];
|
549 |
+
array_push($globalLink_arr, $globalLink);
|
550 |
+
}
|
551 |
+
}
|
552 |
+
|
553 |
+
private function read_email_data($selected_store_id, $selected_template_ids, &$globalLink_arr, $gl_submission_arr, $field_config_arr) {
|
554 |
+
$object_type = Mage::helper("globallink")->_get_object_type_email();
|
555 |
+
foreach ($selected_template_ids as $template_id) {
|
556 |
+
// Select All Checkbox is set to on if checked
|
557 |
+
if ($template_id == 'on') {
|
558 |
+
continue;
|
559 |
+
}
|
560 |
+
$template = Mage::getModel($object_type)->load($template_id);
|
561 |
+
Mage::helper("globallink")->gl_debug('Selected template Arr', $template);
|
562 |
+
$gl_emailtemplate = array();
|
563 |
+
$gl_emailtemplate['object_id'] = $template_id;
|
564 |
+
$gl_emailtemplate['object_type'] = $object_type;
|
565 |
+
|
566 |
+
$gl_attr_arr = array();
|
567 |
+
foreach ($field_config_arr as $field) {
|
568 |
+
if ($template->getData($field) != '') {
|
569 |
+
$gl_attr_arr[$field] = $template->getData($field);
|
570 |
+
}
|
571 |
+
}
|
572 |
+
|
573 |
+
if (count($gl_attr_arr) == 0) {
|
574 |
+
Mage::getSingleton('adminhtml/session')->addError($object_type . ' - ' . $template->getTemplateSubject() . ' is empty.');
|
575 |
+
continue;
|
576 |
+
}
|
577 |
+
|
578 |
+
$gl_emailtemplate['attributes'] = $gl_attr_arr;
|
579 |
+
Mage::helper("globallink")->gl_debug('Selected template Arr', $gl_emailtemplate);
|
580 |
+
|
581 |
+
$source_xml = Mage::helper("globallink")->create_source_xml($gl_emailtemplate);
|
582 |
+
$source_name = Mage::helper("globallink")->get_formatted_file_name($template->getTemplateSubject()) . ".xml";
|
583 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source File Name]", $source_name);
|
584 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source XML]", $source_xml);
|
585 |
+
|
586 |
+
$time_arr = explode('/', $gl_submission_arr['gl_due_date']);
|
587 |
+
$due_date = mktime(0, 0, 0, $time_arr[0], $time_arr[1], $time_arr[2]) * 1000;
|
588 |
+
$target_locales = $gl_submission_arr['gl_target_locales'];
|
589 |
+
foreach ($target_locales as $key => $target_locale) {
|
590 |
+
if (!$this->check_existing_submission($object_type, $template_id, $gl_submission_arr['gl_source_locale'], $target_locale)) {
|
591 |
+
Mage::getSingleton('adminhtml/session')->addError($template->getTemplateCode() . ' has already been sent out for translation for target language ' . $target_locale . '.');
|
592 |
+
unset($target_locales[$key]);
|
593 |
+
}
|
594 |
+
}
|
595 |
+
|
596 |
+
$globalLink = new GlobalLink;
|
597 |
+
$globalLink->objectId = $template_id;
|
598 |
+
$globalLink->objectType = $object_type;
|
599 |
+
$globalLink->objectName = $template->getTemplateCode();
|
600 |
+
$globalLink->sourceLocale = $gl_submission_arr['gl_source_locale'];
|
601 |
+
$globalLink->targetLocale = $target_locales;
|
602 |
+
$globalLink->sourceXML = $source_xml;
|
603 |
+
$globalLink->sourceFileName = $source_name;
|
604 |
+
$globalLink->submissionName = $gl_submission_arr['gl_submission_name'];
|
605 |
+
$globalLink->dueDate = $due_date;
|
606 |
+
$globalLink->priority = $gl_submission_arr['gl_priority'];
|
607 |
+
$globalLink->submissionInstructions = $gl_submission_arr['gl_submission_instructions'];
|
608 |
+
$globalLink->submitter = $gl_submission_arr['gl_submitter'];
|
609 |
+
array_push($globalLink_arr, $globalLink);
|
610 |
+
}
|
611 |
+
}
|
612 |
+
|
613 |
+
private function read_newsletter_data($selected_store_id, $selected_newsletter_ids, &$globalLink_arr, $gl_submission_arr, $field_config_arr) {
|
614 |
+
$object_type = Mage::helper("globallink")->_get_object_type_newsletter();
|
615 |
+
foreach ($selected_newsletter_ids as $newsletter_id) {
|
616 |
+
// Select All Checkbox is set to on if checked
|
617 |
+
if ($newsletter_id == 'on') {
|
618 |
+
continue;
|
619 |
+
}
|
620 |
+
$newsletter = Mage::getModel($object_type)->load($newsletter_id);
|
621 |
+
Mage::helper("globallink")->gl_debug('Selected newsletter Arr', $newsletter);
|
622 |
+
$newsletter_id = $newsletter->getId();
|
623 |
+
|
624 |
+
$gl_newslettertemplate = array();
|
625 |
+
$gl_newslettertemplate['object_id'] = $newsletter_id;
|
626 |
+
$gl_newslettertemplate['object_type'] = $object_type;
|
627 |
+
|
628 |
+
$gl_attr_arr = array();
|
629 |
+
foreach ($field_config_arr as $field) {
|
630 |
+
if ($newsletter->getData($field) != '') {
|
631 |
+
$gl_attr_arr[$field] = $newsletter->getData($field);
|
632 |
+
}
|
633 |
+
}
|
634 |
+
|
635 |
+
if (count($gl_attr_arr) == 0) {
|
636 |
+
Mage::getSingleton('adminhtml/session')->addError($object_type . ' - ' . $newsletter->getTemplateSubject() . ' is empty.');
|
637 |
+
continue;
|
638 |
+
}
|
639 |
+
|
640 |
+
$gl_newslettertemplate['attributes'] = $gl_attr_arr;
|
641 |
+
Mage::helper("globallink")->gl_debug('Selected newsletter Arr', $gl_newslettertemplate);
|
642 |
+
|
643 |
+
$source_xml = Mage::helper("globallink")->create_source_xml($gl_newslettertemplate);
|
644 |
+
$source_name = Mage::helper("globallink")->get_formatted_file_name($newsletter->getTemplateSubject()) . ".xml";
|
645 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source File Name]", $source_name);
|
646 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Source XML]", $source_xml);
|
647 |
+
|
648 |
+
$time_arr = explode('/', $gl_submission_arr['gl_due_date']);
|
649 |
+
$due_date = mktime(0, 0, 0, $time_arr[0], $time_arr[1], $time_arr[2]) * 1000;
|
650 |
+
$target_locales = $gl_submission_arr['gl_target_locales'];
|
651 |
+
foreach ($target_locales as $target_locale) {
|
652 |
+
if (!$this->check_existing_submission($object_type, $newsletter_id, $gl_submission_arr['gl_source_locale'], $target_locale)) {
|
653 |
+
Mage::getSingleton('adminhtml/session')->addError($newsletter->getTemplateCode() . ' has already been sent out for translation for target language ' . $target_locale . '.');
|
654 |
+
continue;
|
655 |
+
}
|
656 |
+
$globalLink = new GlobalLink;
|
657 |
+
$globalLink->objectId = $newsletter_id;
|
658 |
+
$globalLink->objectType = $object_type;
|
659 |
+
$globalLink->objectName = $newsletter->getTemplateCode();
|
660 |
+
$globalLink->sourceLocale = $gl_submission_arr['gl_source_locale'];
|
661 |
+
$globalLink->targetLocale = array($target_locale);
|
662 |
+
$globalLink->sourceXML = $source_xml;
|
663 |
+
$globalLink->sourceFileName = $source_name;
|
664 |
+
$globalLink->submissionName = $gl_submission_arr['gl_submission_name'];
|
665 |
+
$globalLink->dueDate = $due_date;
|
666 |
+
$globalLink->priority = $gl_submission_arr['gl_priority'];
|
667 |
+
$globalLink->submissionInstructions = $gl_submission_arr['gl_submission_instructions'];
|
668 |
+
$globalLink->submitter = $gl_submission_arr['gl_submitter'];
|
669 |
+
array_push($globalLink_arr, $globalLink);
|
670 |
+
}
|
671 |
+
}
|
672 |
+
}
|
673 |
+
|
674 |
+
public function check_existing_submission($object_type, $object_id, $source_locale, $target_locale) {
|
675 |
+
$where = " WHERE object_type = '$object_type' AND object_id = $object_id
|
676 |
+
AND gl_source_locale = '$source_locale' AND gl_target_locale = '$target_locale'
|
677 |
+
AND status = 'Sent for Translations';";
|
678 |
+
|
679 |
+
$rows = Mage::helper("globallink")->get_status_objects("*", $where, FALSE);
|
680 |
+
if (count($rows) > 0) {
|
681 |
+
return FALSE;
|
682 |
+
}
|
683 |
+
|
684 |
+
return TRUE;
|
685 |
+
}
|
686 |
+
|
687 |
+
public function check_active_stores($target_locales) {
|
688 |
+
$stores = Mage::app()->getStores();
|
689 |
+
$store_id_arr = array();
|
690 |
+
foreach ($stores as $store) {
|
691 |
+
if ($store->getIsActive()) {
|
692 |
+
$store_id_arr[$store->getStoreId()] = $store->getStoreId();
|
693 |
+
}
|
694 |
+
}
|
695 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
696 |
+
$sql = "SELECT store_id FROM globallink_locale WHERE gl_locale_code IN ('" . implode("','", $target_locales) . "');";
|
697 |
+
$results = $db->query($sql);
|
698 |
+
if ($results) {
|
699 |
+
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
|
700 |
+
if (!in_array($row['store_id'], $store_id_arr)) {
|
701 |
+
$sql = "SELECT gl_locale_desc FROM globallink_locale WHERE store_id = " . $row['store_id'] . ";";
|
702 |
+
$result = $db->query($sql)->fetch(PDO::FETCH_OBJ);
|
703 |
+
Mage::getSingleton('adminhtml/session')->addError($result->gl_locale_desc . ' target language does not have an active store.');
|
704 |
+
return FALSE;
|
705 |
+
}
|
706 |
+
}
|
707 |
+
}
|
708 |
+
return TRUE;
|
709 |
+
}
|
710 |
+
|
711 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlemailtemplateController.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'gl_ws/GlobalLink.php';
|
17 |
+
require_once 'gl_ws/gl_ws_send_translations.php';
|
18 |
+
|
19 |
+
class Transperfect_Globallink_Adminhtml_GlemailtemplateController extends Mage_Adminhtml_Controller_Action {
|
20 |
+
|
21 |
+
public function indexAction() {
|
22 |
+
$this->loadLayout();
|
23 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
24 |
+
$this->renderLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
public function massAddAction() {
|
28 |
+
$object_type = Mage::helper("globallink")->_get_object_type_email();
|
29 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Starting Object Upload.");
|
30 |
+
$post = $this->getRequest()->getPost();
|
31 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
32 |
+
|
33 |
+
$selected_template_ids = $post['gl_template_ids'];
|
34 |
+
if (count($selected_template_ids) > 0) {
|
35 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][template Id Selected]", $selected_template_ids[0]);
|
36 |
+
Mage::getSingleton('adminhtml/session')->setData('gl_selected_ids', $selected_template_ids[0]);
|
37 |
+
$this->_redirect('globallink/adminhtml_glcreatesubmission', array('_query' => array('gl_object_type' => $object_type)));
|
38 |
+
return $this;
|
39 |
+
}
|
40 |
+
else {
|
41 |
+
Mage::getSingleton('adminhtml/session')->addError('Please select a record.');
|
42 |
+
$this->_redirect('*/*');
|
43 |
+
return $this;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlfieldController.php
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'gl_ws/GlobalLink.php';
|
17 |
+
require_once 'gl_ws/gl_ws_receive_translations.php';
|
18 |
+
|
19 |
+
class Transperfect_Globallink_Adminhtml_GlfieldController extends Mage_Adminhtml_Controller_Action {
|
20 |
+
|
21 |
+
public function indexAction() {
|
22 |
+
$this->loadLayout();
|
23 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
24 |
+
$this->renderLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
public function deleteAction() {
|
28 |
+
$field_id = (int) $this->getRequest()->getParam('id');
|
29 |
+
$selected_object_type = $this->getRequest()->getParam('object_type');
|
30 |
+
try {
|
31 |
+
if ($field_id) {
|
32 |
+
$field = Mage::getModel('globallink/glfield')->load($field_id);
|
33 |
+
$field->delete();
|
34 |
+
}
|
35 |
+
}
|
36 |
+
catch (Exception $ex) {
|
37 |
+
$success = FALSE;
|
38 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
39 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
40 |
+
}
|
41 |
+
|
42 |
+
if ($success) {
|
43 |
+
$message = $this->__('Field successfully deleted.');
|
44 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
45 |
+
}
|
46 |
+
else {
|
47 |
+
$message = $this->__('Field successfully deleted.');
|
48 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
49 |
+
}
|
50 |
+
// get object type
|
51 |
+
$this->_redirect('*/*', array('_query' => array('selected_object_type' => $selected_object_type)));
|
52 |
+
}
|
53 |
+
|
54 |
+
public function updateAction() {
|
55 |
+
$success = TRUE;
|
56 |
+
try {
|
57 |
+
$post = $this->getRequest()->getPost();
|
58 |
+
$selected_row_ids = $post['gl_field_ids'];
|
59 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
60 |
+
$selected_object_type = $post['selected_object_type'];
|
61 |
+
$all_row_ids = Mage::helper("globallink")->getFieldIds($selected_object_type);
|
62 |
+
foreach ($selected_row_ids as $row_id) {
|
63 |
+
// Select All Checkbox is set to on if checked
|
64 |
+
if ($row_id == 'on') {
|
65 |
+
continue;
|
66 |
+
}
|
67 |
+
$field = Mage::getModel('globallink/glfield')->load($row_id);
|
68 |
+
$field->setData('include_in_translation', 1);
|
69 |
+
$field->save();
|
70 |
+
$key = array_search($row_id, $all_row_ids);
|
71 |
+
if ($key !== FALSE) {
|
72 |
+
unset($all_row_ids[$key]);
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
if (is_array($all_row_ids) && count($all_row_ids) > 0) {
|
77 |
+
Mage::helper("globallink")->gl_debug('all row ids', $all_row_ids);
|
78 |
+
foreach ($all_row_ids as $id) {
|
79 |
+
$field = Mage::getModel('globallink/glfield')->load($id);
|
80 |
+
$field->setData('include_in_translation', 0);
|
81 |
+
$field->save();
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
catch (SoapFault $sf) {
|
86 |
+
$success = FALSE;
|
87 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
88 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink WebService Error - ' . $sf->getMessage());
|
89 |
+
}
|
90 |
+
catch (Exception $ex) {
|
91 |
+
$success = FALSE;
|
92 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
93 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
94 |
+
}
|
95 |
+
|
96 |
+
if ($success) {
|
97 |
+
$message = $this->__('Configurations saved successfully.');
|
98 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
99 |
+
}
|
100 |
+
|
101 |
+
$this->_redirect('*/*', array('_query' => array('selected_object_type' => $selected_object_type)));
|
102 |
+
}
|
103 |
+
|
104 |
+
public function insertAction() {
|
105 |
+
$success = TRUE;
|
106 |
+
try {
|
107 |
+
$post = $this->getRequest()->getPost();
|
108 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
109 |
+
$selected_object_type = $post['selected_object_type'];
|
110 |
+
$field_code = $post['field_code'];
|
111 |
+
$field_name = $post['field_name'];
|
112 |
+
$include_in_translation = $post['include_in_translation'];
|
113 |
+
$where = "WHERE object_type = '$selected_object_type' AND field_code = '$field_code'";
|
114 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
115 |
+
$sql = " SELECT * FROM globallink_field $where ;";
|
116 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $sql);
|
117 |
+
$data = $db->query($sql)->fetch(PDO::FETCH_ASSOC);
|
118 |
+
|
119 |
+
if (!$data) {
|
120 |
+
$field = Mage::getModel('globallink/glfield');
|
121 |
+
$field->setData('object_type', $selected_object_type);
|
122 |
+
$field->setData('field_code', $field_code);
|
123 |
+
$field->setData('field_name', $field_name);
|
124 |
+
$field->setData('include_in_translation', $include_in_translation);
|
125 |
+
$field->setData('user_submitted', 1);
|
126 |
+
$field->save();
|
127 |
+
}
|
128 |
+
else {
|
129 |
+
$success = FALSE;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
catch (Exception $ex) {
|
133 |
+
$success = FALSE;
|
134 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
135 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
136 |
+
}
|
137 |
+
|
138 |
+
if ($success) {
|
139 |
+
$message = $this->__('Configurations saved successfully.');
|
140 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
141 |
+
}
|
142 |
+
else {
|
143 |
+
$message = $this->__('Configuration field already exist.');
|
144 |
+
Mage::getSingleton('adminhtml/session')->addError($message);
|
145 |
+
}
|
146 |
+
|
147 |
+
$this->_redirect('*/*', array('_query' => array('selected_object_type' => str_replace('%2F', '-', rawurlencode($selected_object_type)))));
|
148 |
+
}
|
149 |
+
|
150 |
+
|
151 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlnewslettertemplateController.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'gl_ws/GlobalLink.php';
|
17 |
+
require_once 'gl_ws/gl_ws_send_translations.php';
|
18 |
+
|
19 |
+
class Transperfect_Globallink_Adminhtml_GlnewslettertemplateController extends Mage_Adminhtml_Controller_Action {
|
20 |
+
|
21 |
+
public function indexAction() {
|
22 |
+
$this->loadLayout();
|
23 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
24 |
+
$this->renderLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
public function massAddAction() {
|
28 |
+
$object_type = Mage::helper("globallink")->_get_object_type_newsletter();
|
29 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Starting Object Upload.");
|
30 |
+
$post = $this->getRequest()->getPost();
|
31 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
32 |
+
|
33 |
+
$selected_newsletter_ids = $post['gl_newsletter_ids'];
|
34 |
+
if (count($selected_newsletter_ids) > 0) {
|
35 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][newsletter Id Selected]", $selected_newsletter_ids[0]);
|
36 |
+
Mage::getSingleton('adminhtml/session')->setData('gl_selected_ids', $selected_newsletter_ids[0]);
|
37 |
+
$this->_redirect('globallink/adminhtml_glcreatesubmission', array('_query' => array('gl_object_type' => $object_type)));
|
38 |
+
return $this;
|
39 |
+
}
|
40 |
+
else {
|
41 |
+
Mage::getSingleton('adminhtml/session')->addError('Please select a record.');
|
42 |
+
$this->_redirect('*/*');
|
43 |
+
return $this;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlproductController.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* � 2013 Translations.com, a TransPerfect company
|
4 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
5 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
6 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
7 |
+
*
|
8 |
+
* By making use of the Software, you agree
|
9 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
10 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
11 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
12 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
13 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
14 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
15 |
+
*/
|
16 |
+
|
17 |
+
require_once 'gl_ws/GlobalLink.php';
|
18 |
+
require_once 'gl_ws/gl_ws_send_translations.php';
|
19 |
+
|
20 |
+
class Transperfect_Globallink_Adminhtml_GlproductController extends Mage_Adminhtml_Controller_Action {
|
21 |
+
|
22 |
+
public function indexAction() {
|
23 |
+
$this->loadLayout();
|
24 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
25 |
+
$this->renderLayout();
|
26 |
+
//Mage::getModel('globallink/gltranslatecsv')->readCSVFile("en_US");
|
27 |
+
}
|
28 |
+
|
29 |
+
public function filterAction() {
|
30 |
+
$post = $this->getRequest()->getPost();
|
31 |
+
$radio = $post['globallink_product_filter'];
|
32 |
+
Mage::getSingleton('core/session')->unsProductFilter();
|
33 |
+
Mage::getSingleton('core/session')->setProductFilter($radio);
|
34 |
+
$store = $post['store_id'];
|
35 |
+
if ($store != '') {
|
36 |
+
$this->_redirect('globallink/adminhtml_glproduct', array('_query' => array('store' => $store)));
|
37 |
+
return $this;
|
38 |
+
}
|
39 |
+
else {
|
40 |
+
$this->_redirect('*/*');
|
41 |
+
return $this;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
public function massAddAction() {
|
46 |
+
$object_type = Mage::helper("globallink")->_get_object_type_product();
|
47 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Starting Object Upload.");
|
48 |
+
$post = $this->getRequest()->getPost();
|
49 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
50 |
+
$selected_store_id = $post['store'];
|
51 |
+
$selected_product_ids = $post['gl_product_ids'];
|
52 |
+
if (count($selected_product_ids) > 0) {
|
53 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Product Id Selected]", $selected_product_ids[0]);
|
54 |
+
Mage::getSingleton('adminhtml/session')->setData('gl_selected_ids', $selected_product_ids[0]);
|
55 |
+
$this->_redirect('globallink/adminhtml_glcreatesubmission', array('_query' => array('gl_object_type' => $object_type, 'store' => $selected_store_id)));
|
56 |
+
return $this;
|
57 |
+
}
|
58 |
+
else {
|
59 |
+
Mage::getSingleton('adminhtml/session')->addError('Please select a record.');
|
60 |
+
$this->_redirect('*/*');
|
61 |
+
return $this;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/GlreceivetranslationsController.php
ADDED
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'gl_ws/GlobalLink.php';
|
17 |
+
require_once 'gl_ws/gl_ws_receive_translations.php';
|
18 |
+
|
19 |
+
class Transperfect_Globallink_Adminhtml_GlreceivetranslationsController extends Mage_Adminhtml_Controller_Action {
|
20 |
+
|
21 |
+
public function indexAction() {
|
22 |
+
$this->loadLayout();
|
23 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
24 |
+
$this->renderLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
public function refreshAction() {
|
28 |
+
sleep(2);
|
29 |
+
$this->_redirect('*/*');
|
30 |
+
return $this;
|
31 |
+
}
|
32 |
+
|
33 |
+
public function updateAction() {
|
34 |
+
$success = TRUE;
|
35 |
+
$end_count = 0;
|
36 |
+
$start_count = 0;
|
37 |
+
try {
|
38 |
+
$translation = array();
|
39 |
+
$gl_arr = Mage::helper("globallink")->gl_get_all_completed_targets();
|
40 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Completed Targets]", $gl_arr);
|
41 |
+
foreach ($gl_arr as $globallink) {
|
42 |
+
$row_id = $globallink->glRowId;
|
43 |
+
$target_ticket = $globallink->targetTicket;
|
44 |
+
$what = 'status';
|
45 |
+
$where = 'WHERE globallink_job_id = ' . $row_id;
|
46 |
+
$result_arr = Mage::helper("globallink")->get_status_objects($what, $where, FALSE);
|
47 |
+
if ($result_arr[0]['status'] == Mage::helper("globallink")->_get_submission_status_ready() ||
|
48 |
+
$result_arr[0]['status'] == Mage::helper("globallink")->_get_submission_status_error()) {
|
49 |
+
try {
|
50 |
+
$start_count++;
|
51 |
+
$translated_content = downloadTargetResource($target_ticket);
|
52 |
+
$translation = array('row_id' => $row_id, 'target_locale' => $globallink->targetLocale,
|
53 |
+
'target_ticket' => $target_ticket, 'translated_content' => $translated_content);
|
54 |
+
$status = Mage::helper("globallink")->update_translated_record_in_magento($translation);
|
55 |
+
if ($status) {
|
56 |
+
Mage::helper("globallink")->update_gl_status($row_id, 'Translation Complete');
|
57 |
+
sendDownloadConfirmation($target_ticket);
|
58 |
+
$end_count++;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
catch (SoapFault $sf) {
|
62 |
+
// set status error here
|
63 |
+
$success = FALSE;
|
64 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ": Globallink WebService Error for [$globallink->glRowId][$globallink->objectType][$globallink->objectName]", $sf->getMessage());
|
65 |
+
Mage::helper("globallink")->update_gl_status($row_id, Mage::helper("globallink")->_get_submission_status_error());
|
66 |
+
}
|
67 |
+
catch (Exception $ex) {
|
68 |
+
$success = FALSE;
|
69 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ": Globallink Generic Error for [$globallink->glRowId][$globallink->objectType][$globallink->objectName]", $ex->getMessage());
|
70 |
+
Mage::helper("globallink")->update_gl_status($row_id, Mage::helper("globallink")->_get_submission_status_error());
|
71 |
+
}
|
72 |
+
}
|
73 |
+
else {
|
74 |
+
$what = 'object_name';
|
75 |
+
$where = 'WHERE globallink_job_id = ' . $row_id;
|
76 |
+
$result_arr = Mage::helper("globallink")->get_status_objects($what, $where, FALSE);
|
77 |
+
$message = $this->__($result_arr[0]['object_name'] . ' - source is deleted.');
|
78 |
+
Mage::getSingleton('adminhtml/session')->addError($message);
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
if ($end_count > 0) {
|
83 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "$end_count records successfully retrieved and imported");
|
84 |
+
$message = $this->__($end_count . ' translated documents retrieved and imported into Magento.');
|
85 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
86 |
+
if ($start_count != $end_count) {
|
87 |
+
$warning = "There was some error while importing $start_count documents into Magento. Please check logs for more details.";
|
88 |
+
Mage::getSingleton('adminhtml/session')->addWarning($warning);
|
89 |
+
}
|
90 |
+
}
|
91 |
+
else {
|
92 |
+
$message = $this->__($end_count . ' translated documents retrieved and imported into Magento.');
|
93 |
+
Mage::getSingleton('adminhtml/session')->addError($message);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
catch (SoapFault $sf) {
|
97 |
+
$success = FALSE;
|
98 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
99 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink WebService Error - ' . $sf->getMessage());
|
100 |
+
}
|
101 |
+
catch (Exception $ex) {
|
102 |
+
$success = FALSE;
|
103 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
104 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
105 |
+
}
|
106 |
+
|
107 |
+
sleep(3);
|
108 |
+
$this->_redirect('*/*');
|
109 |
+
return $this;
|
110 |
+
}
|
111 |
+
|
112 |
+
public function selectAction() {
|
113 |
+
$success = TRUE;
|
114 |
+
try {
|
115 |
+
$post = $this->getRequest()->getPost();
|
116 |
+
$row_ids = $post['gl_status_ids'];
|
117 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
118 |
+
$gl_arr = Mage::helper("globallink")->gl_get_all_completed_targets();
|
119 |
+
$completed_row_ids = array_keys($gl_arr);
|
120 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]completed row ids", $completed_row_ids);
|
121 |
+
$start_count = 0;
|
122 |
+
$end_count = 0;
|
123 |
+
// Select All Checkbox is set to on if checked
|
124 |
+
if ($row_ids[0] == 'on') {
|
125 |
+
unset($row_ids[0]);
|
126 |
+
}
|
127 |
+
foreach ($row_ids as $row_id) {
|
128 |
+
if (array_search($row_id, $completed_row_ids) !== FALSE) {
|
129 |
+
$glObj = $gl_arr[$row_id];
|
130 |
+
$target_ticket = $glObj->targetTicket;
|
131 |
+
$what = 'status';
|
132 |
+
$where = 'WHERE globallink_job_id = ' . $row_id;
|
133 |
+
$result_arr = Mage::helper("globallink")->get_status_objects($what, $where, FALSE);
|
134 |
+
if ($result_arr[0]['status'] != Mage::helper("globallink")->_get_submission_status_deleted() ||
|
135 |
+
$result_arr[0]['status'] == Mage::helper("globallink")->_get_submission_status_error()) {
|
136 |
+
try {
|
137 |
+
$start_count++;
|
138 |
+
$translated_content = downloadTargetResource($target_ticket);
|
139 |
+
$translated_arr = array('row_id' => $row_id, 'target_locale' => $glObj->targetLocale,
|
140 |
+
'target_ticket' => $target_ticket, 'translated_content' => $translated_content);
|
141 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Translations Array]", $translated_arr);
|
142 |
+
$status = Mage::helper("globallink")->update_translated_record_in_magento($translated_arr);
|
143 |
+
if ($status) {
|
144 |
+
Mage::helper("globallink")->update_gl_status($row_id, 'Translation Complete');
|
145 |
+
sendDownloadConfirmation($target_ticket);
|
146 |
+
$end_count++;
|
147 |
+
}
|
148 |
+
}
|
149 |
+
catch (SoapFault $sf) {
|
150 |
+
$success = FALSE;
|
151 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ": Globallink WebService Error for [$glObj->glRowId][$glObj->objectType][$glObj->objectName]", $sf->getMessage());
|
152 |
+
Mage::helper("globallink")->update_gl_status($row_id, Mage::helper("globallink")->_get_submission_status_error());
|
153 |
+
}
|
154 |
+
catch (Exception $ex) {
|
155 |
+
$success = FALSE;
|
156 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ": Globallink Generic Error for [$glObj->glRowId][$glObj->objectType][$glObj->objectName]", $ex->getMessage());
|
157 |
+
Mage::helper("globallink")->update_gl_status($row_id, Mage::helper("globallink")->_get_submission_status_error());
|
158 |
+
}
|
159 |
+
}
|
160 |
+
else {
|
161 |
+
$what = 'object_name';
|
162 |
+
$where = 'WHERE globallink_job_id = ' . $row_id;
|
163 |
+
$result_arr = Mage::helper("globallink")->get_status_objects($what, $where, FALSE);
|
164 |
+
$message = $this->__($result_arr[0]['object_name'] . ' - source is deleted.');
|
165 |
+
Mage::getSingleton('adminhtml/session')->addError($message);
|
166 |
+
}
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
if ($end_count > 0) {
|
171 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Successfully retrieved and imported");
|
172 |
+
$message = $this->__($end_count . ' translated documents retrieved and imported into Magento.');
|
173 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
174 |
+
if ($start_count != $end_count) {
|
175 |
+
$warning = "There was some error while importing $start_count documents into Magento. Please check logs for more details.";
|
176 |
+
Mage::getSingleton('adminhtml/session')->addWarning($warning);
|
177 |
+
}
|
178 |
+
}
|
179 |
+
else {
|
180 |
+
$message = $this->__($end_count . ' translated documents retrieved and imported into Magento.');
|
181 |
+
Mage::getSingleton('adminhtml/session')->addError($message);
|
182 |
+
}
|
183 |
+
}
|
184 |
+
catch (SoapFault $sf) {
|
185 |
+
$success = FALSE;
|
186 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
187 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink WebService Error - ' . $sf->getMessage());
|
188 |
+
}
|
189 |
+
catch (Exception $ex) {
|
190 |
+
$success = FALSE;
|
191 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
192 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
193 |
+
}
|
194 |
+
sleep(3);
|
195 |
+
$this->_redirect('*/*');
|
196 |
+
return $this;
|
197 |
+
}
|
198 |
+
|
199 |
+
function clearAction() {
|
200 |
+
$success = TRUE;
|
201 |
+
try {
|
202 |
+
$gl_arr = Mage::helper("globallink")->gl_get_all_completed_targets();
|
203 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Completed Targets]", $gl_arr);
|
204 |
+
$count = 0;
|
205 |
+
foreach ($gl_arr as $globallink) {
|
206 |
+
$row_id = $globallink->glRowId;
|
207 |
+
$target_ticket = $globallink->targetTicket;
|
208 |
+
try {
|
209 |
+
$where = " WHERE globallink_job_id = '" . $row_id . "'";
|
210 |
+
$status_arr = Mage::helper("globallink")->get_status_objects("status", $where, FALSE);
|
211 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Status Array]", $status_arr);
|
212 |
+
|
213 |
+
if ($status_arr[0]['status'] == Mage::helper("globallink")->_get_submission_status_deleted()) {
|
214 |
+
downloadTargetResource($target_ticket);
|
215 |
+
sendDownloadConfirmation($target_ticket);
|
216 |
+
$count++;
|
217 |
+
}
|
218 |
+
}
|
219 |
+
catch (SoapFault $sf) {
|
220 |
+
$success = FALSE;
|
221 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ": Globallink WebService Error for [$globallink->glRowId][$globallink->objectType][$globallink->objectName]", $sf->getMessage());
|
222 |
+
Mage::helper("globallink")->update_gl_status($row_id, 'Sent for Translations');
|
223 |
+
}
|
224 |
+
catch (Exception $ex) {
|
225 |
+
$success = FALSE;
|
226 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ": Globallink Generic Error for [$globallink->glRowId][$globallink->objectType][$globallink->objectName]", $ex->getMessage());
|
227 |
+
Mage::helper("globallink")->update_gl_status($row_id, 'Sent for Translations');
|
228 |
+
}
|
229 |
+
}
|
230 |
+
}
|
231 |
+
catch (SoapFault $sf) {
|
232 |
+
$success = FALSE;
|
233 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
234 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink WebService Error - ' . $sf->getMessage());
|
235 |
+
}
|
236 |
+
catch (Exception $ex) {
|
237 |
+
$success = FALSE;
|
238 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
239 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
240 |
+
}
|
241 |
+
|
242 |
+
if ($success) {
|
243 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", "Successfully Cleared Deleted Records");
|
244 |
+
$message = $this->__('Successfully cleared ' . $count);
|
245 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
246 |
+
}
|
247 |
+
|
248 |
+
sleep(1);
|
249 |
+
|
250 |
+
$this->_redirect('*/*');
|
251 |
+
return $this;
|
252 |
+
}
|
253 |
+
|
254 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/LocaleconfigController.php
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class Transperfect_Globallink_Adminhtml_LocaleconfigController extends Mage_Adminhtml_Controller_Action {
|
17 |
+
|
18 |
+
public function indexAction() {
|
19 |
+
$this->loadLayout();
|
20 |
+
$this->_addContent($this->getLayout()->createBlock('adminhtml/template')->setTemplate('globallink/adminhtml/localeconfig.phtml'));
|
21 |
+
$this->_setActiveMenu('globalLinkHeader/globallink_sendfortranslation');
|
22 |
+
$this->renderLayout();
|
23 |
+
}
|
24 |
+
|
25 |
+
public function editAction() {
|
26 |
+
$success = TRUE;
|
27 |
+
try {
|
28 |
+
$post = $this->getRequest()->getPost();
|
29 |
+
$mapped_locale_codes = $post['mapped_locale_code'];
|
30 |
+
|
31 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
32 |
+
|
33 |
+
$sql = "SELECT * FROM globallink_status WHERE status = '" . Mage::helper("globallink")->_get_submission_status_sent() . "' AND
|
34 |
+
(gl_source_locale IN ('" . implode("','", $mapped_locale_codes) . "') OR
|
35 |
+
gl_target_locale IN ('" . implode("','", $mapped_locale_codes) . "'));";
|
36 |
+
|
37 |
+
$rows = $db->query($sql)->fetch(PDO::FETCH_ASSOC);
|
38 |
+
|
39 |
+
if ($rows == "") {
|
40 |
+
$sql = "UPDATE globallink_locale SET store_id = NULL,
|
41 |
+
gl_default = 0 WHERE gl_locale_code IN ('" . implode("','", $mapped_locale_codes) . "');";
|
42 |
+
$db->query($sql);
|
43 |
+
}
|
44 |
+
else {
|
45 |
+
$success = FALSE;
|
46 |
+
$message = $this->__('Mapping delete unsuccessful. Cannot delete source or target mapping for active submissions.');
|
47 |
+
Mage::getSingleton('adminhtml/session')->addError($message);
|
48 |
+
}
|
49 |
+
}
|
50 |
+
catch (Exception $ex) {
|
51 |
+
$success = FALSE;
|
52 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
53 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
54 |
+
}
|
55 |
+
|
56 |
+
if ($success) {
|
57 |
+
$message = $this->__('Mapping deleted successfully.');
|
58 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
59 |
+
}
|
60 |
+
|
61 |
+
$this->_redirect('*/*');
|
62 |
+
}
|
63 |
+
|
64 |
+
public function postAction() {
|
65 |
+
$success = TRUE;
|
66 |
+
try {
|
67 |
+
$post = $this->getRequest()->getPost();
|
68 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $post);
|
69 |
+
|
70 |
+
$gl_locale = $post['gl_locale_code'];
|
71 |
+
$store_id = $post['gl_store'];
|
72 |
+
$gl_default = 0;
|
73 |
+
|
74 |
+
$project_language_arr = get_project_language_directions();
|
75 |
+
|
76 |
+
if (!array_key_exists($gl_locale, $project_language_arr)) {
|
77 |
+
throw new Exception($gl_locale . ' is not configured in GlobalLink');
|
78 |
+
}
|
79 |
+
|
80 |
+
if (isset($post['gl_default'])) {
|
81 |
+
$gl_default = $post['gl_default'];
|
82 |
+
}
|
83 |
+
|
84 |
+
if ($gl_default == 1) {
|
85 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
86 |
+
$sql = "UPDATE globallink_locale SET gl_default = 0 WHERE gl_default = 1;";
|
87 |
+
$db->query($sql);
|
88 |
+
}
|
89 |
+
|
90 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
91 |
+
$sql = "UPDATE globallink_locale SET store_id = " . $store_id . ",
|
92 |
+
gl_default = $gl_default WHERE gl_locale_code = '" . $gl_locale . "';";
|
93 |
+
|
94 |
+
$db->query($sql);
|
95 |
+
}
|
96 |
+
catch (Exception $ex) {
|
97 |
+
$success = FALSE;
|
98 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
99 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
100 |
+
}
|
101 |
+
|
102 |
+
if ($success) {
|
103 |
+
$message = $this->__('Mapping saved successfully.');
|
104 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
105 |
+
}
|
106 |
+
|
107 |
+
$this->_redirect('*/*');
|
108 |
+
}
|
109 |
+
|
110 |
+
public function defaultAction() {
|
111 |
+
$success = TRUE;
|
112 |
+
try {
|
113 |
+
$post = $this->getRequest()->getPost();
|
114 |
+
$store_id = $post['gl_store'];
|
115 |
+
|
116 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
117 |
+
$sql = "UPDATE globallink_locale SET gl_default = 0 WHERE gl_default = 1;";
|
118 |
+
$db->query($sql);
|
119 |
+
|
120 |
+
$sql1 = "UPDATE globallink_locale SET gl_default = 1 WHERE store_id = $store_id;";
|
121 |
+
$db->query($sql1);
|
122 |
+
}
|
123 |
+
catch (Exception $ex) {
|
124 |
+
$success = FALSE;
|
125 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
126 |
+
Mage::getSingleton('adminhtml/session')->addError('Globallink Generic Error - ' . $ex->getMessage());
|
127 |
+
}
|
128 |
+
|
129 |
+
if ($success) {
|
130 |
+
$message = $this->__('Default store changed successfully.');
|
131 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
132 |
+
}
|
133 |
+
|
134 |
+
$this->_redirect('*/*');
|
135 |
+
}
|
136 |
+
|
137 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/GlobalLink.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class GlobalLink {
|
17 |
+
|
18 |
+
public $documentTicket; //String
|
19 |
+
public $submissionTicket; //String
|
20 |
+
public $submissionName; //String
|
21 |
+
public $sourceLocale; //String
|
22 |
+
public $targetLocale; //String array
|
23 |
+
public $sourceXML; //String
|
24 |
+
public $targetTicket; //String
|
25 |
+
public $targetXML; //String
|
26 |
+
public $status; //String
|
27 |
+
public $glRowId; //String
|
28 |
+
public $objectId;//long
|
29 |
+
public $objectType;//String
|
30 |
+
public $objectName;//String
|
31 |
+
public $sourceFileName; //String
|
32 |
+
public $dueDate; //long
|
33 |
+
public $cancelled = FALSE; //boolean
|
34 |
+
public $glUserId;
|
35 |
+
public $glProjectId;
|
36 |
+
public $priority;
|
37 |
+
public $submissionInstructions; //String
|
38 |
+
|
39 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/ProjectDirector.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
class ProjectDirector {
|
17 |
+
|
18 |
+
public $url; //String
|
19 |
+
public $username; //String
|
20 |
+
public $password; //String
|
21 |
+
public $projectShortCode; //String
|
22 |
+
public $submissionPrefix; //String
|
23 |
+
public $classifier; //String
|
24 |
+
public $mimeType; //String
|
25 |
+
public $maxTargetCount;//String
|
26 |
+
public $filesPerSubmission;//Number
|
27 |
+
public $glUserId;
|
28 |
+
public $glProjectId;
|
29 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/client/DocumentService2.php
ADDED
@@ -0,0 +1,995 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
if (!class_exists("PDDate")) {
|
17 |
+
|
18 |
+
class PDDate {
|
19 |
+
|
20 |
+
public $critical; // boolean
|
21 |
+
public $date; // long
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
if (!class_exists("anonymous0")) {
|
28 |
+
|
29 |
+
class anonymous0 {
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
if (!class_exists("base64Binary")) {
|
36 |
+
|
37 |
+
class base64Binary {
|
38 |
+
|
39 |
+
public $_; // base64Binary
|
40 |
+
public $contentType; // anonymous0
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
if (!class_exists("hexBinary")) {
|
47 |
+
|
48 |
+
class hexBinary {
|
49 |
+
|
50 |
+
public $_; // hexBinary
|
51 |
+
public $contentType; // anonymous0
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
if (!class_exists("Notification")) {
|
58 |
+
|
59 |
+
class Notification {
|
60 |
+
|
61 |
+
public $errorMessage; // string
|
62 |
+
public $notificationDate; // Date
|
63 |
+
public $notificationPriority; // NotificationPriority
|
64 |
+
public $notificationText; // string
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
if (!class_exists("NotificationPriority")) {
|
71 |
+
|
72 |
+
class NotificationPriority {
|
73 |
+
|
74 |
+
public $notificationPriorityName; // string
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
if (!class_exists("Announcement")) {
|
81 |
+
|
82 |
+
class Announcement {
|
83 |
+
|
84 |
+
public $announcementText; // string
|
85 |
+
public $date; // Date
|
86 |
+
|
87 |
+
}
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
if (!class_exists("ContentMonitorPluginInfo")) {
|
92 |
+
|
93 |
+
class ContentMonitorPluginInfo {
|
94 |
+
|
95 |
+
public $pluginId; // string
|
96 |
+
public $pluginName; // string
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
if (!class_exists("Document")) {
|
103 |
+
|
104 |
+
class Document {
|
105 |
+
|
106 |
+
public $documentGroup; // DocumentGroup
|
107 |
+
public $documentInfo; // DocumentInfo
|
108 |
+
public $id; // string
|
109 |
+
public $sourceLanguage; // Language
|
110 |
+
public $sourceWordCount; // int
|
111 |
+
public $ticket; // string
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
}
|
116 |
+
|
117 |
+
if (!class_exists("DocumentGroup")) {
|
118 |
+
|
119 |
+
class DocumentGroup {
|
120 |
+
|
121 |
+
public $classifier; // string
|
122 |
+
public $documents; // Document
|
123 |
+
public $mimeType; // string
|
124 |
+
public $submission; // Submission
|
125 |
+
|
126 |
+
}
|
127 |
+
|
128 |
+
}
|
129 |
+
|
130 |
+
if (!class_exists("DocumentInfo")) {
|
131 |
+
|
132 |
+
class DocumentInfo {
|
133 |
+
|
134 |
+
public $clientIdentifier; // string
|
135 |
+
public $dateRequested; // Date
|
136 |
+
public $instructions; // string
|
137 |
+
public $metadata; // Metadata
|
138 |
+
public $name; // string
|
139 |
+
public $projectTicket; // string
|
140 |
+
public $sourceLocale; // string
|
141 |
+
public $submissionTicket; // string
|
142 |
+
public $targetInfos; // TargetInfo
|
143 |
+
public $wordCount; // int
|
144 |
+
|
145 |
+
}
|
146 |
+
|
147 |
+
}
|
148 |
+
|
149 |
+
if (!class_exists("DocumentPagedList")) {
|
150 |
+
|
151 |
+
class DocumentPagedList {
|
152 |
+
|
153 |
+
public $elements; // Document
|
154 |
+
public $pagedListInfo; // PagedListInfo
|
155 |
+
public $tasks; // Task
|
156 |
+
public $totalCount; // long
|
157 |
+
|
158 |
+
}
|
159 |
+
|
160 |
+
}
|
161 |
+
|
162 |
+
if (!class_exists("DocumentSearchRequest")) {
|
163 |
+
|
164 |
+
class DocumentSearchRequest {
|
165 |
+
|
166 |
+
public $projectTickets; // string
|
167 |
+
public $sourceLocaleId; // string
|
168 |
+
public $submissionTicket; // string
|
169 |
+
|
170 |
+
}
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
if (!class_exists("DocumentTicket")) {
|
175 |
+
|
176 |
+
class DocumentTicket {
|
177 |
+
|
178 |
+
public $submissionTicket; // string
|
179 |
+
public $ticketId; // string
|
180 |
+
|
181 |
+
}
|
182 |
+
|
183 |
+
}
|
184 |
+
|
185 |
+
if (!class_exists("EntityTypeEnum")) {
|
186 |
+
|
187 |
+
class EntityTypeEnum {
|
188 |
+
|
189 |
+
public $name; // string
|
190 |
+
public $value; // int
|
191 |
+
|
192 |
+
}
|
193 |
+
|
194 |
+
}
|
195 |
+
|
196 |
+
if (!class_exists("FileFormatProfile")) {
|
197 |
+
|
198 |
+
class FileFormatProfile {
|
199 |
+
|
200 |
+
public $configurable; // boolean
|
201 |
+
public $isDefault; // boolean
|
202 |
+
public $mimeType; // string
|
203 |
+
public $pluginId; // string
|
204 |
+
public $pluginName; // string
|
205 |
+
public $profileName; // string
|
206 |
+
public $targetWorkflowDefinition; // WorkflowDefinition
|
207 |
+
public $ticket; // string
|
208 |
+
|
209 |
+
}
|
210 |
+
|
211 |
+
}
|
212 |
+
|
213 |
+
if (!class_exists("FileFormatProgressData")) {
|
214 |
+
|
215 |
+
class FileFormatProgressData {
|
216 |
+
|
217 |
+
public $dateCompleted; // Date
|
218 |
+
public $fileCount; // long
|
219 |
+
public $fileFormatName; // string
|
220 |
+
public $fileProgressData; // FileProgressData
|
221 |
+
public $jobTicket; // string
|
222 |
+
public $workflowDueDate; // Date
|
223 |
+
public $workflowStatus; // string
|
224 |
+
|
225 |
+
}
|
226 |
+
|
227 |
+
}
|
228 |
+
|
229 |
+
if (!class_exists("FileProgressData")) {
|
230 |
+
|
231 |
+
class FileProgressData {
|
232 |
+
|
233 |
+
public $numberOfAvailableFiles; // int
|
234 |
+
public $numberOfCanceledFiles; // int
|
235 |
+
public $numberOfCompletedFiles; // int
|
236 |
+
public $numberOfDeliveredFiles; // int
|
237 |
+
public $numberOfFailedFiles; // int
|
238 |
+
public $numberOfInProcessFiles; // int
|
239 |
+
public $overallProgressPercent; // int
|
240 |
+
|
241 |
+
}
|
242 |
+
|
243 |
+
}
|
244 |
+
|
245 |
+
if (!class_exists("FuzzyTmStatistics")) {
|
246 |
+
|
247 |
+
class FuzzyTmStatistics {
|
248 |
+
|
249 |
+
public $fuzzyName; // string
|
250 |
+
public $wordCount; // int
|
251 |
+
|
252 |
+
}
|
253 |
+
|
254 |
+
}
|
255 |
+
|
256 |
+
if (!class_exists("ItemFolderEnum")) {
|
257 |
+
|
258 |
+
class ItemFolderEnum {
|
259 |
+
|
260 |
+
public $value; // int
|
261 |
+
|
262 |
+
}
|
263 |
+
|
264 |
+
}
|
265 |
+
|
266 |
+
if (!class_exists("ItemStatusEnum")) {
|
267 |
+
|
268 |
+
class ItemStatusEnum {
|
269 |
+
|
270 |
+
public $name; // string
|
271 |
+
public $value; // int
|
272 |
+
|
273 |
+
}
|
274 |
+
|
275 |
+
}
|
276 |
+
|
277 |
+
if (!class_exists("Metadata")) {
|
278 |
+
|
279 |
+
class Metadata {
|
280 |
+
|
281 |
+
public $key; // string
|
282 |
+
public $value; // string
|
283 |
+
|
284 |
+
}
|
285 |
+
|
286 |
+
}
|
287 |
+
|
288 |
+
if (!class_exists("Language")) {
|
289 |
+
|
290 |
+
class Language {
|
291 |
+
|
292 |
+
public $locale; // string
|
293 |
+
public $value; // string
|
294 |
+
|
295 |
+
}
|
296 |
+
|
297 |
+
}
|
298 |
+
|
299 |
+
if (!class_exists("LanguageDirection")) {
|
300 |
+
|
301 |
+
class LanguageDirection {
|
302 |
+
|
303 |
+
public $sourceLanguage; // Language
|
304 |
+
public $targetLanguage; // Language
|
305 |
+
|
306 |
+
}
|
307 |
+
|
308 |
+
}
|
309 |
+
|
310 |
+
if (!class_exists("LanguageDirectionModel")) {
|
311 |
+
|
312 |
+
class LanguageDirectionModel {
|
313 |
+
|
314 |
+
public $dateCompleted; // Date
|
315 |
+
public $fileCount; // long
|
316 |
+
public $fileFormatProgressData; // FileFormatProgressData
|
317 |
+
public $fileProgress; // FileProgressData
|
318 |
+
public $sourceLanguage; // Language
|
319 |
+
public $targetLanguage; // Language
|
320 |
+
public $workflowDueDate; // Date
|
321 |
+
public $workflowStatus; // string
|
322 |
+
|
323 |
+
}
|
324 |
+
|
325 |
+
}
|
326 |
+
|
327 |
+
if (!class_exists("PagedListInfo")) {
|
328 |
+
|
329 |
+
class PagedListInfo {
|
330 |
+
|
331 |
+
public $index; // int
|
332 |
+
public $indexesSize; // int
|
333 |
+
public $size; // int
|
334 |
+
public $sortDirection; // string
|
335 |
+
public $sortProperty; // string
|
336 |
+
|
337 |
+
}
|
338 |
+
|
339 |
+
}
|
340 |
+
|
341 |
+
if (!class_exists("Phase")) {
|
342 |
+
|
343 |
+
class Phase {
|
344 |
+
|
345 |
+
public $dateEnded; // Date
|
346 |
+
public $dueDate; // Date
|
347 |
+
public $name; // string
|
348 |
+
public $status; // ItemStatusEnum
|
349 |
+
|
350 |
+
}
|
351 |
+
|
352 |
+
}
|
353 |
+
|
354 |
+
if (!class_exists("Priority")) {
|
355 |
+
|
356 |
+
class Priority {
|
357 |
+
|
358 |
+
public $name; // string
|
359 |
+
public $value; // int
|
360 |
+
|
361 |
+
}
|
362 |
+
|
363 |
+
}
|
364 |
+
|
365 |
+
if (!class_exists("Project")) {
|
366 |
+
|
367 |
+
class Project {
|
368 |
+
|
369 |
+
public $announcements; // Announcement
|
370 |
+
public $contentMonitorPluginInfo; // ContentMonitorPluginInfo
|
371 |
+
public $defaultLanguageDirections; // LanguageDirection
|
372 |
+
public $defaultTargetWorkflowDefinition; // WorkflowDefinition
|
373 |
+
public $defaultTargetWorkflowDefinitionTicket; // string
|
374 |
+
public $fileFormatProfiles; // FileFormatProfile
|
375 |
+
public $frequentLanguageDirections; // LanguageDirection
|
376 |
+
public $metadata; // Metadata
|
377 |
+
public $organizationName; // string
|
378 |
+
public $projectInfo; // ProjectInfo
|
379 |
+
public $projectLanguageDirections; // LanguageDirection
|
380 |
+
public $ticket; // string
|
381 |
+
public $workflowDefinitions; // WorkflowDefinition
|
382 |
+
|
383 |
+
}
|
384 |
+
|
385 |
+
}
|
386 |
+
|
387 |
+
if (!class_exists("ProjectInfo")) {
|
388 |
+
|
389 |
+
class ProjectInfo {
|
390 |
+
|
391 |
+
public $clientIdentifier; // string
|
392 |
+
public $defaultJobWorkflowDefinitionTicket; // string
|
393 |
+
public $defaultSubmissionWorkflowDefinitionTicket; // string
|
394 |
+
public $defaultTargetWorkflowDefinitionTicket; // string
|
395 |
+
public $enabled; // boolean
|
396 |
+
public $name; // string
|
397 |
+
public $shortCode; // string
|
398 |
+
|
399 |
+
}
|
400 |
+
|
401 |
+
}
|
402 |
+
|
403 |
+
if (!class_exists("ProjectLanguage")) {
|
404 |
+
|
405 |
+
class ProjectLanguage {
|
406 |
+
|
407 |
+
public $customLocaleCode; // string
|
408 |
+
public $localeCode; // string
|
409 |
+
|
410 |
+
}
|
411 |
+
|
412 |
+
}
|
413 |
+
|
414 |
+
if (!class_exists("RepositoryItem")) {
|
415 |
+
|
416 |
+
class RepositoryItem {
|
417 |
+
|
418 |
+
public $data; // base64Binary
|
419 |
+
public $resourceInfo; // ResourceInfo
|
420 |
+
|
421 |
+
}
|
422 |
+
|
423 |
+
}
|
424 |
+
|
425 |
+
if (!class_exists("ResourceInfo")) {
|
426 |
+
|
427 |
+
class ResourceInfo {
|
428 |
+
|
429 |
+
public $classifier; // string
|
430 |
+
public $clientIdentifier; // string
|
431 |
+
public $description; // string
|
432 |
+
public $encoding; // string
|
433 |
+
public $md5Checksum; // string
|
434 |
+
public $mimeType; // string
|
435 |
+
public $name; // string
|
436 |
+
public $path; // string
|
437 |
+
public $resourceInfoId; // long
|
438 |
+
public $size; // long
|
439 |
+
public $type; // ResourceType
|
440 |
+
|
441 |
+
}
|
442 |
+
|
443 |
+
}
|
444 |
+
|
445 |
+
if (!class_exists("ResourceType")) {
|
446 |
+
|
447 |
+
class ResourceType {
|
448 |
+
|
449 |
+
public $value; // int
|
450 |
+
|
451 |
+
}
|
452 |
+
|
453 |
+
}
|
454 |
+
|
455 |
+
if (!class_exists("Submission")) {
|
456 |
+
|
457 |
+
class Submission {
|
458 |
+
|
459 |
+
public $alerts; // Notification
|
460 |
+
public $availableTasks; // int
|
461 |
+
public $dateCompleted; // Date
|
462 |
+
public $dateCreated; // Date
|
463 |
+
public $dateEstimated; // Date
|
464 |
+
public $documents; // Document
|
465 |
+
public $dueDate; // Date
|
466 |
+
public $id; // string
|
467 |
+
public $owner; // string
|
468 |
+
public $project; // Project
|
469 |
+
public $status; // ItemStatusEnum
|
470 |
+
public $submissionInfo; // SubmissionInfo
|
471 |
+
public $submitter; // string
|
472 |
+
public $submitterFullName; // string
|
473 |
+
public $ticket; // string
|
474 |
+
public $workflowDefinition; // WorkflowDefinition
|
475 |
+
|
476 |
+
}
|
477 |
+
|
478 |
+
}
|
479 |
+
|
480 |
+
if (!class_exists("SubmissionInfo")) {
|
481 |
+
|
482 |
+
class SubmissionInfo {
|
483 |
+
|
484 |
+
public $clientIdentifier; // string
|
485 |
+
public $dateRequested; // Date
|
486 |
+
public $metadata; // Metadata
|
487 |
+
public $name; // string
|
488 |
+
public $projectTicket; // string
|
489 |
+
public $submitter; // string
|
490 |
+
public $workflowDefinitionTicket; // string
|
491 |
+
|
492 |
+
}
|
493 |
+
|
494 |
+
}
|
495 |
+
|
496 |
+
if (!class_exists("SubmissionPagedList")) {
|
497 |
+
|
498 |
+
class SubmissionPagedList {
|
499 |
+
|
500 |
+
public $elements; // Submission
|
501 |
+
public $pagedListInfo; // PagedListInfo
|
502 |
+
public $tasks; // Task
|
503 |
+
public $totalCount; // long
|
504 |
+
|
505 |
+
}
|
506 |
+
|
507 |
+
}
|
508 |
+
|
509 |
+
if (!class_exists("SimpleSubmissionSearchModel")) {
|
510 |
+
|
511 |
+
class SimpleSubmissionSearchModel {
|
512 |
+
|
513 |
+
public $alerts; // Notification
|
514 |
+
public $availableTasks; // long
|
515 |
+
public $date; // Date
|
516 |
+
public $dateCompleted; // Date
|
517 |
+
public $dueDate; // Date
|
518 |
+
public $fileCount; // long
|
519 |
+
public $fileProgress; // FileProgressData
|
520 |
+
public $id; // string
|
521 |
+
public $instructions; // string
|
522 |
+
public $officeName; // string
|
523 |
+
public $owner; // string
|
524 |
+
public $priority; // string
|
525 |
+
public $projectName; // string
|
526 |
+
public $projectTicket; // string
|
527 |
+
public $sourceLanguage; // string
|
528 |
+
public $status; // ItemStatusEnum
|
529 |
+
public $submissionName; // string
|
530 |
+
public $submitterFullName; // string
|
531 |
+
public $ticket; // string
|
532 |
+
public $wordCount; // long
|
533 |
+
public $workflowDueDate; // Date
|
534 |
+
public $workflowStatus; // string
|
535 |
+
|
536 |
+
}
|
537 |
+
|
538 |
+
}
|
539 |
+
|
540 |
+
if (!class_exists("SubmissionSearchModelPagedList")) {
|
541 |
+
|
542 |
+
class SubmissionSearchModelPagedList {
|
543 |
+
|
544 |
+
public $elements; // SimpleSubmissionSearchModel
|
545 |
+
public $pagedListInfo; // PagedListInfo
|
546 |
+
public $tasks; // Task
|
547 |
+
public $totalCount; // long
|
548 |
+
|
549 |
+
}
|
550 |
+
|
551 |
+
}
|
552 |
+
|
553 |
+
if (!class_exists("SubmissionSearchRequest")) {
|
554 |
+
|
555 |
+
class SubmissionSearchRequest {
|
556 |
+
|
557 |
+
public $folder; // ItemFolderEnum
|
558 |
+
public $projectTickets; // string
|
559 |
+
public $submissionDate; // Date
|
560 |
+
public $submissionDueDate; // Date
|
561 |
+
public $submissionName; // string
|
562 |
+
|
563 |
+
}
|
564 |
+
|
565 |
+
}
|
566 |
+
|
567 |
+
if (!class_exists("Target")) {
|
568 |
+
|
569 |
+
class Target {
|
570 |
+
|
571 |
+
public $availableTasks; // long
|
572 |
+
public $dateCompleted; // Date
|
573 |
+
public $dateCreated; // Date
|
574 |
+
public $dateEstimated; // Date
|
575 |
+
public $document; // Document
|
576 |
+
public $downloadThresholdTimeStamp; // Date
|
577 |
+
public $dueDate; // Date
|
578 |
+
public $fileName; // string
|
579 |
+
public $id; // string
|
580 |
+
public $phases; // Phase
|
581 |
+
public $refPhase; // Phase
|
582 |
+
public $sourceLanguage; // Language
|
583 |
+
public $sourceWordCount; // int
|
584 |
+
public $status; // ItemStatusEnum
|
585 |
+
public $targetInfo; // TargetInfo
|
586 |
+
public $targetLanguage; // Language
|
587 |
+
public $targetWordCount; // int
|
588 |
+
public $ticket; // string
|
589 |
+
public $tmStatistics; // TmStatistics
|
590 |
+
public $workflowDefinition; // WorkflowDefinition
|
591 |
+
|
592 |
+
}
|
593 |
+
|
594 |
+
}
|
595 |
+
|
596 |
+
if (!class_exists("TargetInfo")) {
|
597 |
+
|
598 |
+
class TargetInfo {
|
599 |
+
|
600 |
+
public $dateRequested; // Date
|
601 |
+
public $encoding; // string
|
602 |
+
public $instructions; // string
|
603 |
+
public $metadata; // Metadata
|
604 |
+
public $priority; // Priority
|
605 |
+
public $requestedDueDate; // long
|
606 |
+
public $targetLocale; // string
|
607 |
+
public $workflowDefinitionTicket; // string
|
608 |
+
|
609 |
+
}
|
610 |
+
|
611 |
+
}
|
612 |
+
|
613 |
+
if (!class_exists("TargetPagedList")) {
|
614 |
+
|
615 |
+
class TargetPagedList {
|
616 |
+
|
617 |
+
public $elements; // Target
|
618 |
+
public $pagedListInfo; // PagedListInfo
|
619 |
+
public $tasks; // Task
|
620 |
+
public $totalCount; // long
|
621 |
+
|
622 |
+
}
|
623 |
+
|
624 |
+
}
|
625 |
+
|
626 |
+
if (!class_exists("TargetSearchRequest")) {
|
627 |
+
|
628 |
+
class TargetSearchRequest {
|
629 |
+
|
630 |
+
public $dateCreated; // Date
|
631 |
+
public $folder; // ItemFolderEnum
|
632 |
+
public $projectTickets; // string
|
633 |
+
public $sourceLocaleId; // string
|
634 |
+
public $submissionTicket; // string
|
635 |
+
public $targetLocaleId; // string
|
636 |
+
|
637 |
+
}
|
638 |
+
|
639 |
+
}
|
640 |
+
|
641 |
+
if (!class_exists("Task")) {
|
642 |
+
|
643 |
+
class Task {
|
644 |
+
|
645 |
+
public $groupName; // string
|
646 |
+
public $selectStyle; // int
|
647 |
+
public $taskId; // long
|
648 |
+
public $taskName; // string
|
649 |
+
public $weight; // int
|
650 |
+
|
651 |
+
}
|
652 |
+
|
653 |
+
}
|
654 |
+
|
655 |
+
if (!class_exists("TmStatistics")) {
|
656 |
+
|
657 |
+
class TmStatistics {
|
658 |
+
|
659 |
+
public $fuzzyWordCount1; // FuzzyTmStatistics
|
660 |
+
public $fuzzyWordCount10; // FuzzyTmStatistics
|
661 |
+
public $fuzzyWordCount2; // FuzzyTmStatistics
|
662 |
+
public $fuzzyWordCount3; // FuzzyTmStatistics
|
663 |
+
public $fuzzyWordCount4; // FuzzyTmStatistics
|
664 |
+
public $fuzzyWordCount5; // FuzzyTmStatistics
|
665 |
+
public $fuzzyWordCount6; // FuzzyTmStatistics
|
666 |
+
public $fuzzyWordCount7; // FuzzyTmStatistics
|
667 |
+
public $fuzzyWordCount8; // FuzzyTmStatistics
|
668 |
+
public $fuzzyWordCount9; // FuzzyTmStatistics
|
669 |
+
public $goldWordCount; // int
|
670 |
+
public $noMatchWordCount; // int
|
671 |
+
public $oneHundredMatchWordCount; // int
|
672 |
+
public $repetitionWordCount; // int
|
673 |
+
public $totalWordCount; // int
|
674 |
+
|
675 |
+
}
|
676 |
+
|
677 |
+
}
|
678 |
+
|
679 |
+
if (!class_exists("WorkflowDefinition")) {
|
680 |
+
|
681 |
+
class WorkflowDefinition {
|
682 |
+
|
683 |
+
public $description; // string
|
684 |
+
public $name; // string
|
685 |
+
public $ticket; // string
|
686 |
+
public $type; // EntityTypeEnum
|
687 |
+
|
688 |
+
}
|
689 |
+
|
690 |
+
}
|
691 |
+
|
692 |
+
if (!class_exists("UserInfo")) {
|
693 |
+
|
694 |
+
class UserInfo {
|
695 |
+
|
696 |
+
public $accountNonExpired; // boolean
|
697 |
+
public $accountNonLocked; // boolean
|
698 |
+
public $autoClaimMultipleTasks; // boolean
|
699 |
+
public $claimMultipleJobTasks; // boolean
|
700 |
+
public $credentialsNonExpired; // boolean
|
701 |
+
public $dateLastLogin; // dateTime
|
702 |
+
public $emailAddress; // string
|
703 |
+
public $emailNotification; // boolean
|
704 |
+
public $enabled; // boolean
|
705 |
+
public $firstName; // string
|
706 |
+
public $lastName; // string
|
707 |
+
public $password; // string
|
708 |
+
public $timeZone; // string
|
709 |
+
public $userName; // string
|
710 |
+
public $userType; // string
|
711 |
+
|
712 |
+
}
|
713 |
+
|
714 |
+
}
|
715 |
+
|
716 |
+
if (!class_exists("TiUserInfo")) {
|
717 |
+
|
718 |
+
class TiUserInfo {
|
719 |
+
|
720 |
+
public $languageDirections; // LanguageDirection
|
721 |
+
public $organizationId; // long
|
722 |
+
public $projectRoles; // string
|
723 |
+
public $projectTicket; // string
|
724 |
+
public $systemRoles; // string
|
725 |
+
public $vendorId; // long
|
726 |
+
|
727 |
+
}
|
728 |
+
|
729 |
+
}
|
730 |
+
|
731 |
+
if (!class_exists("cancelDocument")) {
|
732 |
+
|
733 |
+
class cancelDocument {
|
734 |
+
|
735 |
+
public $documentTicket; // DocumentTicket
|
736 |
+
public $userId; // string
|
737 |
+
|
738 |
+
}
|
739 |
+
|
740 |
+
}
|
741 |
+
|
742 |
+
if (!class_exists("cancelDocumentResponse")) {
|
743 |
+
|
744 |
+
class cancelDocumentResponse {
|
745 |
+
|
746 |
+
public $return; // string
|
747 |
+
|
748 |
+
}
|
749 |
+
|
750 |
+
}
|
751 |
+
|
752 |
+
if (!class_exists("findByTicket")) {
|
753 |
+
|
754 |
+
class findByTicket {
|
755 |
+
|
756 |
+
public $ticket; // string
|
757 |
+
public $userId; // string
|
758 |
+
|
759 |
+
}
|
760 |
+
|
761 |
+
}
|
762 |
+
|
763 |
+
if (!class_exists("findByTicketResponse")) {
|
764 |
+
|
765 |
+
class findByTicketResponse {
|
766 |
+
|
767 |
+
public $return; // Document
|
768 |
+
|
769 |
+
}
|
770 |
+
|
771 |
+
}
|
772 |
+
|
773 |
+
if (!class_exists("search")) {
|
774 |
+
|
775 |
+
class search {
|
776 |
+
|
777 |
+
public $command; // DocumentSearchRequest
|
778 |
+
public $info; // PagedListInfo
|
779 |
+
public $userId; // string
|
780 |
+
|
781 |
+
}
|
782 |
+
|
783 |
+
}
|
784 |
+
|
785 |
+
if (!class_exists("searchResponse")) {
|
786 |
+
|
787 |
+
class searchResponse {
|
788 |
+
|
789 |
+
public $return; // DocumentPagedList
|
790 |
+
|
791 |
+
}
|
792 |
+
|
793 |
+
}
|
794 |
+
|
795 |
+
if (!class_exists("submitDocumentWithBinaryResource")) {
|
796 |
+
|
797 |
+
class submitDocumentWithBinaryResource {
|
798 |
+
|
799 |
+
public $documentInfo; // DocumentInfo
|
800 |
+
public $resourceInfo; // ResourceInfo
|
801 |
+
public $data; // base64Binary
|
802 |
+
public $userId; // string
|
803 |
+
|
804 |
+
}
|
805 |
+
|
806 |
+
}
|
807 |
+
|
808 |
+
if (!class_exists("submitDocumentWithBinaryResourceResponse")) {
|
809 |
+
|
810 |
+
class submitDocumentWithBinaryResourceResponse {
|
811 |
+
|
812 |
+
public $return; // DocumentTicket
|
813 |
+
|
814 |
+
}
|
815 |
+
|
816 |
+
}
|
817 |
+
|
818 |
+
if (!class_exists("submitDocumentWithTextResource")) {
|
819 |
+
|
820 |
+
class submitDocumentWithTextResource {
|
821 |
+
|
822 |
+
public $documentInfo; // DocumentInfo
|
823 |
+
public $resourceInfo; // ResourceInfo
|
824 |
+
public $data; // string
|
825 |
+
public $userId; // string
|
826 |
+
|
827 |
+
}
|
828 |
+
|
829 |
+
}
|
830 |
+
|
831 |
+
if (!class_exists("submitDocumentWithTextResourceResponse")) {
|
832 |
+
|
833 |
+
class submitDocumentWithTextResourceResponse {
|
834 |
+
|
835 |
+
public $return; // DocumentTicket
|
836 |
+
|
837 |
+
}
|
838 |
+
|
839 |
+
}
|
840 |
+
|
841 |
+
/**
|
842 |
+
* DocumentService2 class
|
843 |
+
*
|
844 |
+
*
|
845 |
+
*
|
846 |
+
* @author {author}
|
847 |
+
* @copyright {copyright}
|
848 |
+
* @package {package}
|
849 |
+
*/
|
850 |
+
class DocumentService2 extends SoapClient {
|
851 |
+
|
852 |
+
private static $classmap = array(
|
853 |
+
'anonymous0' => 'anonymous0',
|
854 |
+
'base64Binary' => 'base64Binary',
|
855 |
+
'hexBinary' => 'hexBinary',
|
856 |
+
'Notification' => 'Notification',
|
857 |
+
'NotificationPriority' => 'NotificationPriority',
|
858 |
+
'Announcement' => 'Announcement',
|
859 |
+
'ContentMonitorPluginInfo' => 'ContentMonitorPluginInfo',
|
860 |
+
'DDate' => 'PDDate',
|
861 |
+
'Document' => 'Document',
|
862 |
+
'DocumentGroup' => 'DocumentGroup',
|
863 |
+
'DocumentInfo' => 'DocumentInfo',
|
864 |
+
'DocumentPagedList' => 'DocumentPagedList',
|
865 |
+
'DocumentSearchRequest' => 'DocumentSearchRequest',
|
866 |
+
'DocumentTicket' => 'DocumentTicket',
|
867 |
+
'EntityTypeEnum' => 'EntityTypeEnum',
|
868 |
+
'FileFormatProfile' => 'FileFormatProfile',
|
869 |
+
'FileFormatProgressData' => 'FileFormatProgressData',
|
870 |
+
'FileProgressData' => 'FileProgressData',
|
871 |
+
'FuzzyTmStatistics' => 'FuzzyTmStatistics',
|
872 |
+
'ItemFolderEnum' => 'ItemFolderEnum',
|
873 |
+
'ItemStatusEnum' => 'ItemStatusEnum',
|
874 |
+
'Metadata' => 'Metadata',
|
875 |
+
'Language' => 'Language',
|
876 |
+
'LanguageDirection' => 'LanguageDirection',
|
877 |
+
'LanguageDirectionModel' => 'LanguageDirectionModel',
|
878 |
+
'PagedListInfo' => 'PagedListInfo',
|
879 |
+
'Phase' => 'Phase',
|
880 |
+
'Priority' => 'Priority',
|
881 |
+
'Project' => 'Project',
|
882 |
+
'ProjectInfo' => 'ProjectInfo',
|
883 |
+
'ProjectLanguage' => 'ProjectLanguage',
|
884 |
+
'RepositoryItem' => 'RepositoryItem',
|
885 |
+
'ResourceInfo' => 'ResourceInfo',
|
886 |
+
'ResourceType' => 'ResourceType',
|
887 |
+
'Submission' => 'Submission',
|
888 |
+
'SubmissionInfo' => 'SubmissionInfo',
|
889 |
+
'SubmissionPagedList' => 'SubmissionPagedList',
|
890 |
+
'SimpleSubmissionSearchModel' => 'SimpleSubmissionSearchModel',
|
891 |
+
'SubmissionSearchModelPagedList' => 'SubmissionSearchModelPagedList',
|
892 |
+
'SubmissionSearchRequest' => 'SubmissionSearchRequest',
|
893 |
+
'Target' => 'Target',
|
894 |
+
'TargetInfo' => 'TargetInfo',
|
895 |
+
'TargetPagedList' => 'TargetPagedList',
|
896 |
+
'TargetSearchRequest' => 'TargetSearchRequest',
|
897 |
+
'Task' => 'Task',
|
898 |
+
'TmStatistics' => 'TmStatistics',
|
899 |
+
'WorkflowDefinition' => 'WorkflowDefinition',
|
900 |
+
'UserInfo' => 'UserInfo',
|
901 |
+
'TiUserInfo' => 'TiUserInfo',
|
902 |
+
'cancelDocument' => 'cancelDocument',
|
903 |
+
'cancelDocumentResponse' => 'cancelDocumentResponse',
|
904 |
+
'findByTicket' => 'findByTicket',
|
905 |
+
'findByTicketResponse' => 'findByTicketResponse',
|
906 |
+
'search' => 'search',
|
907 |
+
'searchResponse' => 'searchResponse',
|
908 |
+
'submitDocumentWithBinaryResource' => 'submitDocumentWithBinaryResource',
|
909 |
+
'submitDocumentWithBinaryResourceResponse' => 'submitDocumentWithBinaryResourceResponse',
|
910 |
+
'submitDocumentWithTextResource' => 'submitDocumentWithTextResource',
|
911 |
+
'submitDocumentWithTextResourceResponse' => 'submitDocumentWithTextResourceResponse',
|
912 |
+
);
|
913 |
+
|
914 |
+
public function DocumentService2($wsdl = "http://localhost:8080/pd4/services/DocumentService2?wsdl", $options = array()) {
|
915 |
+
foreach (self::$classmap as $key => $value) {
|
916 |
+
if (!isset($options['classmap'][$key])) {
|
917 |
+
$options['classmap'][$key] = $value;
|
918 |
+
}
|
919 |
+
}
|
920 |
+
parent::__construct($wsdl, $options);
|
921 |
+
}
|
922 |
+
|
923 |
+
/**
|
924 |
+
*
|
925 |
+
*
|
926 |
+
* @param findByTicket $parameters
|
927 |
+
* @return findByTicketResponse
|
928 |
+
*/
|
929 |
+
public function findByTicket(findByTicket $parameters) {
|
930 |
+
return $this->__soapCall('findByTicket', array($parameters), array(
|
931 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
932 |
+
'soapaction' => ''
|
933 |
+
)
|
934 |
+
);
|
935 |
+
}
|
936 |
+
|
937 |
+
/**
|
938 |
+
*
|
939 |
+
*
|
940 |
+
* @param submitDocumentWithTextResource $parameters
|
941 |
+
* @return submitDocumentWithTextResourceResponse
|
942 |
+
*/
|
943 |
+
public function submitDocumentWithTextResource(submitDocumentWithTextResource $parameters) {
|
944 |
+
return $this->__soapCall('submitDocumentWithTextResource', array($parameters), array(
|
945 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
946 |
+
'soapaction' => ''
|
947 |
+
)
|
948 |
+
);
|
949 |
+
}
|
950 |
+
|
951 |
+
/**
|
952 |
+
*
|
953 |
+
*
|
954 |
+
* @param submitDocumentWithBinaryResource $parameters
|
955 |
+
* @return submitDocumentWithBinaryResourceResponse
|
956 |
+
*/
|
957 |
+
public function submitDocumentWithBinaryResource(submitDocumentWithBinaryResource $parameters) {
|
958 |
+
return $this->__soapCall('submitDocumentWithBinaryResource', array($parameters), array(
|
959 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
960 |
+
'soapaction' => ''
|
961 |
+
)
|
962 |
+
);
|
963 |
+
}
|
964 |
+
|
965 |
+
/**
|
966 |
+
*
|
967 |
+
*
|
968 |
+
* @param cancelDocument $parameters
|
969 |
+
* @return cancelDocumentResponse
|
970 |
+
*/
|
971 |
+
public function cancelDocument(cancelDocument $parameters) {
|
972 |
+
return $this->__soapCall('cancelDocument', array($parameters), array(
|
973 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
974 |
+
'soapaction' => ''
|
975 |
+
)
|
976 |
+
);
|
977 |
+
}
|
978 |
+
|
979 |
+
/**
|
980 |
+
*
|
981 |
+
*
|
982 |
+
* @param search $parameters
|
983 |
+
* @return searchResponse
|
984 |
+
*/
|
985 |
+
public function search(search $parameters) {
|
986 |
+
return $this->__soapCall('search', array($parameters), array(
|
987 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
988 |
+
'soapaction' => ''
|
989 |
+
)
|
990 |
+
);
|
991 |
+
}
|
992 |
+
|
993 |
+
}
|
994 |
+
|
995 |
+
?>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/client/ProjectService2.php
ADDED
@@ -0,0 +1,954 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
if (!class_exists("PDDate")) {
|
17 |
+
|
18 |
+
class PDDate {
|
19 |
+
|
20 |
+
public $critical; // boolean
|
21 |
+
public $date; // long
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
if (!class_exists("anonymous0")) {
|
28 |
+
|
29 |
+
class anonymous0 {
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
if (!class_exists("base64Binary")) {
|
36 |
+
|
37 |
+
class base64Binary {
|
38 |
+
|
39 |
+
public $_; // base64Binary
|
40 |
+
public $contentType; // anonymous0
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
if (!class_exists("hexBinary")) {
|
47 |
+
|
48 |
+
class hexBinary {
|
49 |
+
|
50 |
+
public $_; // hexBinary
|
51 |
+
public $contentType; // anonymous0
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
if (!class_exists("Notification")) {
|
58 |
+
|
59 |
+
class Notification {
|
60 |
+
|
61 |
+
public $errorMessage; // string
|
62 |
+
public $notificationDate; // Date
|
63 |
+
public $notificationPriority; // NotificationPriority
|
64 |
+
public $notificationText; // string
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
if (!class_exists("NotificationPriority")) {
|
71 |
+
|
72 |
+
class NotificationPriority {
|
73 |
+
|
74 |
+
public $notificationPriorityName; // string
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
if (!class_exists("Announcement")) {
|
81 |
+
|
82 |
+
class Announcement {
|
83 |
+
|
84 |
+
public $announcementText; // string
|
85 |
+
public $date; // Date
|
86 |
+
|
87 |
+
}
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
if (!class_exists("ContentMonitorPluginInfo")) {
|
92 |
+
|
93 |
+
class ContentMonitorPluginInfo {
|
94 |
+
|
95 |
+
public $pluginId; // string
|
96 |
+
public $pluginName; // string
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
|
103 |
+
if (!class_exists("Document")) {
|
104 |
+
|
105 |
+
class Document {
|
106 |
+
|
107 |
+
public $documentGroup; // DocumentGroup
|
108 |
+
public $documentInfo; // DocumentInfo
|
109 |
+
public $id; // string
|
110 |
+
public $sourceLanguage; // Language
|
111 |
+
public $sourceWordCount; // int
|
112 |
+
public $ticket; // string
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
+
if (!class_exists("DocumentGroup")) {
|
119 |
+
|
120 |
+
class DocumentGroup {
|
121 |
+
|
122 |
+
public $classifier; // string
|
123 |
+
public $documents; // Document
|
124 |
+
public $mimeType; // string
|
125 |
+
public $submission; // Submission
|
126 |
+
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
if (!class_exists("DocumentInfo")) {
|
132 |
+
|
133 |
+
class DocumentInfo {
|
134 |
+
|
135 |
+
public $clientIdentifier; // string
|
136 |
+
public $dateRequested; // Date
|
137 |
+
public $instructions; // string
|
138 |
+
public $metadata; // Metadata
|
139 |
+
public $name; // string
|
140 |
+
public $projectTicket; // string
|
141 |
+
public $sourceLocale; // string
|
142 |
+
public $submissionTicket; // string
|
143 |
+
public $targetInfos; // TargetInfo
|
144 |
+
public $wordCount; // int
|
145 |
+
|
146 |
+
}
|
147 |
+
|
148 |
+
}
|
149 |
+
|
150 |
+
if (!class_exists("DocumentPagedList")) {
|
151 |
+
|
152 |
+
class DocumentPagedList {
|
153 |
+
|
154 |
+
public $elements; // Document
|
155 |
+
public $pagedListInfo; // PagedListInfo
|
156 |
+
public $tasks; // Task
|
157 |
+
public $totalCount; // long
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
}
|
162 |
+
|
163 |
+
if (!class_exists("DocumentSearchRequest")) {
|
164 |
+
|
165 |
+
class DocumentSearchRequest {
|
166 |
+
|
167 |
+
public $projectTickets; // string
|
168 |
+
public $sourceLocaleId; // string
|
169 |
+
public $submissionTicket; // string
|
170 |
+
|
171 |
+
}
|
172 |
+
|
173 |
+
}
|
174 |
+
|
175 |
+
if (!class_exists("DocumentTicket")) {
|
176 |
+
|
177 |
+
class DocumentTicket {
|
178 |
+
|
179 |
+
public $submissionTicket; // string
|
180 |
+
public $ticketId; // string
|
181 |
+
|
182 |
+
}
|
183 |
+
|
184 |
+
}
|
185 |
+
|
186 |
+
if (!class_exists("EntityTypeEnum")) {
|
187 |
+
|
188 |
+
class EntityTypeEnum {
|
189 |
+
|
190 |
+
public $name; // string
|
191 |
+
public $value; // int
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
+
}
|
196 |
+
|
197 |
+
if (!class_exists("FileFormatProfile")) {
|
198 |
+
|
199 |
+
class FileFormatProfile {
|
200 |
+
|
201 |
+
public $configurable; // boolean
|
202 |
+
public $isDefault; // boolean
|
203 |
+
public $mimeType; // string
|
204 |
+
public $pluginId; // string
|
205 |
+
public $pluginName; // string
|
206 |
+
public $profileName; // string
|
207 |
+
public $targetWorkflowDefinition; // WorkflowDefinition
|
208 |
+
public $ticket; // string
|
209 |
+
|
210 |
+
}
|
211 |
+
|
212 |
+
}
|
213 |
+
|
214 |
+
if (!class_exists("FileFormatProgressData")) {
|
215 |
+
|
216 |
+
class FileFormatProgressData {
|
217 |
+
|
218 |
+
public $dateCompleted; // Date
|
219 |
+
public $fileCount; // long
|
220 |
+
public $fileFormatName; // string
|
221 |
+
public $fileProgressData; // FileProgressData
|
222 |
+
public $jobTicket; // string
|
223 |
+
public $workflowDueDate; // Date
|
224 |
+
public $workflowStatus; // string
|
225 |
+
|
226 |
+
}
|
227 |
+
|
228 |
+
}
|
229 |
+
|
230 |
+
if (!class_exists("FileProgressData")) {
|
231 |
+
|
232 |
+
class FileProgressData {
|
233 |
+
|
234 |
+
public $numberOfAvailableFiles; // int
|
235 |
+
public $numberOfCanceledFiles; // int
|
236 |
+
public $numberOfCompletedFiles; // int
|
237 |
+
public $numberOfDeliveredFiles; // int
|
238 |
+
public $numberOfFailedFiles; // int
|
239 |
+
public $numberOfInProcessFiles; // int
|
240 |
+
public $overallProgressPercent; // int
|
241 |
+
|
242 |
+
}
|
243 |
+
|
244 |
+
}
|
245 |
+
|
246 |
+
if (!class_exists("FuzzyTmStatistics")) {
|
247 |
+
|
248 |
+
class FuzzyTmStatistics {
|
249 |
+
|
250 |
+
public $fuzzyName; // string
|
251 |
+
public $wordCount; // int
|
252 |
+
|
253 |
+
}
|
254 |
+
|
255 |
+
}
|
256 |
+
|
257 |
+
if (!class_exists("ItemFolderEnum")) {
|
258 |
+
|
259 |
+
class ItemFolderEnum {
|
260 |
+
|
261 |
+
public $value; // int
|
262 |
+
|
263 |
+
}
|
264 |
+
|
265 |
+
}
|
266 |
+
|
267 |
+
if (!class_exists("ItemStatusEnum")) {
|
268 |
+
|
269 |
+
class ItemStatusEnum {
|
270 |
+
|
271 |
+
public $name; // string
|
272 |
+
public $value; // int
|
273 |
+
|
274 |
+
}
|
275 |
+
|
276 |
+
}
|
277 |
+
|
278 |
+
if (!class_exists("Metadata")) {
|
279 |
+
|
280 |
+
class Metadata {
|
281 |
+
|
282 |
+
public $key; // string
|
283 |
+
public $value; // string
|
284 |
+
|
285 |
+
}
|
286 |
+
|
287 |
+
}
|
288 |
+
|
289 |
+
if (!class_exists("Language")) {
|
290 |
+
|
291 |
+
class Language {
|
292 |
+
|
293 |
+
public $locale; // string
|
294 |
+
public $value; // string
|
295 |
+
|
296 |
+
}
|
297 |
+
|
298 |
+
}
|
299 |
+
|
300 |
+
if (!class_exists("LanguageDirection")) {
|
301 |
+
|
302 |
+
class LanguageDirection {
|
303 |
+
|
304 |
+
public $sourceLanguage; // Language
|
305 |
+
public $targetLanguage; // Language
|
306 |
+
|
307 |
+
}
|
308 |
+
|
309 |
+
}
|
310 |
+
|
311 |
+
if (!class_exists("LanguageDirectionModel")) {
|
312 |
+
|
313 |
+
class LanguageDirectionModel {
|
314 |
+
|
315 |
+
public $dateCompleted; // Date
|
316 |
+
public $fileCount; // long
|
317 |
+
public $fileFormatProgressData; // FileFormatProgressData
|
318 |
+
public $fileProgress; // FileProgressData
|
319 |
+
public $sourceLanguage; // Language
|
320 |
+
public $targetLanguage; // Language
|
321 |
+
public $workflowDueDate; // Date
|
322 |
+
public $workflowStatus; // string
|
323 |
+
|
324 |
+
}
|
325 |
+
|
326 |
+
}
|
327 |
+
|
328 |
+
if (!class_exists("PagedListInfo")) {
|
329 |
+
|
330 |
+
class PagedListInfo {
|
331 |
+
|
332 |
+
public $index; // int
|
333 |
+
public $indexesSize; // int
|
334 |
+
public $size; // int
|
335 |
+
public $sortDirection; // string
|
336 |
+
public $sortProperty; // string
|
337 |
+
|
338 |
+
}
|
339 |
+
|
340 |
+
}
|
341 |
+
|
342 |
+
if (!class_exists("Phase")) {
|
343 |
+
|
344 |
+
class Phase {
|
345 |
+
|
346 |
+
public $dateEnded; // Date
|
347 |
+
public $dueDate; // Date
|
348 |
+
public $name; // string
|
349 |
+
public $status; // ItemStatusEnum
|
350 |
+
|
351 |
+
}
|
352 |
+
|
353 |
+
}
|
354 |
+
|
355 |
+
if (!class_exists("Priority")) {
|
356 |
+
|
357 |
+
class Priority {
|
358 |
+
|
359 |
+
public $name; // string
|
360 |
+
public $value; // int
|
361 |
+
|
362 |
+
}
|
363 |
+
|
364 |
+
}
|
365 |
+
|
366 |
+
if (!class_exists("Project")) {
|
367 |
+
|
368 |
+
class Project {
|
369 |
+
|
370 |
+
public $announcements; // Announcement
|
371 |
+
public $contentMonitorPluginInfo; // ContentMonitorPluginInfo
|
372 |
+
public $defaultLanguageDirections; // LanguageDirection
|
373 |
+
public $defaultTargetWorkflowDefinition; // WorkflowDefinition
|
374 |
+
public $defaultTargetWorkflowDefinitionTicket; // string
|
375 |
+
public $fileFormatProfiles; // FileFormatProfile
|
376 |
+
public $frequentLanguageDirections; // LanguageDirection
|
377 |
+
public $metadata; // Metadata
|
378 |
+
public $organizationName; // string
|
379 |
+
public $projectInfo; // ProjectInfo
|
380 |
+
public $projectLanguageDirections; // LanguageDirection
|
381 |
+
public $ticket; // string
|
382 |
+
public $workflowDefinitions; // WorkflowDefinition
|
383 |
+
|
384 |
+
}
|
385 |
+
|
386 |
+
}
|
387 |
+
|
388 |
+
if (!class_exists("ProjectInfo")) {
|
389 |
+
|
390 |
+
class ProjectInfo {
|
391 |
+
|
392 |
+
public $clientIdentifier; // string
|
393 |
+
public $defaultJobWorkflowDefinitionTicket; // string
|
394 |
+
public $defaultSubmissionWorkflowDefinitionTicket; // string
|
395 |
+
public $defaultTargetWorkflowDefinitionTicket; // string
|
396 |
+
public $enabled; // boolean
|
397 |
+
public $name; // string
|
398 |
+
public $shortCode; // string
|
399 |
+
|
400 |
+
}
|
401 |
+
|
402 |
+
}
|
403 |
+
|
404 |
+
if (!class_exists("ProjectLanguage")) {
|
405 |
+
|
406 |
+
class ProjectLanguage {
|
407 |
+
|
408 |
+
public $customLocaleCode; // string
|
409 |
+
public $localeCode; // string
|
410 |
+
|
411 |
+
}
|
412 |
+
|
413 |
+
}
|
414 |
+
|
415 |
+
if (!class_exists("RepositoryItem")) {
|
416 |
+
|
417 |
+
class RepositoryItem {
|
418 |
+
|
419 |
+
public $data; // base64Binary
|
420 |
+
public $resourceInfo; // ResourceInfo
|
421 |
+
|
422 |
+
}
|
423 |
+
|
424 |
+
}
|
425 |
+
|
426 |
+
if (!class_exists("ResourceInfo")) {
|
427 |
+
|
428 |
+
class ResourceInfo {
|
429 |
+
|
430 |
+
public $classifier; // string
|
431 |
+
public $clientIdentifier; // string
|
432 |
+
public $description; // string
|
433 |
+
public $encoding; // string
|
434 |
+
public $md5Checksum; // string
|
435 |
+
public $mimeType; // string
|
436 |
+
public $name; // string
|
437 |
+
public $path; // string
|
438 |
+
public $resourceInfoId; // long
|
439 |
+
public $size; // long
|
440 |
+
public $type; // ResourceType
|
441 |
+
|
442 |
+
}
|
443 |
+
|
444 |
+
}
|
445 |
+
|
446 |
+
if (!class_exists("ResourceType")) {
|
447 |
+
|
448 |
+
class ResourceType {
|
449 |
+
|
450 |
+
public $value; // int
|
451 |
+
|
452 |
+
}
|
453 |
+
|
454 |
+
}
|
455 |
+
|
456 |
+
if (!class_exists("Submission")) {
|
457 |
+
|
458 |
+
class Submission {
|
459 |
+
|
460 |
+
public $alerts; // Notification
|
461 |
+
public $availableTasks; // int
|
462 |
+
public $dateCompleted; // Date
|
463 |
+
public $dateCreated; // Date
|
464 |
+
public $dateEstimated; // Date
|
465 |
+
public $documents; // Document
|
466 |
+
public $dueDate; // Date
|
467 |
+
public $id; // string
|
468 |
+
public $owner; // string
|
469 |
+
public $project; // Project
|
470 |
+
public $status; // ItemStatusEnum
|
471 |
+
public $submissionInfo; // SubmissionInfo
|
472 |
+
public $submitter; // string
|
473 |
+
public $submitterFullName; // string
|
474 |
+
public $ticket; // string
|
475 |
+
public $workflowDefinition; // WorkflowDefinition
|
476 |
+
|
477 |
+
}
|
478 |
+
|
479 |
+
}
|
480 |
+
|
481 |
+
if (!class_exists("SubmissionInfo")) {
|
482 |
+
|
483 |
+
class SubmissionInfo {
|
484 |
+
|
485 |
+
public $clientIdentifier; // string
|
486 |
+
public $dateRequested; // Date
|
487 |
+
public $metadata; // Metadata
|
488 |
+
public $name; // string
|
489 |
+
public $projectTicket; // string
|
490 |
+
public $submitter; // string
|
491 |
+
public $workflowDefinitionTicket; // string
|
492 |
+
|
493 |
+
}
|
494 |
+
|
495 |
+
}
|
496 |
+
|
497 |
+
if (!class_exists("SubmissionPagedList")) {
|
498 |
+
|
499 |
+
class SubmissionPagedList {
|
500 |
+
|
501 |
+
public $elements; // Submission
|
502 |
+
public $pagedListInfo; // PagedListInfo
|
503 |
+
public $tasks; // Task
|
504 |
+
public $totalCount; // long
|
505 |
+
|
506 |
+
}
|
507 |
+
|
508 |
+
}
|
509 |
+
|
510 |
+
if (!class_exists("SimpleSubmissionSearchModel")) {
|
511 |
+
|
512 |
+
class SimpleSubmissionSearchModel {
|
513 |
+
|
514 |
+
public $alerts; // Notification
|
515 |
+
public $availableTasks; // long
|
516 |
+
public $date; // Date
|
517 |
+
public $dateCompleted; // Date
|
518 |
+
public $dueDate; // Date
|
519 |
+
public $fileCount; // long
|
520 |
+
public $fileProgress; // FileProgressData
|
521 |
+
public $id; // string
|
522 |
+
public $instructions; // string
|
523 |
+
public $officeName; // string
|
524 |
+
public $owner; // string
|
525 |
+
public $priority; // string
|
526 |
+
public $projectName; // string
|
527 |
+
public $projectTicket; // string
|
528 |
+
public $sourceLanguage; // string
|
529 |
+
public $status; // ItemStatusEnum
|
530 |
+
public $submissionName; // string
|
531 |
+
public $submitterFullName; // string
|
532 |
+
public $ticket; // string
|
533 |
+
public $wordCount; // long
|
534 |
+
public $workflowDueDate; // Date
|
535 |
+
public $workflowStatus; // string
|
536 |
+
|
537 |
+
}
|
538 |
+
|
539 |
+
}
|
540 |
+
|
541 |
+
if (!class_exists("SubmissionSearchModelPagedList")) {
|
542 |
+
|
543 |
+
class SubmissionSearchModelPagedList {
|
544 |
+
|
545 |
+
public $elements; // SimpleSubmissionSearchModel
|
546 |
+
public $pagedListInfo; // PagedListInfo
|
547 |
+
public $tasks; // Task
|
548 |
+
public $totalCount; // long
|
549 |
+
|
550 |
+
}
|
551 |
+
|
552 |
+
}
|
553 |
+
|
554 |
+
if (!class_exists("SubmissionSearchRequest")) {
|
555 |
+
|
556 |
+
class SubmissionSearchRequest {
|
557 |
+
|
558 |
+
public $folder; // ItemFolderEnum
|
559 |
+
public $projectTickets; // string
|
560 |
+
public $submissionDate; // Date
|
561 |
+
public $submissionDueDate; // Date
|
562 |
+
public $submissionName; // string
|
563 |
+
|
564 |
+
}
|
565 |
+
|
566 |
+
}
|
567 |
+
|
568 |
+
if (!class_exists("Target")) {
|
569 |
+
|
570 |
+
class Target {
|
571 |
+
|
572 |
+
public $availableTasks; // long
|
573 |
+
public $dateCompleted; // Date
|
574 |
+
public $dateCreated; // Date
|
575 |
+
public $dateEstimated; // Date
|
576 |
+
public $document; // Document
|
577 |
+
public $downloadThresholdTimeStamp; // Date
|
578 |
+
public $dueDate; // Date
|
579 |
+
public $fileName; // string
|
580 |
+
public $id; // string
|
581 |
+
public $phases; // Phase
|
582 |
+
public $refPhase; // Phase
|
583 |
+
public $sourceLanguage; // Language
|
584 |
+
public $sourceWordCount; // int
|
585 |
+
public $status; // ItemStatusEnum
|
586 |
+
public $targetInfo; // TargetInfo
|
587 |
+
public $targetLanguage; // Language
|
588 |
+
public $targetWordCount; // int
|
589 |
+
public $ticket; // string
|
590 |
+
public $tmStatistics; // TmStatistics
|
591 |
+
public $workflowDefinition; // WorkflowDefinition
|
592 |
+
|
593 |
+
}
|
594 |
+
|
595 |
+
}
|
596 |
+
|
597 |
+
if (!class_exists("TargetInfo")) {
|
598 |
+
|
599 |
+
class TargetInfo {
|
600 |
+
|
601 |
+
public $dateRequested; // Date
|
602 |
+
public $encoding; // string
|
603 |
+
public $instructions; // string
|
604 |
+
public $metadata; // Metadata
|
605 |
+
public $priority; // Priority
|
606 |
+
public $requestedDueDate; // long
|
607 |
+
public $targetLocale; // string
|
608 |
+
public $workflowDefinitionTicket; // string
|
609 |
+
|
610 |
+
}
|
611 |
+
|
612 |
+
}
|
613 |
+
|
614 |
+
if (!class_exists("TargetPagedList")) {
|
615 |
+
|
616 |
+
class TargetPagedList {
|
617 |
+
|
618 |
+
public $elements; // Target
|
619 |
+
public $pagedListInfo; // PagedListInfo
|
620 |
+
public $tasks; // Task
|
621 |
+
public $totalCount; // long
|
622 |
+
|
623 |
+
}
|
624 |
+
|
625 |
+
}
|
626 |
+
|
627 |
+
if (!class_exists("TargetSearchRequest")) {
|
628 |
+
|
629 |
+
class TargetSearchRequest {
|
630 |
+
|
631 |
+
public $dateCreated; // Date
|
632 |
+
public $folder; // ItemFolderEnum
|
633 |
+
public $projectTickets; // string
|
634 |
+
public $sourceLocaleId; // string
|
635 |
+
public $submissionTicket; // string
|
636 |
+
public $targetLocaleId; // string
|
637 |
+
|
638 |
+
}
|
639 |
+
|
640 |
+
}
|
641 |
+
|
642 |
+
if (!class_exists("Task")) {
|
643 |
+
|
644 |
+
class Task {
|
645 |
+
|
646 |
+
public $groupName; // string
|
647 |
+
public $selectStyle; // int
|
648 |
+
public $taskId; // long
|
649 |
+
public $taskName; // string
|
650 |
+
public $weight; // int
|
651 |
+
|
652 |
+
}
|
653 |
+
|
654 |
+
}
|
655 |
+
|
656 |
+
if (!class_exists("TmStatistics")) {
|
657 |
+
|
658 |
+
class TmStatistics {
|
659 |
+
|
660 |
+
public $fuzzyWordCount1; // FuzzyTmStatistics
|
661 |
+
public $fuzzyWordCount10; // FuzzyTmStatistics
|
662 |
+
public $fuzzyWordCount2; // FuzzyTmStatistics
|
663 |
+
public $fuzzyWordCount3; // FuzzyTmStatistics
|
664 |
+
public $fuzzyWordCount4; // FuzzyTmStatistics
|
665 |
+
public $fuzzyWordCount5; // FuzzyTmStatistics
|
666 |
+
public $fuzzyWordCount6; // FuzzyTmStatistics
|
667 |
+
public $fuzzyWordCount7; // FuzzyTmStatistics
|
668 |
+
public $fuzzyWordCount8; // FuzzyTmStatistics
|
669 |
+
public $fuzzyWordCount9; // FuzzyTmStatistics
|
670 |
+
public $goldWordCount; // int
|
671 |
+
public $noMatchWordCount; // int
|
672 |
+
public $oneHundredMatchWordCount; // int
|
673 |
+
public $repetitionWordCount; // int
|
674 |
+
public $totalWordCount; // int
|
675 |
+
|
676 |
+
}
|
677 |
+
|
678 |
+
}
|
679 |
+
|
680 |
+
if (!class_exists("WorkflowDefinition")) {
|
681 |
+
|
682 |
+
class WorkflowDefinition {
|
683 |
+
|
684 |
+
public $description; // string
|
685 |
+
public $name; // string
|
686 |
+
public $ticket; // string
|
687 |
+
public $type; // EntityTypeEnum
|
688 |
+
|
689 |
+
}
|
690 |
+
|
691 |
+
}
|
692 |
+
|
693 |
+
if (!class_exists("UserInfo")) {
|
694 |
+
|
695 |
+
class UserInfo {
|
696 |
+
|
697 |
+
public $accountNonExpired; // boolean
|
698 |
+
public $accountNonLocked; // boolean
|
699 |
+
public $autoClaimMultipleTasks; // boolean
|
700 |
+
public $claimMultipleJobTasks; // boolean
|
701 |
+
public $credentialsNonExpired; // boolean
|
702 |
+
public $dateLastLogin; // dateTime
|
703 |
+
public $emailAddress; // string
|
704 |
+
public $emailNotification; // boolean
|
705 |
+
public $enabled; // boolean
|
706 |
+
public $firstName; // string
|
707 |
+
public $lastName; // string
|
708 |
+
public $password; // string
|
709 |
+
public $timeZone; // string
|
710 |
+
public $userName; // string
|
711 |
+
public $userType; // string
|
712 |
+
|
713 |
+
}
|
714 |
+
|
715 |
+
}
|
716 |
+
|
717 |
+
if (!class_exists("TiUserInfo")) {
|
718 |
+
|
719 |
+
class TiUserInfo {
|
720 |
+
|
721 |
+
public $languageDirections; // LanguageDirection
|
722 |
+
public $organizationId; // long
|
723 |
+
public $projectRoles; // string
|
724 |
+
public $projectTicket; // string
|
725 |
+
public $systemRoles; // string
|
726 |
+
public $vendorId; // long
|
727 |
+
|
728 |
+
}
|
729 |
+
|
730 |
+
}
|
731 |
+
|
732 |
+
if (!class_exists("findByTicket")) {
|
733 |
+
|
734 |
+
class findByTicket {
|
735 |
+
|
736 |
+
public $ticket; // string
|
737 |
+
public $userId; // string
|
738 |
+
|
739 |
+
}
|
740 |
+
|
741 |
+
}
|
742 |
+
|
743 |
+
if (!class_exists("findByTicketResponse")) {
|
744 |
+
|
745 |
+
class findByTicketResponse {
|
746 |
+
|
747 |
+
public $return; // Project
|
748 |
+
|
749 |
+
}
|
750 |
+
|
751 |
+
}
|
752 |
+
|
753 |
+
if (!class_exists("findProjectByName")) {
|
754 |
+
|
755 |
+
class findProjectByName {
|
756 |
+
|
757 |
+
public $projectName; // string
|
758 |
+
public $userId; // string
|
759 |
+
|
760 |
+
}
|
761 |
+
|
762 |
+
}
|
763 |
+
|
764 |
+
if (!class_exists("findProjectByNameResponse")) {
|
765 |
+
|
766 |
+
class findProjectByNameResponse {
|
767 |
+
|
768 |
+
public $return; // Project
|
769 |
+
|
770 |
+
}
|
771 |
+
|
772 |
+
}
|
773 |
+
|
774 |
+
if (!class_exists("findProjectByShortCode")) {
|
775 |
+
|
776 |
+
class findProjectByShortCode {
|
777 |
+
|
778 |
+
public $projectShortCode; // string
|
779 |
+
public $userId; // string
|
780 |
+
|
781 |
+
}
|
782 |
+
|
783 |
+
}
|
784 |
+
|
785 |
+
if (!class_exists("findProjectByShortCodeResponse")) {
|
786 |
+
|
787 |
+
class findProjectByShortCodeResponse {
|
788 |
+
|
789 |
+
public $return; // Project
|
790 |
+
|
791 |
+
}
|
792 |
+
|
793 |
+
}
|
794 |
+
|
795 |
+
if (!class_exists("getUserProjects")) {
|
796 |
+
|
797 |
+
class getUserProjects {
|
798 |
+
|
799 |
+
public $isSubProjectIncluded; // boolean
|
800 |
+
public $userId; // string
|
801 |
+
|
802 |
+
}
|
803 |
+
|
804 |
+
}
|
805 |
+
|
806 |
+
if (!class_exists("getUserProjectsResponse")) {
|
807 |
+
|
808 |
+
class getUserProjectsResponse {
|
809 |
+
|
810 |
+
public $return; // Project
|
811 |
+
|
812 |
+
}
|
813 |
+
|
814 |
+
}
|
815 |
+
|
816 |
+
/**
|
817 |
+
* ProjectService2 class
|
818 |
+
*
|
819 |
+
*
|
820 |
+
*
|
821 |
+
* @author {author}
|
822 |
+
* @copyright {copyright}
|
823 |
+
* @package {package}
|
824 |
+
*/
|
825 |
+
class ProjectService2 extends SoapClient {
|
826 |
+
|
827 |
+
private static $classmap = array(
|
828 |
+
'anonymous0' => 'anonymous0',
|
829 |
+
'base64Binary' => 'base64Binary',
|
830 |
+
'hexBinary' => 'hexBinary',
|
831 |
+
'Notification' => 'Notification',
|
832 |
+
'NotificationPriority' => 'NotificationPriority',
|
833 |
+
'Announcement' => 'Announcement',
|
834 |
+
'ContentMonitorPluginInfo' => 'ContentMonitorPluginInfo',
|
835 |
+
'Date' => 'PDDate',
|
836 |
+
'Document' => 'Document',
|
837 |
+
'DocumentGroup' => 'DocumentGroup',
|
838 |
+
'DocumentInfo' => 'DocumentInfo',
|
839 |
+
'DocumentPagedList' => 'DocumentPagedList',
|
840 |
+
'DocumentSearchRequest' => 'DocumentSearchRequest',
|
841 |
+
'DocumentTicket' => 'DocumentTicket',
|
842 |
+
'EntityTypeEnum' => 'EntityTypeEnum',
|
843 |
+
'FileFormatProfile' => 'FileFormatProfile',
|
844 |
+
'FileFormatProgressData' => 'FileFormatProgressData',
|
845 |
+
'FileProgressData' => 'FileProgressData',
|
846 |
+
'FuzzyTmStatistics' => 'FuzzyTmStatistics',
|
847 |
+
'ItemFolderEnum' => 'ItemFolderEnum',
|
848 |
+
'ItemStatusEnum' => 'ItemStatusEnum',
|
849 |
+
'Metadata' => 'Metadata',
|
850 |
+
'Language' => 'Language',
|
851 |
+
'LanguageDirection' => 'LanguageDirection',
|
852 |
+
'LanguageDirectionModel' => 'LanguageDirectionModel',
|
853 |
+
'PagedListInfo' => 'PagedListInfo',
|
854 |
+
'Phase' => 'Phase',
|
855 |
+
'Priority' => 'Priority',
|
856 |
+
'Project' => 'Project',
|
857 |
+
'ProjectInfo' => 'ProjectInfo',
|
858 |
+
'ProjectLanguage' => 'ProjectLanguage',
|
859 |
+
'RepositoryItem' => 'RepositoryItem',
|
860 |
+
'ResourceInfo' => 'ResourceInfo',
|
861 |
+
'ResourceType' => 'ResourceType',
|
862 |
+
'Submission' => 'Submission',
|
863 |
+
'SubmissionInfo' => 'SubmissionInfo',
|
864 |
+
'SubmissionPagedList' => 'SubmissionPagedList',
|
865 |
+
'SimpleSubmissionSearchModel' => 'SimpleSubmissionSearchModel',
|
866 |
+
'SubmissionSearchModelPagedList' => 'SubmissionSearchModelPagedList',
|
867 |
+
'SubmissionSearchRequest' => 'SubmissionSearchRequest',
|
868 |
+
'Target' => 'Target',
|
869 |
+
'TargetInfo' => 'TargetInfo',
|
870 |
+
'TargetPagedList' => 'TargetPagedList',
|
871 |
+
'TargetSearchRequest' => 'TargetSearchRequest',
|
872 |
+
'Task' => 'Task',
|
873 |
+
'TmStatistics' => 'TmStatistics',
|
874 |
+
'WorkflowDefinition' => 'WorkflowDefinition',
|
875 |
+
'UserInfo' => 'UserInfo',
|
876 |
+
'TiUserInfo' => 'TiUserInfo',
|
877 |
+
'findByTicket' => 'findByTicket',
|
878 |
+
'findByTicketResponse' => 'findByTicketResponse',
|
879 |
+
'findProjectByName' => 'findProjectByName',
|
880 |
+
'findProjectByNameResponse' => 'findProjectByNameResponse',
|
881 |
+
'findProjectByShortCode' => 'findProjectByShortCode',
|
882 |
+
'findProjectByShortCodeResponse' => 'findProjectByShortCodeResponse',
|
883 |
+
'getUserProjects' => 'getUserProjects',
|
884 |
+
'getUserProjectsResponse' => 'getUserProjectsResponse',
|
885 |
+
);
|
886 |
+
|
887 |
+
public function ProjectService2($wsdl = "http://localhost:8080/pd4/services/ProjectService2?wsdl", $options = array()) {
|
888 |
+
foreach (self::$classmap as $key => $value) {
|
889 |
+
if (!isset($options['classmap'][$key])) {
|
890 |
+
$options['classmap'][$key] = $value;
|
891 |
+
}
|
892 |
+
}
|
893 |
+
parent::__construct($wsdl, $options);
|
894 |
+
}
|
895 |
+
|
896 |
+
/**
|
897 |
+
*
|
898 |
+
*
|
899 |
+
* @param findByTicket $parameters
|
900 |
+
* @return findByTicketResponse
|
901 |
+
*/
|
902 |
+
public function findByTicket(findByTicket $parameters) {
|
903 |
+
return $this->__soapCall('findByTicket', array($parameters), array(
|
904 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
905 |
+
'soapaction' => ''
|
906 |
+
)
|
907 |
+
);
|
908 |
+
}
|
909 |
+
|
910 |
+
/**
|
911 |
+
*
|
912 |
+
*
|
913 |
+
* @param getUserProjects $parameters
|
914 |
+
* @return getUserProjectsResponse
|
915 |
+
*/
|
916 |
+
public function getUserProjects(getUserProjects $parameters) {
|
917 |
+
return $this->__soapCall('getUserProjects', array($parameters), array(
|
918 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
919 |
+
'soapaction' => ''
|
920 |
+
)
|
921 |
+
);
|
922 |
+
}
|
923 |
+
|
924 |
+
/**
|
925 |
+
*
|
926 |
+
*
|
927 |
+
* @param findProjectByShortCode $parameters
|
928 |
+
* @return findProjectByShortCodeResponse
|
929 |
+
*/
|
930 |
+
public function findProjectByShortCode(findProjectByShortCode $parameters) {
|
931 |
+
return $this->__soapCall('findProjectByShortCode', array($parameters), array(
|
932 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
933 |
+
'soapaction' => ''
|
934 |
+
)
|
935 |
+
);
|
936 |
+
}
|
937 |
+
|
938 |
+
/**
|
939 |
+
*
|
940 |
+
*
|
941 |
+
* @param findProjectByName $parameters
|
942 |
+
* @return findProjectByNameResponse
|
943 |
+
*/
|
944 |
+
public function findProjectByName(findProjectByName $parameters) {
|
945 |
+
return $this->__soapCall('findProjectByName', array($parameters), array(
|
946 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
947 |
+
'soapaction' => ''
|
948 |
+
)
|
949 |
+
);
|
950 |
+
}
|
951 |
+
|
952 |
+
}
|
953 |
+
|
954 |
+
?>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/client/SessionService2.php
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
if (!class_exists("login")) {
|
17 |
+
|
18 |
+
class login {
|
19 |
+
|
20 |
+
public $username; // string
|
21 |
+
public $password; // string
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
if (!class_exists("loginResponse")) {
|
28 |
+
|
29 |
+
class loginResponse {
|
30 |
+
|
31 |
+
public $return; // string
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
if (!class_exists("logout")) {
|
38 |
+
|
39 |
+
class logout {
|
40 |
+
|
41 |
+
public $userId; // string
|
42 |
+
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
if (!class_exists("logoutResponse")) {
|
48 |
+
|
49 |
+
class logoutResponse {
|
50 |
+
|
51 |
+
public $return; // string
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* SessionService2 class
|
59 |
+
*
|
60 |
+
*
|
61 |
+
*
|
62 |
+
* @author {author}
|
63 |
+
* @copyright {copyright}
|
64 |
+
* @package {package}
|
65 |
+
*/
|
66 |
+
class SessionService2 extends SoapClient {
|
67 |
+
|
68 |
+
private static $classmap = array(
|
69 |
+
'login' => 'login',
|
70 |
+
'loginResponse' => 'loginResponse',
|
71 |
+
'logout' => 'logout',
|
72 |
+
'logoutResponse' => 'logoutResponse',
|
73 |
+
);
|
74 |
+
|
75 |
+
public function SessionService2($wsdl = "http://localhost:8080/pd4/services/SessionService2?wsdl", $options = array()) {
|
76 |
+
foreach (self::$classmap as $key => $value) {
|
77 |
+
if (!isset($options['classmap'][$key])) {
|
78 |
+
$options['classmap'][$key] = $value;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
parent::__construct($wsdl, $options);
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
*
|
86 |
+
*
|
87 |
+
* @param logout $parameters
|
88 |
+
* @return logoutResponse
|
89 |
+
*/
|
90 |
+
public function logout(logout $parameters) {
|
91 |
+
return $this->__soapCall('logout', array($parameters), array(
|
92 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
93 |
+
'soapaction' => ''
|
94 |
+
)
|
95 |
+
);
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
*
|
100 |
+
*
|
101 |
+
* @param login $parameters
|
102 |
+
* @return loginResponse
|
103 |
+
*/
|
104 |
+
public function login(login $parameters) {
|
105 |
+
return $this->__soapCall('login', array($parameters), array(
|
106 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
107 |
+
'soapaction' => ''
|
108 |
+
)
|
109 |
+
);
|
110 |
+
}
|
111 |
+
|
112 |
+
}
|
113 |
+
|
114 |
+
?>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/client/SubmissionService2.php
ADDED
@@ -0,0 +1,1108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
if (!class_exists("PDDate")) {
|
17 |
+
|
18 |
+
class PDDate {
|
19 |
+
|
20 |
+
public $critical; // boolean
|
21 |
+
public $date; // long
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
if (!class_exists("anonymous0")) {
|
28 |
+
|
29 |
+
class anonymous0 {
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
if (!class_exists("base64Binary")) {
|
36 |
+
|
37 |
+
class base64Binary {
|
38 |
+
|
39 |
+
public $_; // base64Binary
|
40 |
+
public $contentType; // anonymous0
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
if (!class_exists("hexBinary")) {
|
47 |
+
|
48 |
+
class hexBinary {
|
49 |
+
|
50 |
+
public $_; // hexBinary
|
51 |
+
public $contentType; // anonymous0
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
if (!class_exists("Notification")) {
|
58 |
+
|
59 |
+
class Notification {
|
60 |
+
|
61 |
+
public $errorMessage; // string
|
62 |
+
public $notificationDate; // Date
|
63 |
+
public $notificationPriority; // NotificationPriority
|
64 |
+
public $notificationText; // string
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
if (!class_exists("NotificationPriority")) {
|
71 |
+
|
72 |
+
class NotificationPriority {
|
73 |
+
|
74 |
+
public $notificationPriorityName; // string
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
if (!class_exists("Announcement")) {
|
81 |
+
|
82 |
+
class Announcement {
|
83 |
+
|
84 |
+
public $announcementText; // string
|
85 |
+
public $date; // Date
|
86 |
+
|
87 |
+
}
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
if (!class_exists("ContentMonitorPluginInfo")) {
|
92 |
+
|
93 |
+
class ContentMonitorPluginInfo {
|
94 |
+
|
95 |
+
public $pluginId; // string
|
96 |
+
public $pluginName; // string
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
if (!class_exists("Document")) {
|
103 |
+
|
104 |
+
class Document {
|
105 |
+
|
106 |
+
public $documentGroup; // DocumentGroup
|
107 |
+
public $documentInfo; // DocumentInfo
|
108 |
+
public $id; // string
|
109 |
+
public $sourceLanguage; // Language
|
110 |
+
public $sourceWordCount; // int
|
111 |
+
public $ticket; // string
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
}
|
116 |
+
|
117 |
+
if (!class_exists("DocumentGroup")) {
|
118 |
+
|
119 |
+
class DocumentGroup {
|
120 |
+
|
121 |
+
public $classifier; // string
|
122 |
+
public $documents; // Document
|
123 |
+
public $mimeType; // string
|
124 |
+
public $submission; // Submission
|
125 |
+
|
126 |
+
}
|
127 |
+
|
128 |
+
}
|
129 |
+
|
130 |
+
if (!class_exists("DocumentInfo")) {
|
131 |
+
|
132 |
+
class DocumentInfo {
|
133 |
+
|
134 |
+
public $clientIdentifier; // string
|
135 |
+
public $dateRequested; // Date
|
136 |
+
public $instructions; // string
|
137 |
+
public $metadata; // Metadata
|
138 |
+
public $name; // string
|
139 |
+
public $projectTicket; // string
|
140 |
+
public $sourceLocale; // string
|
141 |
+
public $submissionTicket; // string
|
142 |
+
public $targetInfos; // TargetInfo
|
143 |
+
public $wordCount; // int
|
144 |
+
|
145 |
+
}
|
146 |
+
|
147 |
+
}
|
148 |
+
|
149 |
+
if (!class_exists("DocumentPagedList")) {
|
150 |
+
|
151 |
+
class DocumentPagedList {
|
152 |
+
|
153 |
+
public $elements; // Document
|
154 |
+
public $pagedListInfo; // PagedListInfo
|
155 |
+
public $tasks; // Task
|
156 |
+
public $totalCount; // long
|
157 |
+
|
158 |
+
}
|
159 |
+
|
160 |
+
}
|
161 |
+
|
162 |
+
if (!class_exists("DocumentSearchRequest")) {
|
163 |
+
|
164 |
+
class DocumentSearchRequest {
|
165 |
+
|
166 |
+
public $projectTickets; // string
|
167 |
+
public $sourceLocaleId; // string
|
168 |
+
public $submissionTicket; // string
|
169 |
+
|
170 |
+
}
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
if (!class_exists("DocumentTicket")) {
|
175 |
+
|
176 |
+
class DocumentTicket {
|
177 |
+
|
178 |
+
public $submissionTicket; // string
|
179 |
+
public $ticketId; // string
|
180 |
+
|
181 |
+
}
|
182 |
+
|
183 |
+
}
|
184 |
+
|
185 |
+
if (!class_exists("EntityTypeEnum")) {
|
186 |
+
|
187 |
+
class EntityTypeEnum {
|
188 |
+
|
189 |
+
public $name; // string
|
190 |
+
public $value; // int
|
191 |
+
|
192 |
+
}
|
193 |
+
|
194 |
+
}
|
195 |
+
|
196 |
+
if (!class_exists("FileFormatProfile")) {
|
197 |
+
|
198 |
+
class FileFormatProfile {
|
199 |
+
|
200 |
+
public $configurable; // boolean
|
201 |
+
public $isDefault; // boolean
|
202 |
+
public $mimeType; // string
|
203 |
+
public $pluginId; // string
|
204 |
+
public $pluginName; // string
|
205 |
+
public $profileName; // string
|
206 |
+
public $targetWorkflowDefinition; // WorkflowDefinition
|
207 |
+
public $ticket; // string
|
208 |
+
|
209 |
+
}
|
210 |
+
|
211 |
+
}
|
212 |
+
|
213 |
+
if (!class_exists("FileFormatProgressData")) {
|
214 |
+
|
215 |
+
class FileFormatProgressData {
|
216 |
+
|
217 |
+
public $dateCompleted; // Date
|
218 |
+
public $fileCount; // long
|
219 |
+
public $fileFormatName; // string
|
220 |
+
public $fileProgressData; // FileProgressData
|
221 |
+
public $jobTicket; // string
|
222 |
+
public $workflowDueDate; // Date
|
223 |
+
public $workflowStatus; // string
|
224 |
+
|
225 |
+
}
|
226 |
+
|
227 |
+
}
|
228 |
+
|
229 |
+
if (!class_exists("FileProgressData")) {
|
230 |
+
|
231 |
+
class FileProgressData {
|
232 |
+
|
233 |
+
public $numberOfAvailableFiles; // int
|
234 |
+
public $numberOfCanceledFiles; // int
|
235 |
+
public $numberOfCompletedFiles; // int
|
236 |
+
public $numberOfDeliveredFiles; // int
|
237 |
+
public $numberOfFailedFiles; // int
|
238 |
+
public $numberOfInProcessFiles; // int
|
239 |
+
public $overallProgressPercent; // int
|
240 |
+
|
241 |
+
}
|
242 |
+
|
243 |
+
}
|
244 |
+
|
245 |
+
if (!class_exists("FuzzyTmStatistics")) {
|
246 |
+
|
247 |
+
class FuzzyTmStatistics {
|
248 |
+
|
249 |
+
public $fuzzyName; // string
|
250 |
+
public $wordCount; // int
|
251 |
+
|
252 |
+
}
|
253 |
+
|
254 |
+
}
|
255 |
+
|
256 |
+
if (!class_exists("ItemFolderEnum")) {
|
257 |
+
|
258 |
+
class ItemFolderEnum {
|
259 |
+
|
260 |
+
public $value; // int
|
261 |
+
|
262 |
+
}
|
263 |
+
|
264 |
+
}
|
265 |
+
|
266 |
+
if (!class_exists("ItemStatusEnum")) {
|
267 |
+
|
268 |
+
class ItemStatusEnum {
|
269 |
+
|
270 |
+
public $name; // string
|
271 |
+
public $value; // int
|
272 |
+
|
273 |
+
}
|
274 |
+
|
275 |
+
}
|
276 |
+
|
277 |
+
if (!class_exists("Metadata")) {
|
278 |
+
|
279 |
+
class Metadata {
|
280 |
+
|
281 |
+
public $key; // string
|
282 |
+
public $value; // string
|
283 |
+
|
284 |
+
}
|
285 |
+
|
286 |
+
}
|
287 |
+
|
288 |
+
if (!class_exists("Language")) {
|
289 |
+
|
290 |
+
class Language {
|
291 |
+
|
292 |
+
public $locale; // string
|
293 |
+
public $value; // string
|
294 |
+
|
295 |
+
}
|
296 |
+
|
297 |
+
}
|
298 |
+
|
299 |
+
if (!class_exists("LanguageDirection")) {
|
300 |
+
|
301 |
+
class LanguageDirection {
|
302 |
+
|
303 |
+
public $sourceLanguage; // Language
|
304 |
+
public $targetLanguage; // Language
|
305 |
+
|
306 |
+
}
|
307 |
+
|
308 |
+
}
|
309 |
+
|
310 |
+
if (!class_exists("LanguageDirectionModel")) {
|
311 |
+
|
312 |
+
class LanguageDirectionModel {
|
313 |
+
|
314 |
+
public $dateCompleted; // Date
|
315 |
+
public $fileCount; // long
|
316 |
+
public $fileFormatProgressData; // FileFormatProgressData
|
317 |
+
public $fileProgress; // FileProgressData
|
318 |
+
public $sourceLanguage; // Language
|
319 |
+
public $targetLanguage; // Language
|
320 |
+
public $workflowDueDate; // Date
|
321 |
+
public $workflowStatus; // string
|
322 |
+
|
323 |
+
}
|
324 |
+
|
325 |
+
}
|
326 |
+
|
327 |
+
if (!class_exists("PagedListInfo")) {
|
328 |
+
|
329 |
+
class PagedListInfo {
|
330 |
+
|
331 |
+
public $index; // int
|
332 |
+
public $indexesSize; // int
|
333 |
+
public $size; // int
|
334 |
+
public $sortDirection; // string
|
335 |
+
public $sortProperty; // string
|
336 |
+
|
337 |
+
}
|
338 |
+
|
339 |
+
}
|
340 |
+
|
341 |
+
if (!class_exists("Phase")) {
|
342 |
+
|
343 |
+
class Phase {
|
344 |
+
|
345 |
+
public $dateEnded; // Date
|
346 |
+
public $dueDate; // Date
|
347 |
+
public $name; // string
|
348 |
+
public $status; // ItemStatusEnum
|
349 |
+
|
350 |
+
}
|
351 |
+
|
352 |
+
}
|
353 |
+
|
354 |
+
if (!class_exists("Priority")) {
|
355 |
+
|
356 |
+
class Priority {
|
357 |
+
|
358 |
+
public $name; // string
|
359 |
+
public $value; // int
|
360 |
+
|
361 |
+
}
|
362 |
+
|
363 |
+
}
|
364 |
+
|
365 |
+
if (!class_exists("Project")) {
|
366 |
+
|
367 |
+
class Project {
|
368 |
+
|
369 |
+
public $announcements; // Announcement
|
370 |
+
public $contentMonitorPluginInfo; // ContentMonitorPluginInfo
|
371 |
+
public $defaultLanguageDirections; // LanguageDirection
|
372 |
+
public $defaultTargetWorkflowDefinition; // WorkflowDefinition
|
373 |
+
public $defaultTargetWorkflowDefinitionTicket; // string
|
374 |
+
public $fileFormatProfiles; // FileFormatProfile
|
375 |
+
public $frequentLanguageDirections; // LanguageDirection
|
376 |
+
public $metadata; // Metadata
|
377 |
+
public $organizationName; // string
|
378 |
+
public $projectInfo; // ProjectInfo
|
379 |
+
public $projectLanguageDirections; // LanguageDirection
|
380 |
+
public $ticket; // string
|
381 |
+
public $workflowDefinitions; // WorkflowDefinition
|
382 |
+
|
383 |
+
}
|
384 |
+
|
385 |
+
}
|
386 |
+
|
387 |
+
if (!class_exists("ProjectInfo")) {
|
388 |
+
|
389 |
+
class ProjectInfo {
|
390 |
+
|
391 |
+
public $clientIdentifier; // string
|
392 |
+
public $defaultJobWorkflowDefinitionTicket; // string
|
393 |
+
public $defaultSubmissionWorkflowDefinitionTicket; // string
|
394 |
+
public $defaultTargetWorkflowDefinitionTicket; // string
|
395 |
+
public $enabled; // boolean
|
396 |
+
public $name; // string
|
397 |
+
public $shortCode; // string
|
398 |
+
|
399 |
+
}
|
400 |
+
|
401 |
+
}
|
402 |
+
|
403 |
+
if (!class_exists("ProjectLanguage")) {
|
404 |
+
|
405 |
+
class ProjectLanguage {
|
406 |
+
|
407 |
+
public $customLocaleCode; // string
|
408 |
+
public $localeCode; // string
|
409 |
+
|
410 |
+
}
|
411 |
+
|
412 |
+
}
|
413 |
+
|
414 |
+
if (!class_exists("RepositoryItem")) {
|
415 |
+
|
416 |
+
class RepositoryItem {
|
417 |
+
|
418 |
+
public $data; // base64Binary
|
419 |
+
public $resourceInfo; // ResourceInfo
|
420 |
+
|
421 |
+
}
|
422 |
+
|
423 |
+
}
|
424 |
+
|
425 |
+
if (!class_exists("ResourceInfo")) {
|
426 |
+
|
427 |
+
class ResourceInfo {
|
428 |
+
|
429 |
+
public $classifier; // string
|
430 |
+
public $clientIdentifier; // string
|
431 |
+
public $description; // string
|
432 |
+
public $encoding; // string
|
433 |
+
public $md5Checksum; // string
|
434 |
+
public $mimeType; // string
|
435 |
+
public $name; // string
|
436 |
+
public $path; // string
|
437 |
+
public $resourceInfoId; // long
|
438 |
+
public $size; // long
|
439 |
+
public $type; // ResourceType
|
440 |
+
|
441 |
+
}
|
442 |
+
|
443 |
+
}
|
444 |
+
|
445 |
+
if (!class_exists("ResourceType")) {
|
446 |
+
|
447 |
+
class ResourceType {
|
448 |
+
|
449 |
+
public $value; // int
|
450 |
+
|
451 |
+
}
|
452 |
+
|
453 |
+
}
|
454 |
+
|
455 |
+
if (!class_exists("Submission")) {
|
456 |
+
|
457 |
+
class Submission {
|
458 |
+
|
459 |
+
public $alerts; // Notification
|
460 |
+
public $availableTasks; // int
|
461 |
+
public $dateCompleted; // Date
|
462 |
+
public $dateCreated; // Date
|
463 |
+
public $dateEstimated; // Date
|
464 |
+
public $documents; // Document
|
465 |
+
public $dueDate; // Date
|
466 |
+
public $id; // string
|
467 |
+
public $owner; // string
|
468 |
+
public $project; // Project
|
469 |
+
public $status; // ItemStatusEnum
|
470 |
+
public $submissionInfo; // SubmissionInfo
|
471 |
+
public $submitter; // string
|
472 |
+
public $submitterFullName; // string
|
473 |
+
public $ticket; // string
|
474 |
+
public $workflowDefinition; // WorkflowDefinition
|
475 |
+
|
476 |
+
}
|
477 |
+
|
478 |
+
}
|
479 |
+
|
480 |
+
if (!class_exists("SubmissionInfo")) {
|
481 |
+
|
482 |
+
class SubmissionInfo {
|
483 |
+
|
484 |
+
public $clientIdentifier; // string
|
485 |
+
public $dateRequested; // Date
|
486 |
+
public $metadata; // Metadata
|
487 |
+
public $name; // string
|
488 |
+
public $projectTicket; // string
|
489 |
+
public $submitter; // string
|
490 |
+
public $workflowDefinitionTicket; // string
|
491 |
+
|
492 |
+
}
|
493 |
+
|
494 |
+
}
|
495 |
+
|
496 |
+
if (!class_exists("SubmissionPagedList")) {
|
497 |
+
|
498 |
+
class SubmissionPagedList {
|
499 |
+
|
500 |
+
public $elements; // Submission
|
501 |
+
public $pagedListInfo; // PagedListInfo
|
502 |
+
public $tasks; // Task
|
503 |
+
public $totalCount; // long
|
504 |
+
|
505 |
+
}
|
506 |
+
|
507 |
+
}
|
508 |
+
|
509 |
+
if (!class_exists("SimpleSubmissionSearchModel")) {
|
510 |
+
|
511 |
+
class SimpleSubmissionSearchModel {
|
512 |
+
|
513 |
+
public $alerts; // Notification
|
514 |
+
public $availableTasks; // long
|
515 |
+
public $date; // Date
|
516 |
+
public $dateCompleted; // Date
|
517 |
+
public $dueDate; // Date
|
518 |
+
public $fileCount; // long
|
519 |
+
public $fileProgress; // FileProgressData
|
520 |
+
public $id; // string
|
521 |
+
public $instructions; // string
|
522 |
+
public $officeName; // string
|
523 |
+
public $owner; // string
|
524 |
+
public $priority; // string
|
525 |
+
public $projectName; // string
|
526 |
+
public $projectTicket; // string
|
527 |
+
public $sourceLanguage; // string
|
528 |
+
public $status; // ItemStatusEnum
|
529 |
+
public $submissionName; // string
|
530 |
+
public $submitterFullName; // string
|
531 |
+
public $ticket; // string
|
532 |
+
public $wordCount; // long
|
533 |
+
public $workflowDueDate; // Date
|
534 |
+
public $workflowStatus; // string
|
535 |
+
|
536 |
+
}
|
537 |
+
|
538 |
+
}
|
539 |
+
|
540 |
+
if (!class_exists("SubmissionSearchModelPagedList")) {
|
541 |
+
|
542 |
+
class SubmissionSearchModelPagedList {
|
543 |
+
|
544 |
+
public $elements; // SimpleSubmissionSearchModel
|
545 |
+
public $pagedListInfo; // PagedListInfo
|
546 |
+
public $tasks; // Task
|
547 |
+
public $totalCount; // long
|
548 |
+
|
549 |
+
}
|
550 |
+
|
551 |
+
}
|
552 |
+
|
553 |
+
if (!class_exists("SubmissionSearchRequest")) {
|
554 |
+
|
555 |
+
class SubmissionSearchRequest {
|
556 |
+
|
557 |
+
public $folder; // ItemFolderEnum
|
558 |
+
public $projectTickets; // string
|
559 |
+
public $submissionDate; // Date
|
560 |
+
public $submissionDueDate; // Date
|
561 |
+
public $submissionName; // string
|
562 |
+
|
563 |
+
}
|
564 |
+
|
565 |
+
}
|
566 |
+
|
567 |
+
if (!class_exists("Target")) {
|
568 |
+
|
569 |
+
class Target {
|
570 |
+
|
571 |
+
public $availableTasks; // long
|
572 |
+
public $dateCompleted; // Date
|
573 |
+
public $dateCreated; // Date
|
574 |
+
public $dateEstimated; // Date
|
575 |
+
public $document; // Document
|
576 |
+
public $downloadThresholdTimeStamp; // Date
|
577 |
+
public $dueDate; // Date
|
578 |
+
public $fileName; // string
|
579 |
+
public $id; // string
|
580 |
+
public $phases; // Phase
|
581 |
+
public $refPhase; // Phase
|
582 |
+
public $sourceLanguage; // Language
|
583 |
+
public $sourceWordCount; // int
|
584 |
+
public $status; // ItemStatusEnum
|
585 |
+
public $targetInfo; // TargetInfo
|
586 |
+
public $targetLanguage; // Language
|
587 |
+
public $targetWordCount; // int
|
588 |
+
public $ticket; // string
|
589 |
+
public $tmStatistics; // TmStatistics
|
590 |
+
public $workflowDefinition; // WorkflowDefinition
|
591 |
+
|
592 |
+
}
|
593 |
+
|
594 |
+
}
|
595 |
+
|
596 |
+
if (!class_exists("TargetInfo")) {
|
597 |
+
|
598 |
+
class TargetInfo {
|
599 |
+
|
600 |
+
public $dateRequested; // Date
|
601 |
+
public $encoding; // string
|
602 |
+
public $instructions; // string
|
603 |
+
public $metadata; // Metadata
|
604 |
+
public $priority; // Priority
|
605 |
+
public $requestedDueDate; // long
|
606 |
+
public $targetLocale; // string
|
607 |
+
public $workflowDefinitionTicket; // string
|
608 |
+
|
609 |
+
}
|
610 |
+
|
611 |
+
}
|
612 |
+
|
613 |
+
if (!class_exists("TargetPagedList")) {
|
614 |
+
|
615 |
+
class TargetPagedList {
|
616 |
+
|
617 |
+
public $elements; // Target
|
618 |
+
public $pagedListInfo; // PagedListInfo
|
619 |
+
public $tasks; // Task
|
620 |
+
public $totalCount; // long
|
621 |
+
|
622 |
+
}
|
623 |
+
|
624 |
+
}
|
625 |
+
|
626 |
+
if (!class_exists("TargetSearchRequest")) {
|
627 |
+
|
628 |
+
class TargetSearchRequest {
|
629 |
+
|
630 |
+
public $dateCreated; // Date
|
631 |
+
public $folder; // ItemFolderEnum
|
632 |
+
public $projectTickets; // string
|
633 |
+
public $sourceLocaleId; // string
|
634 |
+
public $submissionTicket; // string
|
635 |
+
public $targetLocaleId; // string
|
636 |
+
|
637 |
+
}
|
638 |
+
|
639 |
+
}
|
640 |
+
|
641 |
+
if (!class_exists("Task")) {
|
642 |
+
|
643 |
+
class Task {
|
644 |
+
|
645 |
+
public $groupName; // string
|
646 |
+
public $selectStyle; // int
|
647 |
+
public $taskId; // long
|
648 |
+
public $taskName; // string
|
649 |
+
public $weight; // int
|
650 |
+
|
651 |
+
}
|
652 |
+
|
653 |
+
}
|
654 |
+
|
655 |
+
if (!class_exists("TmStatistics")) {
|
656 |
+
|
657 |
+
class TmStatistics {
|
658 |
+
|
659 |
+
public $fuzzyWordCount1; // FuzzyTmStatistics
|
660 |
+
public $fuzzyWordCount10; // FuzzyTmStatistics
|
661 |
+
public $fuzzyWordCount2; // FuzzyTmStatistics
|
662 |
+
public $fuzzyWordCount3; // FuzzyTmStatistics
|
663 |
+
public $fuzzyWordCount4; // FuzzyTmStatistics
|
664 |
+
public $fuzzyWordCount5; // FuzzyTmStatistics
|
665 |
+
public $fuzzyWordCount6; // FuzzyTmStatistics
|
666 |
+
public $fuzzyWordCount7; // FuzzyTmStatistics
|
667 |
+
public $fuzzyWordCount8; // FuzzyTmStatistics
|
668 |
+
public $fuzzyWordCount9; // FuzzyTmStatistics
|
669 |
+
public $goldWordCount; // int
|
670 |
+
public $noMatchWordCount; // int
|
671 |
+
public $oneHundredMatchWordCount; // int
|
672 |
+
public $repetitionWordCount; // int
|
673 |
+
public $totalWordCount; // int
|
674 |
+
|
675 |
+
}
|
676 |
+
|
677 |
+
}
|
678 |
+
|
679 |
+
if (!class_exists("WorkflowDefinition")) {
|
680 |
+
|
681 |
+
class WorkflowDefinition {
|
682 |
+
|
683 |
+
public $description; // string
|
684 |
+
public $name; // string
|
685 |
+
public $ticket; // string
|
686 |
+
public $type; // EntityTypeEnum
|
687 |
+
|
688 |
+
}
|
689 |
+
|
690 |
+
}
|
691 |
+
|
692 |
+
if (!class_exists("UserInfo")) {
|
693 |
+
|
694 |
+
class UserInfo {
|
695 |
+
|
696 |
+
public $accountNonExpired; // boolean
|
697 |
+
public $accountNonLocked; // boolean
|
698 |
+
public $autoClaimMultipleTasks; // boolean
|
699 |
+
public $claimMultipleJobTasks; // boolean
|
700 |
+
public $credentialsNonExpired; // boolean
|
701 |
+
public $dateLastLogin; // dateTime
|
702 |
+
public $emailAddress; // string
|
703 |
+
public $emailNotification; // boolean
|
704 |
+
public $enabled; // boolean
|
705 |
+
public $firstName; // string
|
706 |
+
public $lastName; // string
|
707 |
+
public $password; // string
|
708 |
+
public $timeZone; // string
|
709 |
+
public $userName; // string
|
710 |
+
public $userType; // string
|
711 |
+
|
712 |
+
}
|
713 |
+
|
714 |
+
}
|
715 |
+
|
716 |
+
if (!class_exists("TiUserInfo")) {
|
717 |
+
|
718 |
+
class TiUserInfo {
|
719 |
+
|
720 |
+
public $languageDirections; // LanguageDirection
|
721 |
+
public $organizationId; // long
|
722 |
+
public $projectRoles; // string
|
723 |
+
public $projectTicket; // string
|
724 |
+
public $systemRoles; // string
|
725 |
+
public $vendorId; // long
|
726 |
+
|
727 |
+
}
|
728 |
+
|
729 |
+
}
|
730 |
+
|
731 |
+
if (!class_exists("cancelSubmission")) {
|
732 |
+
|
733 |
+
class cancelSubmission {
|
734 |
+
|
735 |
+
public $submissionId; // string
|
736 |
+
public $userId; // string
|
737 |
+
|
738 |
+
}
|
739 |
+
|
740 |
+
}
|
741 |
+
|
742 |
+
if (!class_exists("cancelSubmissionResponse")) {
|
743 |
+
|
744 |
+
class cancelSubmissionResponse {
|
745 |
+
|
746 |
+
public $return; // string
|
747 |
+
|
748 |
+
}
|
749 |
+
|
750 |
+
}
|
751 |
+
|
752 |
+
if (!class_exists("cancelSubmissionWithComment")) {
|
753 |
+
|
754 |
+
class cancelSubmissionWithComment {
|
755 |
+
|
756 |
+
public $submissionId; // string
|
757 |
+
public $comment; // string
|
758 |
+
public $userId; // string
|
759 |
+
|
760 |
+
}
|
761 |
+
|
762 |
+
}
|
763 |
+
|
764 |
+
if (!class_exists("cancelSubmissionWithCommentResponse")) {
|
765 |
+
|
766 |
+
class cancelSubmissionWithCommentResponse {
|
767 |
+
|
768 |
+
public $return; // string
|
769 |
+
|
770 |
+
}
|
771 |
+
|
772 |
+
}
|
773 |
+
|
774 |
+
if (!class_exists("findByTicket")) {
|
775 |
+
|
776 |
+
class findByTicket {
|
777 |
+
|
778 |
+
public $ticket; // string
|
779 |
+
public $userId; // string
|
780 |
+
|
781 |
+
}
|
782 |
+
|
783 |
+
}
|
784 |
+
|
785 |
+
if (!class_exists("findByTicketResponse")) {
|
786 |
+
|
787 |
+
class findByTicketResponse {
|
788 |
+
|
789 |
+
public $return; // Submission
|
790 |
+
|
791 |
+
}
|
792 |
+
|
793 |
+
}
|
794 |
+
|
795 |
+
if (!class_exists("search")) {
|
796 |
+
|
797 |
+
class search {
|
798 |
+
|
799 |
+
public $command; // SubmissionSearchRequest
|
800 |
+
public $info; // PagedListInfo
|
801 |
+
public $userId; // string
|
802 |
+
|
803 |
+
}
|
804 |
+
|
805 |
+
}
|
806 |
+
|
807 |
+
if (!class_exists("searchResponse")) {
|
808 |
+
|
809 |
+
class searchResponse {
|
810 |
+
|
811 |
+
public $return; // SubmissionPagedList
|
812 |
+
|
813 |
+
}
|
814 |
+
|
815 |
+
}
|
816 |
+
|
817 |
+
if (!class_exists("searchSubmissions")) {
|
818 |
+
|
819 |
+
class searchSubmissions {
|
820 |
+
|
821 |
+
public $submissionSearchRequest; // SubmissionSearchRequest
|
822 |
+
public $info; // PagedListInfo
|
823 |
+
public $userId; // string
|
824 |
+
|
825 |
+
}
|
826 |
+
|
827 |
+
}
|
828 |
+
|
829 |
+
if (!class_exists("searchSubmissionsResponse")) {
|
830 |
+
|
831 |
+
class searchSubmissionsResponse {
|
832 |
+
|
833 |
+
public $return; // SubmissionSearchModelPagedList
|
834 |
+
|
835 |
+
}
|
836 |
+
|
837 |
+
}
|
838 |
+
|
839 |
+
if (!class_exists("startSingleBatchSubmission")) {
|
840 |
+
|
841 |
+
class startSingleBatchSubmission {
|
842 |
+
|
843 |
+
public $submissionId; // string
|
844 |
+
public $submissionInfo; // SubmissionInfo
|
845 |
+
public $userId; // string
|
846 |
+
|
847 |
+
}
|
848 |
+
|
849 |
+
}
|
850 |
+
|
851 |
+
if (!class_exists("startSingleBatchSubmissionResponse")) {
|
852 |
+
|
853 |
+
class startSingleBatchSubmissionResponse {
|
854 |
+
|
855 |
+
public $return; // string
|
856 |
+
|
857 |
+
}
|
858 |
+
|
859 |
+
}
|
860 |
+
|
861 |
+
if (!class_exists("startSubmission")) {
|
862 |
+
|
863 |
+
class startSubmission {
|
864 |
+
|
865 |
+
public $submissionId; // string
|
866 |
+
public $submissionInfo; // SubmissionInfo
|
867 |
+
public $userId; // string
|
868 |
+
|
869 |
+
}
|
870 |
+
|
871 |
+
}
|
872 |
+
|
873 |
+
if (!class_exists("startSubmissionResponse")) {
|
874 |
+
|
875 |
+
class startSubmissionResponse {
|
876 |
+
|
877 |
+
public $return; // string
|
878 |
+
|
879 |
+
}
|
880 |
+
|
881 |
+
}
|
882 |
+
|
883 |
+
if (!class_exists("uploadReference")) {
|
884 |
+
|
885 |
+
class uploadReference {
|
886 |
+
|
887 |
+
public $submissionId; // string
|
888 |
+
public $resourceInfo; // ResourceInfo
|
889 |
+
public $data; // base64Binary
|
890 |
+
public $userId; // string
|
891 |
+
|
892 |
+
}
|
893 |
+
|
894 |
+
}
|
895 |
+
|
896 |
+
if (!class_exists("uploadReferenceResponse")) {
|
897 |
+
|
898 |
+
class uploadReferenceResponse {
|
899 |
+
|
900 |
+
public $return; // string
|
901 |
+
|
902 |
+
}
|
903 |
+
|
904 |
+
}
|
905 |
+
|
906 |
+
/**
|
907 |
+
* SubmissionService2 class
|
908 |
+
*
|
909 |
+
*
|
910 |
+
*
|
911 |
+
* @author {author}
|
912 |
+
* @copyright {copyright}
|
913 |
+
* @package {package}
|
914 |
+
*/
|
915 |
+
class SubmissionService2 extends SoapClient {
|
916 |
+
|
917 |
+
private static $classmap = array(
|
918 |
+
'anonymous0' => 'anonymous0',
|
919 |
+
'base64Binary' => 'base64Binary',
|
920 |
+
'hexBinary' => 'hexBinary',
|
921 |
+
'Notification' => 'Notification',
|
922 |
+
'NotificationPriority' => 'NotificationPriority',
|
923 |
+
'Announcement' => 'Announcement',
|
924 |
+
'ContentMonitorPluginInfo' => 'ContentMonitorPluginInfo',
|
925 |
+
'Date' => 'PDDate',
|
926 |
+
'Document' => 'Document',
|
927 |
+
'DocumentGroup' => 'DocumentGroup',
|
928 |
+
'DocumentInfo' => 'DocumentInfo',
|
929 |
+
'DocumentPagedList' => 'DocumentPagedList',
|
930 |
+
'DocumentSearchRequest' => 'DocumentSearchRequest',
|
931 |
+
'DocumentTicket' => 'DocumentTicket',
|
932 |
+
'EntityTypeEnum' => 'EntityTypeEnum',
|
933 |
+
'FileFormatProfile' => 'FileFormatProfile',
|
934 |
+
'FileFormatProgressData' => 'FileFormatProgressData',
|
935 |
+
'FileProgressData' => 'FileProgressData',
|
936 |
+
'FuzzyTmStatistics' => 'FuzzyTmStatistics',
|
937 |
+
'ItemFolderEnum' => 'ItemFolderEnum',
|
938 |
+
'ItemStatusEnum' => 'ItemStatusEnum',
|
939 |
+
'Metadata' => 'Metadata',
|
940 |
+
'Language' => 'Language',
|
941 |
+
'LanguageDirection' => 'LanguageDirection',
|
942 |
+
'LanguageDirectionModel' => 'LanguageDirectionModel',
|
943 |
+
'PagedListInfo' => 'PagedListInfo',
|
944 |
+
'Phase' => 'Phase',
|
945 |
+
'Priority' => 'Priority',
|
946 |
+
'Project' => 'Project',
|
947 |
+
'ProjectInfo' => 'ProjectInfo',
|
948 |
+
'ProjectLanguage' => 'ProjectLanguage',
|
949 |
+
'RepositoryItem' => 'RepositoryItem',
|
950 |
+
'ResourceInfo' => 'ResourceInfo',
|
951 |
+
'ResourceType' => 'ResourceType',
|
952 |
+
'Submission' => 'Submission',
|
953 |
+
'SubmissionInfo' => 'SubmissionInfo',
|
954 |
+
'SubmissionPagedList' => 'SubmissionPagedList',
|
955 |
+
'SimpleSubmissionSearchModel' => 'SimpleSubmissionSearchModel',
|
956 |
+
'SubmissionSearchModelPagedList' => 'SubmissionSearchModelPagedList',
|
957 |
+
'SubmissionSearchRequest' => 'SubmissionSearchRequest',
|
958 |
+
'Target' => 'Target',
|
959 |
+
'TargetInfo' => 'TargetInfo',
|
960 |
+
'TargetPagedList' => 'TargetPagedList',
|
961 |
+
'TargetSearchRequest' => 'TargetSearchRequest',
|
962 |
+
'Task' => 'Task',
|
963 |
+
'TmStatistics' => 'TmStatistics',
|
964 |
+
'WorkflowDefinition' => 'WorkflowDefinition',
|
965 |
+
'UserInfo' => 'UserInfo',
|
966 |
+
'TiUserInfo' => 'TiUserInfo',
|
967 |
+
'cancelSubmission' => 'cancelSubmission',
|
968 |
+
'cancelSubmissionResponse' => 'cancelSubmissionResponse',
|
969 |
+
'cancelSubmissionWithComment' => 'cancelSubmissionWithComment',
|
970 |
+
'cancelSubmissionWithCommentResponse' => 'cancelSubmissionWithCommentResponse',
|
971 |
+
'findByTicket' => 'findByTicket',
|
972 |
+
'findByTicketResponse' => 'findByTicketResponse',
|
973 |
+
'search' => 'search',
|
974 |
+
'searchResponse' => 'searchResponse',
|
975 |
+
'searchSubmissions' => 'searchSubmissions',
|
976 |
+
'searchSubmissionsResponse' => 'searchSubmissionsResponse',
|
977 |
+
'startSingleBatchSubmission' => 'startSingleBatchSubmission',
|
978 |
+
'startSingleBatchSubmissionResponse' => 'startSingleBatchSubmissionResponse',
|
979 |
+
'startSubmission' => 'startSubmission',
|
980 |
+
'startSubmissionResponse' => 'startSubmissionResponse',
|
981 |
+
'uploadReference' => 'uploadReference',
|
982 |
+
'uploadReferenceResponse' => 'uploadReferenceResponse',
|
983 |
+
);
|
984 |
+
|
985 |
+
public function SubmissionService2($wsdl = "http://localhost:8080/pd4/services/SubmissionService2?wsdl", $options = array()) {
|
986 |
+
foreach (self::$classmap as $key => $value) {
|
987 |
+
if (!isset($options['classmap'][$key])) {
|
988 |
+
$options['classmap'][$key] = $value;
|
989 |
+
}
|
990 |
+
}
|
991 |
+
parent::__construct($wsdl, $options);
|
992 |
+
}
|
993 |
+
|
994 |
+
/**
|
995 |
+
*
|
996 |
+
*
|
997 |
+
* @param startSubmission $parameters
|
998 |
+
* @return startSubmissionResponse
|
999 |
+
*/
|
1000 |
+
public function startSubmission(startSubmission $parameters) {
|
1001 |
+
return $this->__soapCall('startSubmission', array($parameters), array(
|
1002 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1003 |
+
'soapaction' => ''
|
1004 |
+
)
|
1005 |
+
);
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
/**
|
1009 |
+
*
|
1010 |
+
*
|
1011 |
+
* @param cancelSubmission $parameters
|
1012 |
+
* @return cancelSubmissionResponse
|
1013 |
+
*/
|
1014 |
+
public function cancelSubmission(cancelSubmission $parameters) {
|
1015 |
+
return $this->__soapCall('cancelSubmission', array($parameters), array(
|
1016 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1017 |
+
'soapaction' => ''
|
1018 |
+
)
|
1019 |
+
);
|
1020 |
+
}
|
1021 |
+
|
1022 |
+
/**
|
1023 |
+
*
|
1024 |
+
*
|
1025 |
+
* @param findByTicket $parameters
|
1026 |
+
* @return findByTicketResponse
|
1027 |
+
*/
|
1028 |
+
public function findByTicket(findByTicket $parameters) {
|
1029 |
+
return $this->__soapCall('findByTicket', array($parameters), array(
|
1030 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1031 |
+
'soapaction' => ''
|
1032 |
+
)
|
1033 |
+
);
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
/**
|
1037 |
+
*
|
1038 |
+
*
|
1039 |
+
* @param searchSubmissions $parameters
|
1040 |
+
* @return searchSubmissionsResponse
|
1041 |
+
*/
|
1042 |
+
public function searchSubmissions(searchSubmissions $parameters) {
|
1043 |
+
return $this->__soapCall('searchSubmissions', array($parameters), array(
|
1044 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1045 |
+
'soapaction' => ''
|
1046 |
+
)
|
1047 |
+
);
|
1048 |
+
}
|
1049 |
+
|
1050 |
+
/**
|
1051 |
+
*
|
1052 |
+
*
|
1053 |
+
* @param cancelSubmissionWithComment $parameters
|
1054 |
+
* @return cancelSubmissionWithCommentResponse
|
1055 |
+
*/
|
1056 |
+
public function cancelSubmissionWithComment(cancelSubmissionWithComment $parameters) {
|
1057 |
+
return $this->__soapCall('cancelSubmissionWithComment', array($parameters), array(
|
1058 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1059 |
+
'soapaction' => ''
|
1060 |
+
)
|
1061 |
+
);
|
1062 |
+
}
|
1063 |
+
|
1064 |
+
/**
|
1065 |
+
*
|
1066 |
+
*
|
1067 |
+
* @param startSingleBatchSubmission $parameters
|
1068 |
+
* @return startSingleBatchSubmissionResponse
|
1069 |
+
*/
|
1070 |
+
public function startSingleBatchSubmission(startSingleBatchSubmission $parameters) {
|
1071 |
+
return $this->__soapCall('startSingleBatchSubmission', array($parameters), array(
|
1072 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1073 |
+
'soapaction' => ''
|
1074 |
+
)
|
1075 |
+
);
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
/**
|
1079 |
+
*
|
1080 |
+
*
|
1081 |
+
* @param search $parameters
|
1082 |
+
* @return searchResponse
|
1083 |
+
*/
|
1084 |
+
public function search(search $parameters) {
|
1085 |
+
return $this->__soapCall('search', array($parameters), array(
|
1086 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1087 |
+
'soapaction' => ''
|
1088 |
+
)
|
1089 |
+
);
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
/**
|
1093 |
+
*
|
1094 |
+
*
|
1095 |
+
* @param uploadReference $parameters
|
1096 |
+
* @return uploadReferenceResponse
|
1097 |
+
*/
|
1098 |
+
public function uploadReference(uploadReference $parameters) {
|
1099 |
+
return $this->__soapCall('uploadReference', array($parameters), array(
|
1100 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1101 |
+
'soapaction' => ''
|
1102 |
+
)
|
1103 |
+
);
|
1104 |
+
}
|
1105 |
+
|
1106 |
+
}
|
1107 |
+
|
1108 |
+
?>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/client/TargetService2.php
ADDED
@@ -0,0 +1,1257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
if (!class_exists("PDDate")) {
|
17 |
+
|
18 |
+
class PDDate {
|
19 |
+
|
20 |
+
public $critical; // boolean
|
21 |
+
public $date; // long
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
if (!class_exists("anonymous0")) {
|
28 |
+
|
29 |
+
class anonymous0 {
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
if (!class_exists("base64Binary")) {
|
36 |
+
|
37 |
+
class base64Binary {
|
38 |
+
|
39 |
+
public $_; // base64Binary
|
40 |
+
public $contentType; // anonymous0
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
if (!class_exists("hexBinary")) {
|
47 |
+
|
48 |
+
class hexBinary {
|
49 |
+
|
50 |
+
public $_; // hexBinary
|
51 |
+
public $contentType; // anonymous0
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
if (!class_exists("Notification")) {
|
58 |
+
|
59 |
+
class Notification {
|
60 |
+
|
61 |
+
public $errorMessage; // string
|
62 |
+
public $notificationDate; // Date
|
63 |
+
public $notificationPriority; // NotificationPriority
|
64 |
+
public $notificationText; // string
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
if (!class_exists("NotificationPriority")) {
|
71 |
+
|
72 |
+
class NotificationPriority {
|
73 |
+
|
74 |
+
public $notificationPriorityName; // string
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
if (!class_exists("Announcement")) {
|
81 |
+
|
82 |
+
class Announcement {
|
83 |
+
|
84 |
+
public $announcementText; // string
|
85 |
+
public $date; // Date
|
86 |
+
|
87 |
+
}
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
if (!class_exists("ContentMonitorPluginInfo")) {
|
92 |
+
|
93 |
+
class ContentMonitorPluginInfo {
|
94 |
+
|
95 |
+
public $pluginId; // string
|
96 |
+
public $pluginName; // string
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
if (!class_exists("Document")) {
|
103 |
+
|
104 |
+
class Document {
|
105 |
+
|
106 |
+
public $documentGroup; // DocumentGroup
|
107 |
+
public $documentInfo; // DocumentInfo
|
108 |
+
public $id; // string
|
109 |
+
public $sourceLanguage; // Language
|
110 |
+
public $sourceWordCount; // int
|
111 |
+
public $ticket; // string
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
}
|
116 |
+
|
117 |
+
if (!class_exists("DocumentGroup")) {
|
118 |
+
|
119 |
+
class DocumentGroup {
|
120 |
+
|
121 |
+
public $classifier; // string
|
122 |
+
public $documents; // Document
|
123 |
+
public $mimeType; // string
|
124 |
+
public $submission; // Submission
|
125 |
+
|
126 |
+
}
|
127 |
+
|
128 |
+
}
|
129 |
+
|
130 |
+
if (!class_exists("DocumentInfo")) {
|
131 |
+
|
132 |
+
class DocumentInfo {
|
133 |
+
|
134 |
+
public $clientIdentifier; // string
|
135 |
+
public $dateRequested; // Date
|
136 |
+
public $instructions; // string
|
137 |
+
public $metadata; // Metadata
|
138 |
+
public $name; // string
|
139 |
+
public $projectTicket; // string
|
140 |
+
public $sourceLocale; // string
|
141 |
+
public $submissionTicket; // string
|
142 |
+
public $targetInfos; // TargetInfo
|
143 |
+
public $wordCount; // int
|
144 |
+
|
145 |
+
}
|
146 |
+
|
147 |
+
}
|
148 |
+
|
149 |
+
if (!class_exists("DocumentPagedList")) {
|
150 |
+
|
151 |
+
class DocumentPagedList {
|
152 |
+
|
153 |
+
public $elements; // Document
|
154 |
+
public $pagedListInfo; // PagedListInfo
|
155 |
+
public $tasks; // Task
|
156 |
+
public $totalCount; // long
|
157 |
+
|
158 |
+
}
|
159 |
+
|
160 |
+
}
|
161 |
+
|
162 |
+
if (!class_exists("DocumentSearchRequest")) {
|
163 |
+
|
164 |
+
class DocumentSearchRequest {
|
165 |
+
|
166 |
+
public $projectTickets; // string
|
167 |
+
public $sourceLocaleId; // string
|
168 |
+
public $submissionTicket; // string
|
169 |
+
|
170 |
+
}
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
if (!class_exists("DocumentTicket")) {
|
175 |
+
|
176 |
+
class DocumentTicket {
|
177 |
+
|
178 |
+
public $submissionTicket; // string
|
179 |
+
public $ticketId; // string
|
180 |
+
|
181 |
+
}
|
182 |
+
|
183 |
+
}
|
184 |
+
|
185 |
+
if (!class_exists("EntityTypeEnum")) {
|
186 |
+
|
187 |
+
class EntityTypeEnum {
|
188 |
+
|
189 |
+
public $name; // string
|
190 |
+
public $value; // int
|
191 |
+
|
192 |
+
}
|
193 |
+
|
194 |
+
}
|
195 |
+
|
196 |
+
if (!class_exists("FileFormatProfile")) {
|
197 |
+
|
198 |
+
class FileFormatProfile {
|
199 |
+
|
200 |
+
public $configurable; // boolean
|
201 |
+
public $isDefault; // boolean
|
202 |
+
public $mimeType; // string
|
203 |
+
public $pluginId; // string
|
204 |
+
public $pluginName; // string
|
205 |
+
public $profileName; // string
|
206 |
+
public $targetWorkflowDefinition; // WorkflowDefinition
|
207 |
+
public $ticket; // string
|
208 |
+
|
209 |
+
}
|
210 |
+
|
211 |
+
}
|
212 |
+
|
213 |
+
if (!class_exists("FileFormatProgressData")) {
|
214 |
+
|
215 |
+
class FileFormatProgressData {
|
216 |
+
|
217 |
+
public $dateCompleted; // Date
|
218 |
+
public $fileCount; // long
|
219 |
+
public $fileFormatName; // string
|
220 |
+
public $fileProgressData; // FileProgressData
|
221 |
+
public $jobTicket; // string
|
222 |
+
public $workflowDueDate; // Date
|
223 |
+
public $workflowStatus; // string
|
224 |
+
|
225 |
+
}
|
226 |
+
|
227 |
+
}
|
228 |
+
|
229 |
+
if (!class_exists("FileProgressData")) {
|
230 |
+
|
231 |
+
class FileProgressData {
|
232 |
+
|
233 |
+
public $numberOfAvailableFiles; // int
|
234 |
+
public $numberOfCanceledFiles; // int
|
235 |
+
public $numberOfCompletedFiles; // int
|
236 |
+
public $numberOfDeliveredFiles; // int
|
237 |
+
public $numberOfFailedFiles; // int
|
238 |
+
public $numberOfInProcessFiles; // int
|
239 |
+
public $overallProgressPercent; // int
|
240 |
+
|
241 |
+
}
|
242 |
+
|
243 |
+
}
|
244 |
+
|
245 |
+
if (!class_exists("FuzzyTmStatistics")) {
|
246 |
+
|
247 |
+
class FuzzyTmStatistics {
|
248 |
+
|
249 |
+
public $fuzzyName; // string
|
250 |
+
public $wordCount; // int
|
251 |
+
|
252 |
+
}
|
253 |
+
|
254 |
+
}
|
255 |
+
|
256 |
+
if (!class_exists("ItemFolderEnum")) {
|
257 |
+
|
258 |
+
class ItemFolderEnum {
|
259 |
+
|
260 |
+
public $value; // int
|
261 |
+
|
262 |
+
}
|
263 |
+
|
264 |
+
}
|
265 |
+
|
266 |
+
if (!class_exists("ItemStatusEnum")) {
|
267 |
+
|
268 |
+
class ItemStatusEnum {
|
269 |
+
|
270 |
+
public $name; // string
|
271 |
+
public $value; // int
|
272 |
+
|
273 |
+
}
|
274 |
+
|
275 |
+
}
|
276 |
+
|
277 |
+
if (!class_exists("Metadata")) {
|
278 |
+
|
279 |
+
class Metadata {
|
280 |
+
|
281 |
+
public $key; // string
|
282 |
+
public $value; // string
|
283 |
+
|
284 |
+
}
|
285 |
+
|
286 |
+
}
|
287 |
+
|
288 |
+
if (!class_exists("Language")) {
|
289 |
+
|
290 |
+
class Language {
|
291 |
+
|
292 |
+
public $locale; // string
|
293 |
+
public $value; // string
|
294 |
+
|
295 |
+
}
|
296 |
+
|
297 |
+
}
|
298 |
+
|
299 |
+
if (!class_exists("LanguageDirection")) {
|
300 |
+
|
301 |
+
class LanguageDirection {
|
302 |
+
|
303 |
+
public $sourceLanguage; // Language
|
304 |
+
public $targetLanguage; // Language
|
305 |
+
|
306 |
+
}
|
307 |
+
|
308 |
+
}
|
309 |
+
|
310 |
+
if (!class_exists("LanguageDirectionModel")) {
|
311 |
+
|
312 |
+
class LanguageDirectionModel {
|
313 |
+
|
314 |
+
public $dateCompleted; // Date
|
315 |
+
public $fileCount; // long
|
316 |
+
public $fileFormatProgressData; // FileFormatProgressData
|
317 |
+
public $fileProgress; // FileProgressData
|
318 |
+
public $sourceLanguage; // Language
|
319 |
+
public $targetLanguage; // Language
|
320 |
+
public $workflowDueDate; // Date
|
321 |
+
public $workflowStatus; // string
|
322 |
+
|
323 |
+
}
|
324 |
+
|
325 |
+
}
|
326 |
+
|
327 |
+
if (!class_exists("PagedListInfo")) {
|
328 |
+
|
329 |
+
class PagedListInfo {
|
330 |
+
|
331 |
+
public $index; // int
|
332 |
+
public $indexesSize; // int
|
333 |
+
public $size; // int
|
334 |
+
public $sortDirection; // string
|
335 |
+
public $sortProperty; // string
|
336 |
+
|
337 |
+
}
|
338 |
+
|
339 |
+
}
|
340 |
+
|
341 |
+
if (!class_exists("Phase")) {
|
342 |
+
|
343 |
+
class Phase {
|
344 |
+
|
345 |
+
public $dateEnded; // Date
|
346 |
+
public $dueDate; // Date
|
347 |
+
public $name; // string
|
348 |
+
public $status; // ItemStatusEnum
|
349 |
+
|
350 |
+
}
|
351 |
+
|
352 |
+
}
|
353 |
+
|
354 |
+
if (!class_exists("Priority")) {
|
355 |
+
|
356 |
+
class Priority {
|
357 |
+
|
358 |
+
public $name; // string
|
359 |
+
public $value; // int
|
360 |
+
|
361 |
+
}
|
362 |
+
|
363 |
+
}
|
364 |
+
|
365 |
+
if (!class_exists("Project")) {
|
366 |
+
|
367 |
+
class Project {
|
368 |
+
|
369 |
+
public $announcements; // Announcement
|
370 |
+
public $contentMonitorPluginInfo; // ContentMonitorPluginInfo
|
371 |
+
public $defaultLanguageDirections; // LanguageDirection
|
372 |
+
public $defaultTargetWorkflowDefinition; // WorkflowDefinition
|
373 |
+
public $defaultTargetWorkflowDefinitionTicket; // string
|
374 |
+
public $fileFormatProfiles; // FileFormatProfile
|
375 |
+
public $frequentLanguageDirections; // LanguageDirection
|
376 |
+
public $metadata; // Metadata
|
377 |
+
public $organizationName; // string
|
378 |
+
public $projectInfo; // ProjectInfo
|
379 |
+
public $projectLanguageDirections; // LanguageDirection
|
380 |
+
public $ticket; // string
|
381 |
+
public $workflowDefinitions; // WorkflowDefinition
|
382 |
+
|
383 |
+
}
|
384 |
+
|
385 |
+
}
|
386 |
+
|
387 |
+
if (!class_exists("ProjectInfo")) {
|
388 |
+
|
389 |
+
class ProjectInfo {
|
390 |
+
|
391 |
+
public $clientIdentifier; // string
|
392 |
+
public $defaultJobWorkflowDefinitionTicket; // string
|
393 |
+
public $defaultSubmissionWorkflowDefinitionTicket; // string
|
394 |
+
public $defaultTargetWorkflowDefinitionTicket; // string
|
395 |
+
public $enabled; // boolean
|
396 |
+
public $name; // string
|
397 |
+
public $shortCode; // string
|
398 |
+
|
399 |
+
}
|
400 |
+
|
401 |
+
}
|
402 |
+
|
403 |
+
if (!class_exists("ProjectLanguage")) {
|
404 |
+
|
405 |
+
class ProjectLanguage {
|
406 |
+
|
407 |
+
public $customLocaleCode; // string
|
408 |
+
public $localeCode; // string
|
409 |
+
|
410 |
+
}
|
411 |
+
|
412 |
+
}
|
413 |
+
|
414 |
+
if (!class_exists("RepositoryItem")) {
|
415 |
+
|
416 |
+
class RepositoryItem {
|
417 |
+
|
418 |
+
public $data; // base64Binary
|
419 |
+
public $resourceInfo; // ResourceInfo
|
420 |
+
|
421 |
+
}
|
422 |
+
|
423 |
+
}
|
424 |
+
|
425 |
+
if (!class_exists("ResourceInfo")) {
|
426 |
+
|
427 |
+
class ResourceInfo {
|
428 |
+
|
429 |
+
public $classifier; // string
|
430 |
+
public $clientIdentifier; // string
|
431 |
+
public $description; // string
|
432 |
+
public $encoding; // string
|
433 |
+
public $md5Checksum; // string
|
434 |
+
public $mimeType; // string
|
435 |
+
public $name; // string
|
436 |
+
public $path; // string
|
437 |
+
public $resourceInfoId; // long
|
438 |
+
public $size; // long
|
439 |
+
public $type; // ResourceType
|
440 |
+
|
441 |
+
}
|
442 |
+
|
443 |
+
}
|
444 |
+
|
445 |
+
if (!class_exists("ResourceType")) {
|
446 |
+
|
447 |
+
class ResourceType {
|
448 |
+
|
449 |
+
public $value; // int
|
450 |
+
|
451 |
+
}
|
452 |
+
|
453 |
+
}
|
454 |
+
|
455 |
+
if (!class_exists("Submission")) {
|
456 |
+
|
457 |
+
class Submission {
|
458 |
+
|
459 |
+
public $alerts; // Notification
|
460 |
+
public $availableTasks; // int
|
461 |
+
public $dateCompleted; // Date
|
462 |
+
public $dateCreated; // Date
|
463 |
+
public $dateEstimated; // Date
|
464 |
+
public $documents; // Document
|
465 |
+
public $dueDate; // Date
|
466 |
+
public $id; // string
|
467 |
+
public $owner; // string
|
468 |
+
public $project; // Project
|
469 |
+
public $status; // ItemStatusEnum
|
470 |
+
public $submissionInfo; // SubmissionInfo
|
471 |
+
public $submitter; // string
|
472 |
+
public $submitterFullName; // string
|
473 |
+
public $ticket; // string
|
474 |
+
public $workflowDefinition; // WorkflowDefinition
|
475 |
+
|
476 |
+
}
|
477 |
+
|
478 |
+
}
|
479 |
+
|
480 |
+
if (!class_exists("SubmissionInfo")) {
|
481 |
+
|
482 |
+
class SubmissionInfo {
|
483 |
+
|
484 |
+
public $clientIdentifier; // string
|
485 |
+
public $dateRequested; // Date
|
486 |
+
public $metadata; // Metadata
|
487 |
+
public $name; // string
|
488 |
+
public $projectTicket; // string
|
489 |
+
public $submitter; // string
|
490 |
+
public $workflowDefinitionTicket; // string
|
491 |
+
|
492 |
+
}
|
493 |
+
|
494 |
+
}
|
495 |
+
|
496 |
+
if (!class_exists("SubmissionPagedList")) {
|
497 |
+
|
498 |
+
class SubmissionPagedList {
|
499 |
+
|
500 |
+
public $elements; // Submission
|
501 |
+
public $pagedListInfo; // PagedListInfo
|
502 |
+
public $tasks; // Task
|
503 |
+
public $totalCount; // long
|
504 |
+
|
505 |
+
}
|
506 |
+
|
507 |
+
}
|
508 |
+
|
509 |
+
if (!class_exists("SimpleSubmissionSearchModel")) {
|
510 |
+
|
511 |
+
class SimpleSubmissionSearchModel {
|
512 |
+
|
513 |
+
public $alerts; // Notification
|
514 |
+
public $availableTasks; // long
|
515 |
+
public $date; // Date
|
516 |
+
public $dateCompleted; // Date
|
517 |
+
public $dueDate; // Date
|
518 |
+
public $fileCount; // long
|
519 |
+
public $fileProgress; // FileProgressData
|
520 |
+
public $id; // string
|
521 |
+
public $instructions; // string
|
522 |
+
public $officeName; // string
|
523 |
+
public $owner; // string
|
524 |
+
public $priority; // string
|
525 |
+
public $projectName; // string
|
526 |
+
public $projectTicket; // string
|
527 |
+
public $sourceLanguage; // string
|
528 |
+
public $status; // ItemStatusEnum
|
529 |
+
public $submissionName; // string
|
530 |
+
public $submitterFullName; // string
|
531 |
+
public $ticket; // string
|
532 |
+
public $wordCount; // long
|
533 |
+
public $workflowDueDate; // Date
|
534 |
+
public $workflowStatus; // string
|
535 |
+
|
536 |
+
}
|
537 |
+
|
538 |
+
}
|
539 |
+
|
540 |
+
if (!class_exists("anonymous0")) {
|
541 |
+
|
542 |
+
class SubmissionSearchModelPagedList {
|
543 |
+
|
544 |
+
public $elements; // SimpleSubmissionSearchModel
|
545 |
+
public $pagedListInfo; // PagedListInfo
|
546 |
+
public $tasks; // Task
|
547 |
+
public $totalCount; // long
|
548 |
+
|
549 |
+
}
|
550 |
+
|
551 |
+
}
|
552 |
+
|
553 |
+
if (!class_exists("SubmissionSearchRequest")) {
|
554 |
+
|
555 |
+
class SubmissionSearchRequest {
|
556 |
+
|
557 |
+
public $folder; // ItemFolderEnum
|
558 |
+
public $projectTickets; // string
|
559 |
+
public $submissionDate; // Date
|
560 |
+
public $submissionDueDate; // Date
|
561 |
+
public $submissionName; // string
|
562 |
+
|
563 |
+
}
|
564 |
+
|
565 |
+
}
|
566 |
+
|
567 |
+
if (!class_exists("Target")) {
|
568 |
+
|
569 |
+
class Target {
|
570 |
+
|
571 |
+
public $availableTasks; // long
|
572 |
+
public $dateCompleted; // Date
|
573 |
+
public $dateCreated; // Date
|
574 |
+
public $dateEstimated; // Date
|
575 |
+
public $document; // Document
|
576 |
+
public $downloadThresholdTimeStamp; // Date
|
577 |
+
public $dueDate; // Date
|
578 |
+
public $fileName; // string
|
579 |
+
public $id; // string
|
580 |
+
public $phases; // Phase
|
581 |
+
public $refPhase; // Phase
|
582 |
+
public $sourceLanguage; // Language
|
583 |
+
public $sourceWordCount; // int
|
584 |
+
public $status; // ItemStatusEnum
|
585 |
+
public $targetInfo; // TargetInfo
|
586 |
+
public $targetLanguage; // Language
|
587 |
+
public $targetWordCount; // int
|
588 |
+
public $ticket; // string
|
589 |
+
public $tmStatistics; // TmStatistics
|
590 |
+
public $workflowDefinition; // WorkflowDefinition
|
591 |
+
|
592 |
+
}
|
593 |
+
|
594 |
+
}
|
595 |
+
|
596 |
+
if (!class_exists("TargetInfo")) {
|
597 |
+
|
598 |
+
class TargetInfo {
|
599 |
+
|
600 |
+
public $dateRequested; // Date
|
601 |
+
public $encoding; // string
|
602 |
+
public $instructions; // string
|
603 |
+
public $metadata; // Metadata
|
604 |
+
public $priority; // Priority
|
605 |
+
public $requestedDueDate; // long
|
606 |
+
public $targetLocale; // string
|
607 |
+
public $workflowDefinitionTicket; // string
|
608 |
+
|
609 |
+
}
|
610 |
+
|
611 |
+
}
|
612 |
+
|
613 |
+
if (!class_exists("TargetPagedList")) {
|
614 |
+
|
615 |
+
class TargetPagedList {
|
616 |
+
|
617 |
+
public $elements; // Target
|
618 |
+
public $pagedListInfo; // PagedListInfo
|
619 |
+
public $tasks; // Task
|
620 |
+
public $totalCount; // long
|
621 |
+
|
622 |
+
}
|
623 |
+
|
624 |
+
}
|
625 |
+
|
626 |
+
if (!class_exists("TargetSearchRequest")) {
|
627 |
+
|
628 |
+
class TargetSearchRequest {
|
629 |
+
|
630 |
+
public $dateCreated; // Date
|
631 |
+
public $folder; // ItemFolderEnum
|
632 |
+
public $projectTickets; // string
|
633 |
+
public $sourceLocaleId; // string
|
634 |
+
public $submissionTicket; // string
|
635 |
+
public $targetLocaleId; // string
|
636 |
+
|
637 |
+
}
|
638 |
+
|
639 |
+
}
|
640 |
+
|
641 |
+
if (!class_exists("Task")) {
|
642 |
+
|
643 |
+
class Task {
|
644 |
+
|
645 |
+
public $groupName; // string
|
646 |
+
public $selectStyle; // int
|
647 |
+
public $taskId; // long
|
648 |
+
public $taskName; // string
|
649 |
+
public $weight; // int
|
650 |
+
|
651 |
+
}
|
652 |
+
|
653 |
+
}
|
654 |
+
|
655 |
+
if (!class_exists("TmStatistics")) {
|
656 |
+
|
657 |
+
class TmStatistics {
|
658 |
+
|
659 |
+
public $fuzzyWordCount1; // FuzzyTmStatistics
|
660 |
+
public $fuzzyWordCount10; // FuzzyTmStatistics
|
661 |
+
public $fuzzyWordCount2; // FuzzyTmStatistics
|
662 |
+
public $fuzzyWordCount3; // FuzzyTmStatistics
|
663 |
+
public $fuzzyWordCount4; // FuzzyTmStatistics
|
664 |
+
public $fuzzyWordCount5; // FuzzyTmStatistics
|
665 |
+
public $fuzzyWordCount6; // FuzzyTmStatistics
|
666 |
+
public $fuzzyWordCount7; // FuzzyTmStatistics
|
667 |
+
public $fuzzyWordCount8; // FuzzyTmStatistics
|
668 |
+
public $fuzzyWordCount9; // FuzzyTmStatistics
|
669 |
+
public $goldWordCount; // int
|
670 |
+
public $noMatchWordCount; // int
|
671 |
+
public $oneHundredMatchWordCount; // int
|
672 |
+
public $repetitionWordCount; // int
|
673 |
+
public $totalWordCount; // int
|
674 |
+
|
675 |
+
}
|
676 |
+
|
677 |
+
}
|
678 |
+
|
679 |
+
if (!class_exists("WorkflowDefinition")) {
|
680 |
+
|
681 |
+
class WorkflowDefinition {
|
682 |
+
|
683 |
+
public $description; // string
|
684 |
+
public $name; // string
|
685 |
+
public $ticket; // string
|
686 |
+
public $type; // EntityTypeEnum
|
687 |
+
|
688 |
+
}
|
689 |
+
|
690 |
+
}
|
691 |
+
|
692 |
+
if (!class_exists("UserInfo")) {
|
693 |
+
|
694 |
+
class UserInfo {
|
695 |
+
|
696 |
+
public $accountNonExpired; // boolean
|
697 |
+
public $accountNonLocked; // boolean
|
698 |
+
public $autoClaimMultipleTasks; // boolean
|
699 |
+
public $claimMultipleJobTasks; // boolean
|
700 |
+
public $credentialsNonExpired; // boolean
|
701 |
+
public $dateLastLogin; // dateTime
|
702 |
+
public $emailAddress; // string
|
703 |
+
public $emailNotification; // boolean
|
704 |
+
public $enabled; // boolean
|
705 |
+
public $firstName; // string
|
706 |
+
public $lastName; // string
|
707 |
+
public $password; // string
|
708 |
+
public $timeZone; // string
|
709 |
+
public $userName; // string
|
710 |
+
public $userType; // string
|
711 |
+
|
712 |
+
}
|
713 |
+
|
714 |
+
}
|
715 |
+
|
716 |
+
if (!class_exists("TiUserInfo")) {
|
717 |
+
|
718 |
+
class TiUserInfo {
|
719 |
+
|
720 |
+
public $languageDirections; // LanguageDirection
|
721 |
+
public $organizationId; // long
|
722 |
+
public $projectRoles; // string
|
723 |
+
public $projectTicket; // string
|
724 |
+
public $systemRoles; // string
|
725 |
+
public $vendorId; // long
|
726 |
+
|
727 |
+
}
|
728 |
+
|
729 |
+
}
|
730 |
+
|
731 |
+
if (!class_exists("cancelTargetByDocumentId")) {
|
732 |
+
|
733 |
+
class cancelTargetByDocumentId {
|
734 |
+
|
735 |
+
public $documentId; // DocumentTicket
|
736 |
+
public $targetLocale; // string
|
737 |
+
public $userId; // string
|
738 |
+
|
739 |
+
}
|
740 |
+
|
741 |
+
}
|
742 |
+
|
743 |
+
if (!class_exists("cancelTargetByDocumentIdResponse")) {
|
744 |
+
|
745 |
+
class cancelTargetByDocumentIdResponse {
|
746 |
+
|
747 |
+
public $return; // string
|
748 |
+
|
749 |
+
}
|
750 |
+
|
751 |
+
}
|
752 |
+
|
753 |
+
if (!class_exists("cancelTarget")) {
|
754 |
+
|
755 |
+
class cancelTarget {
|
756 |
+
|
757 |
+
public $targetId; // string
|
758 |
+
public $userId; // string
|
759 |
+
|
760 |
+
}
|
761 |
+
|
762 |
+
}
|
763 |
+
|
764 |
+
if (!class_exists("cancelTargetResponse")) {
|
765 |
+
|
766 |
+
class cancelTargetResponse {
|
767 |
+
|
768 |
+
public $return; // string
|
769 |
+
|
770 |
+
}
|
771 |
+
|
772 |
+
}
|
773 |
+
|
774 |
+
if (!class_exists("downloadTargetResource")) {
|
775 |
+
|
776 |
+
class downloadTargetResource {
|
777 |
+
|
778 |
+
public $targetId; // string
|
779 |
+
public $userId; // string
|
780 |
+
|
781 |
+
}
|
782 |
+
|
783 |
+
}
|
784 |
+
|
785 |
+
if (!class_exists("downloadTargetResourceResponse")) {
|
786 |
+
|
787 |
+
class downloadTargetResourceResponse {
|
788 |
+
|
789 |
+
public $return; // RepositoryItem
|
790 |
+
|
791 |
+
}
|
792 |
+
|
793 |
+
}
|
794 |
+
|
795 |
+
if (!class_exists("findByTicket")) {
|
796 |
+
|
797 |
+
class findByTicket {
|
798 |
+
|
799 |
+
public $ticket; // string
|
800 |
+
public $userId; // string
|
801 |
+
|
802 |
+
}
|
803 |
+
|
804 |
+
}
|
805 |
+
|
806 |
+
if (!class_exists("findByTicketResponse")) {
|
807 |
+
|
808 |
+
class findByTicketResponse {
|
809 |
+
|
810 |
+
public $return; // Target
|
811 |
+
|
812 |
+
}
|
813 |
+
|
814 |
+
}
|
815 |
+
|
816 |
+
if (!class_exists("getCompletedTargetsByDocuments")) {
|
817 |
+
|
818 |
+
class getCompletedTargetsByDocuments {
|
819 |
+
|
820 |
+
public $documentTickets; // string
|
821 |
+
public $maxResults; // int
|
822 |
+
public $userId; // string
|
823 |
+
|
824 |
+
}
|
825 |
+
|
826 |
+
}
|
827 |
+
|
828 |
+
if (!class_exists("getCompletedTargetsByDocumentsResponse")) {
|
829 |
+
|
830 |
+
class getCompletedTargetsByDocumentsResponse {
|
831 |
+
|
832 |
+
public $return; // Target
|
833 |
+
|
834 |
+
}
|
835 |
+
|
836 |
+
}
|
837 |
+
|
838 |
+
if (!class_exists("getCompletedTargetsByProjects")) {
|
839 |
+
|
840 |
+
class getCompletedTargetsByProjects {
|
841 |
+
|
842 |
+
public $projectTickets; // string
|
843 |
+
public $maxResults; // int
|
844 |
+
public $userId; // string
|
845 |
+
|
846 |
+
}
|
847 |
+
|
848 |
+
}
|
849 |
+
|
850 |
+
if (!class_exists("getCompletedTargetsByProjectsResponse")) {
|
851 |
+
|
852 |
+
class getCompletedTargetsByProjectsResponse {
|
853 |
+
|
854 |
+
public $return; // Target
|
855 |
+
|
856 |
+
}
|
857 |
+
|
858 |
+
}
|
859 |
+
|
860 |
+
if (!class_exists("getCompletedTargetsBySubmissions")) {
|
861 |
+
|
862 |
+
class getCompletedTargetsBySubmissions {
|
863 |
+
|
864 |
+
public $submissionTickets; // string
|
865 |
+
public $maxResults; // int
|
866 |
+
public $userId; // string
|
867 |
+
|
868 |
+
}
|
869 |
+
|
870 |
+
}
|
871 |
+
|
872 |
+
if (!class_exists("getCompletedTargetsBySubmissionsResponse")) {
|
873 |
+
|
874 |
+
class getCompletedTargetsBySubmissionsResponse {
|
875 |
+
|
876 |
+
public $return; // Target
|
877 |
+
|
878 |
+
}
|
879 |
+
|
880 |
+
}
|
881 |
+
|
882 |
+
if (!class_exists("search")) {
|
883 |
+
|
884 |
+
class search {
|
885 |
+
|
886 |
+
public $command; // TargetSearchRequest
|
887 |
+
public $info; // PagedListInfo
|
888 |
+
public $userId; // string
|
889 |
+
|
890 |
+
}
|
891 |
+
|
892 |
+
}
|
893 |
+
|
894 |
+
if (!class_exists("searchResponse")) {
|
895 |
+
|
896 |
+
class searchResponse {
|
897 |
+
|
898 |
+
public $return; // TargetPagedList
|
899 |
+
|
900 |
+
}
|
901 |
+
|
902 |
+
}
|
903 |
+
|
904 |
+
if (!class_exists("sendDownloadConfirmation")) {
|
905 |
+
|
906 |
+
class sendDownloadConfirmation {
|
907 |
+
|
908 |
+
public $targetId; // string
|
909 |
+
public $userId; // string
|
910 |
+
|
911 |
+
}
|
912 |
+
|
913 |
+
}
|
914 |
+
|
915 |
+
if (!class_exists("sendDownloadConfirmationResponse")) {
|
916 |
+
|
917 |
+
class sendDownloadConfirmationResponse {
|
918 |
+
|
919 |
+
public $return; // string
|
920 |
+
|
921 |
+
}
|
922 |
+
|
923 |
+
}
|
924 |
+
|
925 |
+
if (!class_exists("getCanceledTargetsByDocuments")) {
|
926 |
+
|
927 |
+
class getCanceledTargetsByDocuments {
|
928 |
+
|
929 |
+
public $documentTickets; // string
|
930 |
+
public $maxResults; // int
|
931 |
+
public $userId; // string
|
932 |
+
|
933 |
+
}
|
934 |
+
|
935 |
+
}
|
936 |
+
|
937 |
+
if (!class_exists("getCanceledTargetsByDocumentsResponse")) {
|
938 |
+
|
939 |
+
class getCanceledTargetsByDocumentsResponse {
|
940 |
+
|
941 |
+
public $return; // Target
|
942 |
+
|
943 |
+
}
|
944 |
+
|
945 |
+
}
|
946 |
+
|
947 |
+
if (!class_exists("getCanceledTargetsByProjects")) {
|
948 |
+
|
949 |
+
class getCanceledTargetsByProjects {
|
950 |
+
|
951 |
+
public $projectTickets; // string
|
952 |
+
public $maxResults; // int
|
953 |
+
public $userId; // string
|
954 |
+
|
955 |
+
}
|
956 |
+
|
957 |
+
}
|
958 |
+
|
959 |
+
if (!class_exists("getCanceledTargetsByProjectsResponse")) {
|
960 |
+
|
961 |
+
class getCanceledTargetsByProjectsResponse {
|
962 |
+
|
963 |
+
public $return; // Target
|
964 |
+
|
965 |
+
}
|
966 |
+
|
967 |
+
}
|
968 |
+
|
969 |
+
if (!class_exists("getCanceledTargetsBySubmissions")) {
|
970 |
+
|
971 |
+
class getCanceledTargetsBySubmissions {
|
972 |
+
|
973 |
+
public $submissionTickets; // string
|
974 |
+
public $maxResults; // int
|
975 |
+
public $userId; // string
|
976 |
+
|
977 |
+
}
|
978 |
+
|
979 |
+
}
|
980 |
+
|
981 |
+
if (!class_exists("getCanceledTargetsBySubmissionsResponse")) {
|
982 |
+
|
983 |
+
class getCanceledTargetsBySubmissionsResponse {
|
984 |
+
|
985 |
+
public $return; // Target
|
986 |
+
|
987 |
+
}
|
988 |
+
|
989 |
+
}
|
990 |
+
|
991 |
+
/**
|
992 |
+
* TargetService2 class
|
993 |
+
*
|
994 |
+
*
|
995 |
+
*
|
996 |
+
* @author {author}
|
997 |
+
* @copyright {copyright}
|
998 |
+
* @package {package}
|
999 |
+
*/
|
1000 |
+
class TargetService2 extends SoapClient {
|
1001 |
+
|
1002 |
+
private static $classmap = array(
|
1003 |
+
'anonymous0' => 'anonymous0',
|
1004 |
+
'base64Binary' => 'base64Binary',
|
1005 |
+
'hexBinary' => 'hexBinary',
|
1006 |
+
'Notification' => 'Notification',
|
1007 |
+
'NotificationPriority' => 'NotificationPriority',
|
1008 |
+
'Announcement' => 'Announcement',
|
1009 |
+
'ContentMonitorPluginInfo' => 'ContentMonitorPluginInfo',
|
1010 |
+
'Date' => 'PDDate',
|
1011 |
+
'Document' => 'Document',
|
1012 |
+
'DocumentGroup' => 'DocumentGroup',
|
1013 |
+
'DocumentInfo' => 'DocumentInfo',
|
1014 |
+
'DocumentPagedList' => 'DocumentPagedList',
|
1015 |
+
'DocumentSearchRequest' => 'DocumentSearchRequest',
|
1016 |
+
'DocumentTicket' => 'DocumentTicket',
|
1017 |
+
'EntityTypeEnum' => 'EntityTypeEnum',
|
1018 |
+
'FileFormatProfile' => 'FileFormatProfile',
|
1019 |
+
'FileFormatProgressData' => 'FileFormatProgressData',
|
1020 |
+
'FileProgressData' => 'FileProgressData',
|
1021 |
+
'FuzzyTmStatistics' => 'FuzzyTmStatistics',
|
1022 |
+
'ItemFolderEnum' => 'ItemFolderEnum',
|
1023 |
+
'ItemStatusEnum' => 'ItemStatusEnum',
|
1024 |
+
'Metadata' => 'Metadata',
|
1025 |
+
'Language' => 'Language',
|
1026 |
+
'LanguageDirection' => 'LanguageDirection',
|
1027 |
+
'LanguageDirectionModel' => 'LanguageDirectionModel',
|
1028 |
+
'PagedListInfo' => 'PagedListInfo',
|
1029 |
+
'Phase' => 'Phase',
|
1030 |
+
'Priority' => 'Priority',
|
1031 |
+
'Project' => 'Project',
|
1032 |
+
'ProjectInfo' => 'ProjectInfo',
|
1033 |
+
'ProjectLanguage' => 'ProjectLanguage',
|
1034 |
+
'RepositoryItem' => 'RepositoryItem',
|
1035 |
+
'ResourceInfo' => 'ResourceInfo',
|
1036 |
+
'ResourceType' => 'ResourceType',
|
1037 |
+
'Submission' => 'Submission',
|
1038 |
+
'SubmissionInfo' => 'SubmissionInfo',
|
1039 |
+
'SubmissionPagedList' => 'SubmissionPagedList',
|
1040 |
+
'SimpleSubmissionSearchModel' => 'SimpleSubmissionSearchModel',
|
1041 |
+
'SubmissionSearchModelPagedList' => 'SubmissionSearchModelPagedList',
|
1042 |
+
'SubmissionSearchRequest' => 'SubmissionSearchRequest',
|
1043 |
+
'Target' => 'Target',
|
1044 |
+
'TargetInfo' => 'TargetInfo',
|
1045 |
+
'TargetPagedList' => 'TargetPagedList',
|
1046 |
+
'TargetSearchRequest' => 'TargetSearchRequest',
|
1047 |
+
'Task' => 'Task',
|
1048 |
+
'TmStatistics' => 'TmStatistics',
|
1049 |
+
'WorkflowDefinition' => 'WorkflowDefinition',
|
1050 |
+
'UserInfo' => 'UserInfo',
|
1051 |
+
'TiUserInfo' => 'TiUserInfo',
|
1052 |
+
'cancelTargetByDocumentId' => 'cancelTargetByDocumentId',
|
1053 |
+
'cancelTargetByDocumentIdResponse' => 'cancelTargetByDocumentIdResponse',
|
1054 |
+
'cancelTarget' => 'cancelTarget',
|
1055 |
+
'cancelTargetResponse' => 'cancelTargetResponse',
|
1056 |
+
'downloadTargetResource' => 'downloadTargetResource',
|
1057 |
+
'downloadTargetResourceResponse' => 'downloadTargetResourceResponse',
|
1058 |
+
'findByTicket' => 'findByTicket',
|
1059 |
+
'findByTicketResponse' => 'findByTicketResponse',
|
1060 |
+
'getCompletedTargetsByDocuments' => 'getCompletedTargetsByDocuments',
|
1061 |
+
'getCompletedTargetsByDocumentsResponse' => 'getCompletedTargetsByDocumentsResponse',
|
1062 |
+
'getCompletedTargetsByProjects' => 'getCompletedTargetsByProjects',
|
1063 |
+
'getCompletedTargetsByProjectsResponse' => 'getCompletedTargetsByProjectsResponse',
|
1064 |
+
'getCompletedTargetsBySubmissions' => 'getCompletedTargetsBySubmissions',
|
1065 |
+
'getCompletedTargetsBySubmissionsResponse' => 'getCompletedTargetsBySubmissionsResponse',
|
1066 |
+
'search' => 'search',
|
1067 |
+
'searchResponse' => 'searchResponse',
|
1068 |
+
'sendDownloadConfirmation' => 'sendDownloadConfirmation',
|
1069 |
+
'sendDownloadConfirmationResponse' => 'sendDownloadConfirmationResponse',
|
1070 |
+
'getCanceledTargetsByDocuments' => 'getCanceledTargetsByDocuments',
|
1071 |
+
'getCanceledTargetsByDocumentsResponse' => 'getCanceledTargetsByDocumentsResponse',
|
1072 |
+
'getCanceledTargetsByProjects' => 'getCanceledTargetsByProjects',
|
1073 |
+
'getCanceledTargetsByProjectsResponse' => 'getCanceledTargetsByProjectsResponse',
|
1074 |
+
'getCanceledTargetsBySubmissions' => 'getCanceledTargetsBySubmissions',
|
1075 |
+
'getCanceledTargetsBySubmissionsResponse' => 'getCanceledTargetsBySubmissionsResponse',
|
1076 |
+
);
|
1077 |
+
|
1078 |
+
public function TargetService2($wsdl = "http://localhost:8080/pd4/services/TargetService2?wsdl", $options = array()) {
|
1079 |
+
foreach (self::$classmap as $key => $value) {
|
1080 |
+
if (!isset($options['classmap'][$key])) {
|
1081 |
+
$options['classmap'][$key] = $value;
|
1082 |
+
}
|
1083 |
+
}
|
1084 |
+
parent::__construct($wsdl, $options);
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
/**
|
1088 |
+
*
|
1089 |
+
*
|
1090 |
+
* @param getCanceledTargetsByDocuments $parameters
|
1091 |
+
* @return getCanceledTargetsByDocumentsResponse
|
1092 |
+
*/
|
1093 |
+
public function getCanceledTargetsByDocuments(getCanceledTargetsByDocuments $parameters) {
|
1094 |
+
return $this->__soapCall('getCanceledTargetsByDocuments', array($parameters), array(
|
1095 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1096 |
+
'soapaction' => ''
|
1097 |
+
)
|
1098 |
+
);
|
1099 |
+
}
|
1100 |
+
|
1101 |
+
/**
|
1102 |
+
*
|
1103 |
+
*
|
1104 |
+
* @param cancelTargetByDocumentId $parameters
|
1105 |
+
* @return cancelTargetByDocumentIdResponse
|
1106 |
+
*/
|
1107 |
+
public function cancelTargetByDocumentId(cancelTargetByDocumentId $parameters) {
|
1108 |
+
return $this->__soapCall('cancelTargetByDocumentId', array($parameters), array(
|
1109 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1110 |
+
'soapaction' => ''
|
1111 |
+
)
|
1112 |
+
);
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
/**
|
1116 |
+
*
|
1117 |
+
*
|
1118 |
+
* @param getCompletedTargetsByDocuments $parameters
|
1119 |
+
* @return getCompletedTargetsByDocumentsResponse
|
1120 |
+
*/
|
1121 |
+
public function getCompletedTargetsByDocuments(getCompletedTargetsByDocuments $parameters) {
|
1122 |
+
return $this->__soapCall('getCompletedTargetsByDocuments', array($parameters), array(
|
1123 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1124 |
+
'soapaction' => ''
|
1125 |
+
)
|
1126 |
+
);
|
1127 |
+
}
|
1128 |
+
|
1129 |
+
/**
|
1130 |
+
*
|
1131 |
+
*
|
1132 |
+
* @param getCanceledTargetsBySubmissions $parameters
|
1133 |
+
* @return getCanceledTargetsBySubmissionsResponse
|
1134 |
+
*/
|
1135 |
+
public function getCanceledTargetsBySubmissions(getCanceledTargetsBySubmissions $parameters) {
|
1136 |
+
return $this->__soapCall('getCanceledTargetsBySubmissions', array($parameters), array(
|
1137 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1138 |
+
'soapaction' => ''
|
1139 |
+
)
|
1140 |
+
);
|
1141 |
+
}
|
1142 |
+
|
1143 |
+
/**
|
1144 |
+
*
|
1145 |
+
*
|
1146 |
+
* @param getCanceledTargetsByProjects $parameters
|
1147 |
+
* @return getCanceledTargetsByProjectsResponse
|
1148 |
+
*/
|
1149 |
+
public function getCanceledTargetsByProjects(getCanceledTargetsByProjects $parameters) {
|
1150 |
+
return $this->__soapCall('getCanceledTargetsByProjects', array($parameters), array(
|
1151 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1152 |
+
'soapaction' => ''
|
1153 |
+
)
|
1154 |
+
);
|
1155 |
+
}
|
1156 |
+
|
1157 |
+
/**
|
1158 |
+
*
|
1159 |
+
*
|
1160 |
+
* @param findByTicket $parameters
|
1161 |
+
* @return findByTicketResponse
|
1162 |
+
*/
|
1163 |
+
public function findByTicket(findByTicket $parameters) {
|
1164 |
+
return $this->__soapCall('findByTicket', array($parameters), array(
|
1165 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1166 |
+
'soapaction' => ''
|
1167 |
+
)
|
1168 |
+
);
|
1169 |
+
}
|
1170 |
+
|
1171 |
+
/**
|
1172 |
+
*
|
1173 |
+
*
|
1174 |
+
* @param downloadTargetResource $parameters
|
1175 |
+
* @return downloadTargetResourceResponse
|
1176 |
+
*/
|
1177 |
+
public function downloadTargetResource(downloadTargetResource $parameters) {
|
1178 |
+
return $this->__soapCall('downloadTargetResource', array($parameters), array(
|
1179 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1180 |
+
'soapaction' => ''
|
1181 |
+
)
|
1182 |
+
);
|
1183 |
+
}
|
1184 |
+
|
1185 |
+
/**
|
1186 |
+
*
|
1187 |
+
*
|
1188 |
+
* @param getCompletedTargetsByProjects $parameters
|
1189 |
+
* @return getCompletedTargetsByProjectsResponse
|
1190 |
+
*/
|
1191 |
+
public function getCompletedTargetsByProjects(getCompletedTargetsByProjects $parameters) {
|
1192 |
+
return $this->__soapCall('getCompletedTargetsByProjects', array($parameters), array(
|
1193 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1194 |
+
'soapaction' => ''
|
1195 |
+
)
|
1196 |
+
);
|
1197 |
+
}
|
1198 |
+
|
1199 |
+
/**
|
1200 |
+
*
|
1201 |
+
*
|
1202 |
+
* @param cancelTarget $parameters
|
1203 |
+
* @return cancelTargetResponse
|
1204 |
+
*/
|
1205 |
+
public function cancelTarget(cancelTarget $parameters) {
|
1206 |
+
return $this->__soapCall('cancelTarget', array($parameters), array(
|
1207 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1208 |
+
'soapaction' => ''
|
1209 |
+
)
|
1210 |
+
);
|
1211 |
+
}
|
1212 |
+
|
1213 |
+
/**
|
1214 |
+
*
|
1215 |
+
*
|
1216 |
+
* @param sendDownloadConfirmation $parameters
|
1217 |
+
* @return sendDownloadConfirmationResponse
|
1218 |
+
*/
|
1219 |
+
public function sendDownloadConfirmation(sendDownloadConfirmation $parameters) {
|
1220 |
+
return $this->__soapCall('sendDownloadConfirmation', array($parameters), array(
|
1221 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1222 |
+
'soapaction' => ''
|
1223 |
+
)
|
1224 |
+
);
|
1225 |
+
}
|
1226 |
+
|
1227 |
+
/**
|
1228 |
+
*
|
1229 |
+
*
|
1230 |
+
* @param getCompletedTargetsBySubmissions $parameters
|
1231 |
+
* @return getCompletedTargetsBySubmissionsResponse
|
1232 |
+
*/
|
1233 |
+
public function getCompletedTargetsBySubmissions(getCompletedTargetsBySubmissions $parameters) {
|
1234 |
+
return $this->__soapCall('getCompletedTargetsBySubmissions', array($parameters), array(
|
1235 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1236 |
+
'soapaction' => ''
|
1237 |
+
)
|
1238 |
+
);
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
/**
|
1242 |
+
*
|
1243 |
+
*
|
1244 |
+
* @param search $parameters
|
1245 |
+
* @return searchResponse
|
1246 |
+
*/
|
1247 |
+
public function search(search $parameters) {
|
1248 |
+
return $this->__soapCall('search', array($parameters), array(
|
1249 |
+
'uri' => 'http://impl.services2.service.ws.projectdirector.gs4tr.org',
|
1250 |
+
'soapaction' => ''
|
1251 |
+
)
|
1252 |
+
);
|
1253 |
+
}
|
1254 |
+
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
?>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/gl_ws_common.php
ADDED
@@ -0,0 +1,328 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'ProjectDirector.php';
|
17 |
+
require_once 'client/SessionService2.php';
|
18 |
+
require_once 'client/ProjectService2.php';
|
19 |
+
require_once 'client/DocumentService2.php';
|
20 |
+
require_once 'client/SubmissionService2.php';
|
21 |
+
|
22 |
+
function get_user_PD_projects() {
|
23 |
+
$pdObject = get_pd_details();
|
24 |
+
$username = $pdObject->username;
|
25 |
+
$password = $pdObject->password;
|
26 |
+
$url = $pdObject->url;
|
27 |
+
$projectShortCode = $pdObject->projectShortCode;
|
28 |
+
$code_array = array();
|
29 |
+
if ($projectShortCode != '') {
|
30 |
+
$code_array = explode(',', $projectShortCode);
|
31 |
+
}
|
32 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $code_array);
|
33 |
+
$wsdl_path = Mage::helper("globallink")->get_wsdl_path();
|
34 |
+
|
35 |
+
$sessionService = new SessionService2($wsdl_path . 'SessionService2.wsdl', array(
|
36 |
+
'location' => $url . "/services/SessionService2"
|
37 |
+
));
|
38 |
+
$projectService = new ProjectService2($wsdl_path . 'ProjectService2.wsdl', array(
|
39 |
+
'location' => $url . "/services/ProjectService2"
|
40 |
+
));
|
41 |
+
|
42 |
+
$token = @Login($sessionService, $username, $password);
|
43 |
+
$projects = GetUserProjects($projectService, $token);
|
44 |
+
|
45 |
+
$proj_arr = array();
|
46 |
+
foreach ($projects as $project) {
|
47 |
+
$short_code = $project->projectInfo->shortCode;
|
48 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $short_code);
|
49 |
+
if (array_search($short_code, $code_array) !== false) {
|
50 |
+
$proj_arr[$short_code] = $project->projectInfo->name;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
return $proj_arr;
|
55 |
+
}
|
56 |
+
|
57 |
+
function test_GlobalLink_connectivity($username, $password, $url, $projectShortCode, $classifier) {
|
58 |
+
$proj_arr = array();
|
59 |
+
if ($projectShortCode != '') {
|
60 |
+
$arr = explode(',', $projectShortCode);
|
61 |
+
foreach ($arr as $value) {
|
62 |
+
$proj_arr[$value] = $value;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
$wsdl_path = Mage::helper("globallink")->get_wsdl_path();
|
67 |
+
|
68 |
+
$sessionService = new SessionService2($wsdl_path . 'SessionService2.wsdl', array(
|
69 |
+
'location' => $url . "/services/SessionService2"
|
70 |
+
));
|
71 |
+
$projectService = new ProjectService2($wsdl_path . 'ProjectService2.wsdl', array(
|
72 |
+
'location' => $url . "/services/ProjectService2"
|
73 |
+
));
|
74 |
+
|
75 |
+
$success = FALSE;
|
76 |
+
//Open a session on the server
|
77 |
+
$token = @Login($sessionService, $username, $password);
|
78 |
+
//Locate project by short code
|
79 |
+
|
80 |
+
foreach ($proj_arr as $proj_code) {
|
81 |
+
try {
|
82 |
+
$project = @FindProjectByShortCode($projectService, $proj_code, $token);
|
83 |
+
}
|
84 |
+
catch (SoapFault $sf) {
|
85 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
86 |
+
return 'Connection Failed - Invalid Project Code: ' . $proj_code;
|
87 |
+
}
|
88 |
+
catch (Exception $ex) {
|
89 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
90 |
+
return 'Connection Failed - Invalid Project Code: ' . $proj_code;
|
91 |
+
}
|
92 |
+
if (isset($project->ticket)) {
|
93 |
+
if (isset($project->fileFormatProfiles) && is_array($project->fileFormatProfiles)) {
|
94 |
+
foreach ($project->fileFormatProfiles as $file_format) {
|
95 |
+
if ($classifier == $file_format->profileName) {
|
96 |
+
$success = TRUE;
|
97 |
+
break;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
elseif (isset($project->fileFormatProfiles)) {
|
102 |
+
if ($classifier == $project->fileFormatProfiles->profileName) {
|
103 |
+
$success = TRUE;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
if (!$success) {
|
109 |
+
throw new Exception('Connection Failed - Invalid Classifier.');
|
110 |
+
}
|
111 |
+
else {
|
112 |
+
$success = FALSE;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
return 'Settings Saved and Connection Test Successful.';
|
117 |
+
}
|
118 |
+
|
119 |
+
function get_project_language_directions() {
|
120 |
+
$pdObject = get_pd_details();
|
121 |
+
$username = $pdObject->username;
|
122 |
+
$password = $pdObject->password;
|
123 |
+
$url = $pdObject->url;
|
124 |
+
$projectShortCode = $pdObject->projectShortCode;
|
125 |
+
$proj_arr = array();
|
126 |
+
if ($projectShortCode != '') {
|
127 |
+
$arr = explode(',', $projectShortCode);
|
128 |
+
foreach ($arr as $value) {
|
129 |
+
$proj_arr[$value] = $value;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
$wsdl_path = Mage::helper("globallink")->get_wsdl_path();
|
133 |
+
|
134 |
+
$sessionService = new SessionService2($wsdl_path . 'SessionService2.wsdl', array(
|
135 |
+
'location' => $url . "/services/SessionService2"
|
136 |
+
));
|
137 |
+
$projectService = new ProjectService2($wsdl_path . 'ProjectService2.wsdl', array(
|
138 |
+
'location' => $url . "/services/ProjectService2"
|
139 |
+
));
|
140 |
+
|
141 |
+
$token = @Login($sessionService, $username, $password);
|
142 |
+
|
143 |
+
foreach ($proj_arr as $proj_code) {
|
144 |
+
try {
|
145 |
+
$project = @FindProjectByShortCode($projectService, $proj_code, $token);
|
146 |
+
}
|
147 |
+
catch (SoapFault $sf) {
|
148 |
+
Mage::helper("globallink")->gl_debug($sf->getFile() . ' - Line ' . $sf->getLine() . ': Globallink WebService Error = ', $sf->getMessage());
|
149 |
+
return 'Connection Failed - Invalid Project Code: ' . $proj_code;
|
150 |
+
}
|
151 |
+
catch (Exception $ex) {
|
152 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink Generic Error = ', $ex->getMessage());
|
153 |
+
return 'Connection Failed - Invalid Project Code: ' . $proj_code;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
$project_languages = $project->projectLanguageDirections;
|
158 |
+
$project_language_arr = array();
|
159 |
+
foreach ($project_languages as $object) {
|
160 |
+
$source_language_locale = $object->sourceLanguage->locale;
|
161 |
+
$source_language_value = $object->sourceLanguage->value;
|
162 |
+
$project_language_arr[$source_language_locale] = $source_language_value;
|
163 |
+
$target_language_locale = $object->targetLanguage->locale;
|
164 |
+
$target_language_value = $object->targetLanguage->value;
|
165 |
+
$project_language_arr[$target_language_locale] = $target_language_value;
|
166 |
+
}
|
167 |
+
|
168 |
+
return $project_language_arr;
|
169 |
+
}
|
170 |
+
|
171 |
+
function cancel_select_PD_submission(&$globalLink) {
|
172 |
+
$pdObject = get_pd_details();
|
173 |
+
$username = $pdObject->username;
|
174 |
+
$password = $pdObject->password;
|
175 |
+
$url = $pdObject->url;
|
176 |
+
|
177 |
+
$wsdl_path = Mage::helper("globallink")->get_wsdl_path();
|
178 |
+
|
179 |
+
//Create instances for each ws service stub class
|
180 |
+
$sessionService = new SessionService2($wsdl_path . 'SessionService2.wsdl', array(
|
181 |
+
'location' => $url . "/services/SessionService2"
|
182 |
+
));
|
183 |
+
$submissionService = new SubmissionService2($wsdl_path . 'SubmissionService2.wsdl', array(
|
184 |
+
'location' => $url . "/services/SubmissionService2"
|
185 |
+
));
|
186 |
+
|
187 |
+
$token = @Login($sessionService, $username, $password);
|
188 |
+
|
189 |
+
$cancelSubmissionRequest = new cancelSubmission;
|
190 |
+
$cancelSubmissionRequest->userId = $token;
|
191 |
+
$cancelSubmissionRequest->submissionId = $globalLink->submissionTicket;
|
192 |
+
|
193 |
+
$submissionService->cancelSubmission($cancelSubmissionRequest);
|
194 |
+
|
195 |
+
$globalLink->cancelled = TRUE;
|
196 |
+
}
|
197 |
+
|
198 |
+
function cancel_select_PD_documents(&$globalLink_arr) {
|
199 |
+
$pdObject = get_pd_details();
|
200 |
+
$username = $pdObject->username;
|
201 |
+
$password = $pdObject->password;
|
202 |
+
$url = $pdObject->url;
|
203 |
+
|
204 |
+
$wsdl_path = Mage::helper("globallink")->get_wsdl_path();
|
205 |
+
|
206 |
+
//Create instances for each ws service stub class
|
207 |
+
$sessionService = new SessionService2($wsdl_path . 'SessionService2.wsdl', array(
|
208 |
+
'location' => $url . "/services/SessionService2"
|
209 |
+
));
|
210 |
+
$documentService = new DocumentService2($wsdl_path . 'DocumentService2.wsdl', array(
|
211 |
+
'location' => $url . "/services/DocumentService2"
|
212 |
+
));
|
213 |
+
|
214 |
+
$token = @Login($sessionService, $username, $password);
|
215 |
+
|
216 |
+
foreach ($globalLink_arr as $globalLink) {
|
217 |
+
$documentTicket = new DocumentTicket();
|
218 |
+
$documentTicket->submissionTicket = $globalLink->submissionTicket;
|
219 |
+
$documentTicket->ticketId = $globalLink->documentTicket;
|
220 |
+
|
221 |
+
$cancelDocumentRequest = new cancelDocument();
|
222 |
+
$cancelDocumentRequest->documentTicket = $documentTicket;
|
223 |
+
$cancelDocumentRequest->userId = $token;
|
224 |
+
|
225 |
+
$documentService->cancelDocument($cancelDocumentRequest);
|
226 |
+
|
227 |
+
$globalLink->cancelled = TRUE;
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
function GetUserProjects($projectService, $token) {
|
232 |
+
$getUserProjects = new getUserProjects;
|
233 |
+
|
234 |
+
$getUserProjects->isSubProjectIncluded = FALSE;
|
235 |
+
$getUserProjects->userId = $token;
|
236 |
+
|
237 |
+
$getUserProjectsResponse = $projectService->getUserProjects($getUserProjects);
|
238 |
+
$projects = $getUserProjectsResponse->return;
|
239 |
+
|
240 |
+
if (!is_array($projects)) {
|
241 |
+
$arr = array($projects);
|
242 |
+
return $arr;
|
243 |
+
}
|
244 |
+
|
245 |
+
return $projects;
|
246 |
+
}
|
247 |
+
|
248 |
+
function FindProjectByShortCode($projectService, $projectShortCode, $token) {
|
249 |
+
$findProjectByShortCode = new findProjectByShortCode;
|
250 |
+
|
251 |
+
$findProjectByShortCode->projectShortCode = $projectShortCode;
|
252 |
+
$findProjectByShortCode->userId = $token;
|
253 |
+
|
254 |
+
$findProjectByShortCodeResponse = $projectService->findProjectByShortCode($findProjectByShortCode);
|
255 |
+
|
256 |
+
$project = $findProjectByShortCodeResponse->return;
|
257 |
+
|
258 |
+
return $project;
|
259 |
+
}
|
260 |
+
|
261 |
+
function Login($sessionService, $username, $password) {
|
262 |
+
|
263 |
+
$login = new login;
|
264 |
+
|
265 |
+
$login->username = $username;
|
266 |
+
$login->password = $password;
|
267 |
+
|
268 |
+
$loginResponse = $sessionService->login($login);
|
269 |
+
|
270 |
+
$token = $loginResponse->return;
|
271 |
+
|
272 |
+
return $token;
|
273 |
+
}
|
274 |
+
|
275 |
+
function get_pd_details() {
|
276 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
277 |
+
$pd_object = new ProjectDirector;
|
278 |
+
foreach ($gl_config_arr as $gl_config) {
|
279 |
+
$r_url = strrev($gl_config['globallink_url']);
|
280 |
+
if (ord($r_url) == 47) {
|
281 |
+
$r_url = substr($r_url, 1);
|
282 |
+
}
|
283 |
+
$url = strrev($r_url);
|
284 |
+
$pd_object->url = $url;
|
285 |
+
$pd_object->projectShortCode = $gl_config['project_short_code'];
|
286 |
+
$pd_object->classifier = $gl_config['classifier'];
|
287 |
+
$pd_object->mimeType = $gl_config['mime_type'];
|
288 |
+
$pd_object->maxTargetCount = $gl_config['max_target_count'];
|
289 |
+
$pd_object->filesPerSubmission = $gl_config['files_per_submission'];
|
290 |
+
$pd_object->username = $gl_config['globallink_user_name'];
|
291 |
+
$pd_object->password = $gl_config['globallink_user_password'];
|
292 |
+
$pd_object->glUserId = $gl_config['globallink_user_id'];
|
293 |
+
$pd_object->glProjectId = $gl_config['globallink_project_id'];
|
294 |
+
}
|
295 |
+
return $pd_object;
|
296 |
+
}
|
297 |
+
|
298 |
+
function get_status($submissionTicket) {
|
299 |
+
$pdObject = get_pd_details();
|
300 |
+
$username = $pdObject->username;
|
301 |
+
$password = $pdObject->password;
|
302 |
+
$url = $pdObject->url;
|
303 |
+
|
304 |
+
$wsdl_path = Mage::helper("globallink")->get_wsdl_path();
|
305 |
+
|
306 |
+
$sessionService = new SessionService2($wsdl_path . 'SessionService2.wsdl', array(
|
307 |
+
'location' => $url . "/services/SessionService2"
|
308 |
+
));
|
309 |
+
$submissionService = new SubmissionService2($wsdl_path . 'SubmissionService2.wsdl', array(
|
310 |
+
'location' => $url . "/services/SubmissionService2"
|
311 |
+
));
|
312 |
+
|
313 |
+
$token = @Login($sessionService, $username, $password);
|
314 |
+
|
315 |
+
$ticketRequest = new findByTicket();
|
316 |
+
$ticketRequest->userId = $token;
|
317 |
+
$ticketRequest->ticket = $submissionTicket;
|
318 |
+
|
319 |
+
$findByTicketResponse = $submissionService->findByTicket($ticketRequest);
|
320 |
+
|
321 |
+
$result = $findByTicketResponse->return;
|
322 |
+
$status = '';
|
323 |
+
|
324 |
+
if (isset($result->status))
|
325 |
+
$status = $result->status->name;
|
326 |
+
|
327 |
+
return $status;
|
328 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/gl_ws_receive_translations.php
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'GlobalLink.php';
|
17 |
+
require_once 'gl_ws_common.php';
|
18 |
+
require_once 'client/SessionService2.php';
|
19 |
+
require_once 'client/ProjectService2.php';
|
20 |
+
require_once 'client/TargetService2.php';
|
21 |
+
|
22 |
+
function getReadyTranslationsDetailsFromPD() {
|
23 |
+
$pdObject = get_pd_details();
|
24 |
+
$username = $pdObject->username;
|
25 |
+
$password = $pdObject->password;
|
26 |
+
$url = $pdObject->url;
|
27 |
+
$projectShortCode = $pdObject->projectShortCode;
|
28 |
+
$proj_arr = array();
|
29 |
+
if ($projectShortCode != '') {
|
30 |
+
$arr = explode(',', $projectShortCode);
|
31 |
+
foreach ($arr as $value) {
|
32 |
+
$proj_arr[$value] = $value;
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
$wsdl_path = Mage::helper("globallink")->get_wsdl_path();
|
37 |
+
|
38 |
+
$sessionService = new SessionService2($wsdl_path . 'SessionService2.wsdl', array(
|
39 |
+
'location' => $url . "/services/SessionService2"
|
40 |
+
));
|
41 |
+
$projectService = new ProjectService2($wsdl_path . 'ProjectService2.wsdl', array(
|
42 |
+
'location' => $url . "/services/ProjectService2"
|
43 |
+
));
|
44 |
+
$targetService = new TargetService2($wsdl_path . 'TargetService2.wsdl', array(
|
45 |
+
'location' => $url . "/services/TargetService2"
|
46 |
+
));
|
47 |
+
|
48 |
+
$globalLink_arr = array();
|
49 |
+
|
50 |
+
$token = @Login($sessionService, $username, $password);
|
51 |
+
$projects = GetUserProjects($projectService, $token);
|
52 |
+
$proj_ticket_arr = array();
|
53 |
+
foreach ($projects as $project) {
|
54 |
+
$short_code = $project->projectInfo->shortCode;
|
55 |
+
foreach ($proj_arr as $conf_proj) {
|
56 |
+
if ($conf_proj == $short_code) {
|
57 |
+
$proj_ticket_arr[] = $project->ticket;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
if (count($proj_ticket_arr) > 0) {
|
63 |
+
$targets = getCompletedTargetsByProjects($targetService, $proj_ticket_arr, $token, $pdObject);
|
64 |
+
|
65 |
+
$count = 1;
|
66 |
+
if (is_array($targets)) {
|
67 |
+
foreach ($targets as $target) {
|
68 |
+
if (!is_null($target->ticket) && $target->ticket != '') {
|
69 |
+
$globalLink = new GlobalLink;
|
70 |
+
|
71 |
+
// $repositoryItem = @downloadTargetResource($targetService, $target->ticket, $token);
|
72 |
+
// $targetContent = $repositoryItem->data->_;
|
73 |
+
// $globalLink->targetXML = $targetContent;
|
74 |
+
|
75 |
+
$globalLink->submissionTicket = $target->document->documentGroup->submission->ticket;
|
76 |
+
$globalLink->submissionName = $target->document->documentGroup->submission->submissionInfo->name;
|
77 |
+
$globalLink->documentTicket = $target->document->ticket;
|
78 |
+
$globalLink->sourceFileName = $target->document->documentInfo->name;
|
79 |
+
$globalLink->targetTicket = $target->ticket;
|
80 |
+
$globalLink->sourceLocale = $target->sourceLanguage->locale;
|
81 |
+
$globalLink->targetLocale = $target->targetLanguage->locale;
|
82 |
+
$globalLink->priority = $target->targetInfo->priority->value;
|
83 |
+
$globalLink->dueDate = $target->dueDate->date;
|
84 |
+
|
85 |
+
$globalLink_arr[$count] = $globalLink;
|
86 |
+
$count++;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
elseif (!is_null($targets)) {
|
91 |
+
$target = $targets;
|
92 |
+
if (!is_null($target->ticket) && $target->ticket != '') {
|
93 |
+
$globalLink = new GlobalLink;
|
94 |
+
|
95 |
+
// $repositoryItem = @downloadTargetResource($targetService, $target->ticket, $token);
|
96 |
+
// $targetContent = $repositoryItem->data->_;
|
97 |
+
// $globalLink->targetXML = $targetContent;
|
98 |
+
|
99 |
+
$globalLink->submissionTicket = $target->document->documentGroup->submission->ticket;
|
100 |
+
$globalLink->submissionName = $target->document->documentGroup->submission->submissionInfo->name;
|
101 |
+
$globalLink->documentTicket = $target->document->ticket;
|
102 |
+
$globalLink->sourceFileName = $target->document->documentInfo->name;
|
103 |
+
$globalLink->targetTicket = $target->ticket;
|
104 |
+
$globalLink->sourceLocale = $target->sourceLanguage->locale;
|
105 |
+
$globalLink->targetLocale = $target->targetLanguage->locale;
|
106 |
+
$globalLink->priority = $target->targetInfo->priority->value;
|
107 |
+
$globalLink->dueDate = $target->dueDate->date;
|
108 |
+
|
109 |
+
$globalLink_arr[$count] = $globalLink;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
return $globalLink_arr;
|
114 |
+
}
|
115 |
+
|
116 |
+
function getCompletedTargetsByProjects($targetService, $projectTickets, $token, $pdObject) {
|
117 |
+
$getCompletedTargetsByProjectsRequest = new getCompletedTargetsByProjects;
|
118 |
+
|
119 |
+
$getCompletedTargetsByProjectsRequest->projectTickets = $projectTickets;
|
120 |
+
$getCompletedTargetsByProjectsRequest->maxResults = $pdObject->maxTargetCount;
|
121 |
+
$getCompletedTargetsByProjectsRequest->userId = $token;
|
122 |
+
|
123 |
+
$getCompletedTargetsByProjectsResponse = $targetService->getCompletedTargetsByProjects($getCompletedTargetsByProjectsRequest);
|
124 |
+
return $getCompletedTargetsByProjectsResponse->return;
|
125 |
+
}
|
126 |
+
|
127 |
+
function downloadTargetResource($targetTicket) {
|
128 |
+
$pdObject = get_pd_details();
|
129 |
+
$username = $pdObject->username;
|
130 |
+
$password = $pdObject->password;
|
131 |
+
$url = $pdObject->url;
|
132 |
+
|
133 |
+
$wsdl_path = Mage::helper("globallink")->get_wsdl_path();
|
134 |
+
|
135 |
+
$sessionService = new SessionService2($wsdl_path . 'SessionService2.wsdl', array(
|
136 |
+
'location' => $url . "/services/SessionService2"
|
137 |
+
));
|
138 |
+
$targetService = new TargetService2($wsdl_path . 'TargetService2.wsdl', array(
|
139 |
+
'location' => $url . "/services/TargetService2"
|
140 |
+
));
|
141 |
+
$token = @Login($sessionService, $username, $password);
|
142 |
+
|
143 |
+
$downloadTargetResourceRequest = new downloadTargetResource;
|
144 |
+
|
145 |
+
$downloadTargetResourceRequest->targetId = $targetTicket;
|
146 |
+
$downloadTargetResourceRequest->userId = $token;
|
147 |
+
|
148 |
+
$downloadTargetResourceResponse = $targetService->downloadTargetResource($downloadTargetResourceRequest);
|
149 |
+
$repositoryItem = $downloadTargetResourceResponse->return;
|
150 |
+
$targetContent = $repositoryItem->data->_;
|
151 |
+
|
152 |
+
return $targetContent;
|
153 |
+
}
|
154 |
+
|
155 |
+
function sendDownloadConfirmation($targetTicket) {
|
156 |
+
$pdObject = get_pd_details();
|
157 |
+
$username = $pdObject->username;
|
158 |
+
$password = $pdObject->password;
|
159 |
+
$url = $pdObject->url;
|
160 |
+
|
161 |
+
$wsdl_path = Mage::helper("globallink")->get_wsdl_path();
|
162 |
+
|
163 |
+
$sessionService = new SessionService2($wsdl_path . 'SessionService2.wsdl', array(
|
164 |
+
'location' => $url . "/services/SessionService2"
|
165 |
+
));
|
166 |
+
$targetService = new TargetService2($wsdl_path . 'TargetService2.wsdl', array(
|
167 |
+
'location' => $url . "/services/TargetService2"
|
168 |
+
));
|
169 |
+
$token = Login($sessionService, $username, $password);
|
170 |
+
$sendDownloadConfirmationRequest = new sendDownloadConfirmation;
|
171 |
+
|
172 |
+
$sendDownloadConfirmationRequest->targetId = $targetTicket;
|
173 |
+
$sendDownloadConfirmationRequest->userId = $token;
|
174 |
+
|
175 |
+
$sendDownloadConfirmationResponse = $targetService->sendDownloadConfirmation($sendDownloadConfirmationRequest);
|
176 |
+
|
177 |
+
return $sendDownloadConfirmationResponse->return;
|
178 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/gl_ws_send_translations.php
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
require_once 'GlobalLink.php';
|
17 |
+
require_once 'gl_ws_common.php';
|
18 |
+
require_once 'client/SessionService2.php';
|
19 |
+
require_once 'client/ProjectService2.php';
|
20 |
+
require_once 'client/DocumentService2.php';
|
21 |
+
require_once 'client/SubmissionService2.php';
|
22 |
+
|
23 |
+
function sendDocumentsForTranslationToPD(&$globalLink_arr, $gl_project) {
|
24 |
+
$pdObject = get_pd_details();
|
25 |
+
$username = $pdObject->username;
|
26 |
+
$password = $pdObject->password;
|
27 |
+
$url = $pdObject->url;
|
28 |
+
$projectShortCode = $gl_project;
|
29 |
+
|
30 |
+
$wsdl_path = Mage::helper("globallink")->get_wsdl_path();
|
31 |
+
|
32 |
+
$sessionService = new SessionService2($wsdl_path . 'SessionService2.wsdl', array(
|
33 |
+
'location' => $url . "/services/SessionService2"
|
34 |
+
));
|
35 |
+
$projectService = new ProjectService2($wsdl_path . 'ProjectService2.wsdl', array(
|
36 |
+
'location' => $url . "/services/ProjectService2"
|
37 |
+
));
|
38 |
+
$documentService = new DocumentService2($wsdl_path . 'DocumentService2.wsdl', array(
|
39 |
+
'location' => $url . "/services/DocumentService2"
|
40 |
+
));
|
41 |
+
$submissionService = new SubmissionService2($wsdl_path . 'SubmissionService2.wsdl', array(
|
42 |
+
'location' => $url . "/services/SubmissionService2"
|
43 |
+
));
|
44 |
+
|
45 |
+
$GLOBALS['g_submissionTicket'] = '';
|
46 |
+
$GLOBALS['g_document_count'] = 0;
|
47 |
+
$clientIdentifier = $projectShortCode . microtime();
|
48 |
+
$submitter = Mage::getSingleton('admin/session')->getUser()->getUsername();
|
49 |
+
|
50 |
+
$token = @Login($sessionService, $username, $password);
|
51 |
+
$project = @FindProjectByShortCode($projectService, $projectShortCode, $token);
|
52 |
+
$submissionInfo = createSubmissionInfo($project->ticket, $clientIdentifier, $submitter);
|
53 |
+
|
54 |
+
$count = 0;
|
55 |
+
foreach ($globalLink_arr as $globalLink) {
|
56 |
+
$count++;
|
57 |
+
$submissionInfo->name = $globalLink->submissionName;
|
58 |
+
$dateRequested = new PDDate;
|
59 |
+
$dateRequested->date = $globalLink->dueDate;
|
60 |
+
$dateRequested->critical = false;
|
61 |
+
$submissionInfo->dateRequested = $dateRequested;
|
62 |
+
$submissionInfo->submitter = $globalLink->submitter;
|
63 |
+
$resourceInfo = createResourceInfo($clientIdentifier, $pdObject, $globalLink);
|
64 |
+
$documentInfo = createDocumentInfo($project->ticket, $globalLink, $clientIdentifier);
|
65 |
+
if (!is_null($GLOBALS['g_submissionTicket']) && $GLOBALS['g_submissionTicket'] != '') {
|
66 |
+
$documentInfo->submissionTicket = $GLOBALS['g_submissionTicket'];
|
67 |
+
}
|
68 |
+
//Submit a document for the given project
|
69 |
+
submitDocumentWithBinaryResource($documentService, $resourceInfo, $documentInfo, $globalLink, $token);
|
70 |
+
$GLOBALS['g_submissionTicket'] = $globalLink->submissionTicket;
|
71 |
+
$GLOBALS['g_document_count'] = $count;
|
72 |
+
|
73 |
+
$globalLink->glUserId = $pdObject->glUserId;
|
74 |
+
$globalLink->glProjectId = $pdObject->glProjectId;
|
75 |
+
}
|
76 |
+
|
77 |
+
startSubmission($submissionService, $submissionInfo, $token);
|
78 |
+
}
|
79 |
+
|
80 |
+
function submitDocumentWithBinaryResource($documentService, $resourceInfo, $documentInfo, &$globalLink, $token) {
|
81 |
+
|
82 |
+
$submitDocumentWithBinaryResourceRequest = new submitDocumentWithBinaryResource;
|
83 |
+
|
84 |
+
$submitDocumentWithBinaryResourceRequest->documentInfo = $documentInfo;
|
85 |
+
$submitDocumentWithBinaryResourceRequest->resourceInfo = $resourceInfo;
|
86 |
+
$submitDocumentWithBinaryResourceRequest->data = $globalLink->sourceXML;
|
87 |
+
$submitDocumentWithBinaryResourceRequest->userId = $token;
|
88 |
+
|
89 |
+
$submitDocumentWithBinaryResourceResponse = $documentService->submitDocumentWithBinaryResource($submitDocumentWithBinaryResourceRequest);
|
90 |
+
|
91 |
+
$globalLink->submissionTicket = $submitDocumentWithBinaryResourceResponse->return->submissionTicket;
|
92 |
+
$globalLink->documentTicket = $submitDocumentWithBinaryResourceResponse->return->ticketId;
|
93 |
+
}
|
94 |
+
|
95 |
+
function startSubmission($submissionService, $submissionInfo, $token) {
|
96 |
+
$startSubmissionRequest = new startSubmission;
|
97 |
+
|
98 |
+
$startSubmissionRequest->submissionId = $GLOBALS['g_submissionTicket'];
|
99 |
+
$startSubmissionRequest->submissionInfo = $submissionInfo;
|
100 |
+
$startSubmissionRequest->userId = $token;
|
101 |
+
|
102 |
+
$startSubmissionResponse = $submissionService->startSubmission($startSubmissionRequest);
|
103 |
+
|
104 |
+
return $startSubmissionResponse->return;
|
105 |
+
}
|
106 |
+
|
107 |
+
function createSubmissionInfo($projectTicket, $clientIdentifier, $submitter) {
|
108 |
+
$submissionInfo = new SubmissionInfo;
|
109 |
+
$submissionInfo->clientIdentifier = $clientIdentifier;
|
110 |
+
$submissionInfo->projectTicket = $projectTicket;
|
111 |
+
$meta = new Metadata;
|
112 |
+
$meta->magentoUser = $submitter;
|
113 |
+
|
114 |
+
return $submissionInfo;
|
115 |
+
}
|
116 |
+
|
117 |
+
function createDocumentInfo($projectTicket, &$globalLink, $clientIdentifier) {
|
118 |
+
$documentInfo = new DocumentInfo;
|
119 |
+
|
120 |
+
$documentInfo->projectTicket = $projectTicket;
|
121 |
+
$documentInfo->sourceLocale = $globalLink->sourceLocale;
|
122 |
+
$documentInfo->name = $globalLink->sourceFileName;
|
123 |
+
$documentInfo->clientIdentifier = $clientIdentifier;
|
124 |
+
$dateRequested = new PDDate;
|
125 |
+
$dateRequested->date = $globalLink->dueDate;
|
126 |
+
$dateRequested->critical = false;
|
127 |
+
$documentInfo->dateRequested = $dateRequested;
|
128 |
+
$documentInfo->instructions = $globalLink->submissionInstructions;
|
129 |
+
|
130 |
+
$targetInfos = array();
|
131 |
+
foreach ($globalLink->targetLocale as $key => $value) {
|
132 |
+
$targetInfos[$key] = createTargetInfo($value, $globalLink);
|
133 |
+
}
|
134 |
+
|
135 |
+
$documentInfo->targetInfos = $targetInfos;
|
136 |
+
|
137 |
+
return $documentInfo;
|
138 |
+
}
|
139 |
+
|
140 |
+
function createTargetInfo($locale, &$globalLink) {
|
141 |
+
$targetInfo = new TargetInfo;
|
142 |
+
|
143 |
+
$targetInfo->targetLocale = $locale;
|
144 |
+
$dateRequested = new PDDate;
|
145 |
+
$dateRequested->date = $globalLink->dueDate;
|
146 |
+
$dateRequested->critical = false;
|
147 |
+
$targetInfo->dateRequested = $dateRequested;
|
148 |
+
$targetInfo->requestedDueDate = $globalLink->dueDate;
|
149 |
+
$priority = new Priority();
|
150 |
+
$priority->value = isset($globalLink->priority) ? intval($globalLink->priority) : 1;
|
151 |
+
$targetInfo->priority = $priority;
|
152 |
+
$targetInfo->encoding = "UTF-8";
|
153 |
+
|
154 |
+
return $targetInfo;
|
155 |
+
}
|
156 |
+
|
157 |
+
function createResourceInfo($clientIdentifier, &$pdObject, $globalLink) {
|
158 |
+
$resourceInfo = new ResourceInfo;
|
159 |
+
|
160 |
+
$resourceType = new ResourceType;
|
161 |
+
$resourceType->value = 0;
|
162 |
+
|
163 |
+
$resourceInfo->type = $resourceType;
|
164 |
+
$resourceInfo->mimeType = "text/xml";
|
165 |
+
$resourceInfo->classifier = $pdObject->classifier;
|
166 |
+
$resourceInfo->name = $globalLink->sourceFileName;
|
167 |
+
$resourceInfo->encoding = "UTF-8";
|
168 |
+
$resourceInfo->size = strlen($globalLink->sourceXML);
|
169 |
+
$resourceInfo->clientIdentifier = $clientIdentifier;
|
170 |
+
$resourceInfo->resourceInfoId = $GLOBALS['g_document_count'];
|
171 |
+
|
172 |
+
return $resourceInfo;
|
173 |
+
}
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/DocumentService2.wsdl
ADDED
@@ -0,0 +1,336 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
3 |
+
xmlns:ns="http://impl.services2.service.ws.projectdirector.gs4tr.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
|
4 |
+
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
5 |
+
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
6 |
+
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
|
7 |
+
xmlns:ax225="http://dto.model.projectdirector.gs4tr.org/xsd"
|
8 |
+
targetNamespace="http://impl.services2.service.ws.projectdirector.gs4tr.org">
|
9 |
+
<wsdl:documentation>DocumentService2</wsdl:documentation>
|
10 |
+
<wsdl:types>
|
11 |
+
<xs:schema xmlns:ax226="http://dto.model.projectdirector.gs4tr.org/xsd"
|
12 |
+
attributeFormDefault="qualified" elementFormDefault="qualified"
|
13 |
+
targetNamespace="http://impl.services2.service.ws.projectdirector.gs4tr.org">
|
14 |
+
<xs:import namespace="http://dto.model.projectdirector.gs4tr.org/xsd" schemaLocation="types.xsd" />
|
15 |
+
<xs:import namespace="http://www.w3.org/2005/05/xmlmime"
|
16 |
+
schemaLocation="xmime.xsd" />
|
17 |
+
<xs:element name="cancelDocument">
|
18 |
+
<xs:complexType>
|
19 |
+
<xs:sequence>
|
20 |
+
<xs:element name="documentTicket" nillable="false"
|
21 |
+
type="ax226:DocumentTicket" />
|
22 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
23 |
+
</xs:sequence>
|
24 |
+
</xs:complexType>
|
25 |
+
</xs:element>
|
26 |
+
<xs:element name="cancelDocumentResponse">
|
27 |
+
<xs:complexType>
|
28 |
+
<xs:sequence>
|
29 |
+
<xs:element name="return" nillable="true" type="xs:string" />
|
30 |
+
</xs:sequence>
|
31 |
+
</xs:complexType>
|
32 |
+
</xs:element>
|
33 |
+
<xs:element name="findByTicket">
|
34 |
+
<xs:complexType>
|
35 |
+
<xs:sequence>
|
36 |
+
<xs:element name="ticket" nillable="false" type="xs:string" />
|
37 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
38 |
+
</xs:sequence>
|
39 |
+
</xs:complexType>
|
40 |
+
</xs:element>
|
41 |
+
<xs:element name="findByTicketResponse">
|
42 |
+
<xs:complexType>
|
43 |
+
<xs:sequence>
|
44 |
+
<xs:element name="return" nillable="true" type="ax226:Document" />
|
45 |
+
</xs:sequence>
|
46 |
+
</xs:complexType>
|
47 |
+
</xs:element>
|
48 |
+
<xs:element name="search">
|
49 |
+
<xs:complexType>
|
50 |
+
<xs:sequence>
|
51 |
+
<xs:element name="command" nillable="false"
|
52 |
+
type="ax226:DocumentSearchRequest" />
|
53 |
+
<xs:element name="info" nillable="false" type="ax226:PagedListInfo" />
|
54 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
55 |
+
</xs:sequence>
|
56 |
+
</xs:complexType>
|
57 |
+
</xs:element>
|
58 |
+
<xs:element name="searchResponse">
|
59 |
+
<xs:complexType>
|
60 |
+
<xs:sequence>
|
61 |
+
<xs:element name="return" nillable="true"
|
62 |
+
type="ax226:DocumentPagedList" />
|
63 |
+
</xs:sequence>
|
64 |
+
</xs:complexType>
|
65 |
+
</xs:element>
|
66 |
+
<xs:element name="submitDocumentWithBinaryResource">
|
67 |
+
<xs:complexType>
|
68 |
+
<xs:sequence>
|
69 |
+
<xs:element name="documentInfo" nillable="false"
|
70 |
+
type="ax226:DocumentInfo" />
|
71 |
+
<xs:element name="resourceInfo" nillable="false"
|
72 |
+
type="ax226:ResourceInfo" />
|
73 |
+
<xs:element name="data" nillable="false" type="xmime:base64Binary" />
|
74 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
75 |
+
</xs:sequence>
|
76 |
+
</xs:complexType>
|
77 |
+
</xs:element>
|
78 |
+
<xs:element name="submitDocumentWithBinaryResourceResponse">
|
79 |
+
<xs:complexType>
|
80 |
+
<xs:sequence>
|
81 |
+
<xs:element name="return" nillable="true"
|
82 |
+
type="ax226:DocumentTicket" />
|
83 |
+
</xs:sequence>
|
84 |
+
</xs:complexType>
|
85 |
+
</xs:element>
|
86 |
+
<xs:element name="submitDocumentWithTextResource">
|
87 |
+
<xs:complexType>
|
88 |
+
<xs:sequence>
|
89 |
+
<xs:element name="documentInfo" nillable="false"
|
90 |
+
type="ax226:DocumentInfo" />
|
91 |
+
<xs:element name="resourceInfo" nillable="false"
|
92 |
+
type="ax226:ResourceInfo" />
|
93 |
+
<xs:element name="data" nillable="false" type="xs:string" />
|
94 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
95 |
+
</xs:sequence>
|
96 |
+
</xs:complexType>
|
97 |
+
</xs:element>
|
98 |
+
<xs:element name="submitDocumentWithTextResourceResponse">
|
99 |
+
<xs:complexType>
|
100 |
+
<xs:sequence>
|
101 |
+
<xs:element name="return" nillable="true"
|
102 |
+
type="ax226:DocumentTicket" />
|
103 |
+
</xs:sequence>
|
104 |
+
</xs:complexType>
|
105 |
+
</xs:element>
|
106 |
+
</xs:schema>
|
107 |
+
</wsdl:types>
|
108 |
+
<wsdl:message name="findByTicketRequest">
|
109 |
+
<wsdl:part name="parameters" element="ns:findByTicket" />
|
110 |
+
</wsdl:message>
|
111 |
+
<wsdl:message name="findByTicketResponse">
|
112 |
+
<wsdl:part name="parameters" element="ns:findByTicketResponse" />
|
113 |
+
</wsdl:message>
|
114 |
+
<wsdl:message name="submitDocumentWithTextResourceRequest">
|
115 |
+
<wsdl:part name="parameters" element="ns:submitDocumentWithTextResource" />
|
116 |
+
</wsdl:message>
|
117 |
+
<wsdl:message name="submitDocumentWithTextResourceResponse">
|
118 |
+
<wsdl:part name="parameters" element="ns:submitDocumentWithTextResourceResponse" />
|
119 |
+
</wsdl:message>
|
120 |
+
<wsdl:message name="cancelDocumentRequest">
|
121 |
+
<wsdl:part name="parameters" element="ns:cancelDocument" />
|
122 |
+
</wsdl:message>
|
123 |
+
<wsdl:message name="cancelDocumentResponse">
|
124 |
+
<wsdl:part name="parameters" element="ns:cancelDocumentResponse" />
|
125 |
+
</wsdl:message>
|
126 |
+
<wsdl:message name="submitDocumentWithBinaryResourceRequest">
|
127 |
+
<wsdl:part name="parameters" element="ns:submitDocumentWithBinaryResource" />
|
128 |
+
</wsdl:message>
|
129 |
+
<wsdl:message name="submitDocumentWithBinaryResourceResponse">
|
130 |
+
<wsdl:part name="parameters"
|
131 |
+
element="ns:submitDocumentWithBinaryResourceResponse" />
|
132 |
+
</wsdl:message>
|
133 |
+
<wsdl:message name="searchRequest">
|
134 |
+
<wsdl:part name="parameters" element="ns:search" />
|
135 |
+
</wsdl:message>
|
136 |
+
<wsdl:message name="searchResponse">
|
137 |
+
<wsdl:part name="parameters" element="ns:searchResponse" />
|
138 |
+
</wsdl:message>
|
139 |
+
<wsdl:portType name="DocumentService2PortType">
|
140 |
+
<wsdl:operation name="findByTicket">
|
141 |
+
<wsdl:input message="ns:findByTicketRequest" wsaw:Action="urn:findByTicket" />
|
142 |
+
<wsdl:output message="ns:findByTicketResponse"
|
143 |
+
wsaw:Action="urn:findByTicketResponse" />
|
144 |
+
</wsdl:operation>
|
145 |
+
<wsdl:operation name="submitDocumentWithTextResource">
|
146 |
+
<wsdl:input message="ns:submitDocumentWithTextResourceRequest"
|
147 |
+
wsaw:Action="urn:submitDocumentWithTextResource" />
|
148 |
+
<wsdl:output message="ns:submitDocumentWithTextResourceResponse"
|
149 |
+
wsaw:Action="urn:submitDocumentWithTextResourceResponse" />
|
150 |
+
</wsdl:operation>
|
151 |
+
<wsdl:operation name="cancelDocument">
|
152 |
+
<wsdl:input message="ns:cancelDocumentRequest"
|
153 |
+
wsaw:Action="urn:cancelDocument" />
|
154 |
+
<wsdl:output message="ns:cancelDocumentResponse"
|
155 |
+
wsaw:Action="urn:cancelDocumentResponse" />
|
156 |
+
</wsdl:operation>
|
157 |
+
<wsdl:operation name="submitDocumentWithBinaryResource">
|
158 |
+
<wsdl:input message="ns:submitDocumentWithBinaryResourceRequest"
|
159 |
+
wsaw:Action="urn:submitDocumentWithBinaryResource" />
|
160 |
+
<wsdl:output message="ns:submitDocumentWithBinaryResourceResponse"
|
161 |
+
wsaw:Action="urn:submitDocumentWithBinaryResourceResponse" />
|
162 |
+
</wsdl:operation>
|
163 |
+
<wsdl:operation name="search">
|
164 |
+
<wsdl:input message="ns:searchRequest" wsaw:Action="urn:search" />
|
165 |
+
<wsdl:output message="ns:searchResponse" wsaw:Action="urn:searchResponse" />
|
166 |
+
</wsdl:operation>
|
167 |
+
</wsdl:portType>
|
168 |
+
<wsdl:binding name="DocumentService2Soap11Binding" type="ns:DocumentService2PortType">
|
169 |
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
170 |
+
style="document" />
|
171 |
+
<wsdl:operation name="findByTicket">
|
172 |
+
<soap:operation soapAction="urn:findByTicket" style="document" />
|
173 |
+
<wsdl:input>
|
174 |
+
<soap:body use="literal" />
|
175 |
+
</wsdl:input>
|
176 |
+
<wsdl:output>
|
177 |
+
<soap:body use="literal" />
|
178 |
+
</wsdl:output>
|
179 |
+
</wsdl:operation>
|
180 |
+
<wsdl:operation name="submitDocumentWithTextResource">
|
181 |
+
<soap:operation soapAction="urn:submitDocumentWithTextResource"
|
182 |
+
style="document" />
|
183 |
+
<wsdl:input>
|
184 |
+
<soap:body use="literal" />
|
185 |
+
</wsdl:input>
|
186 |
+
<wsdl:output>
|
187 |
+
<soap:body use="literal" />
|
188 |
+
</wsdl:output>
|
189 |
+
</wsdl:operation>
|
190 |
+
<wsdl:operation name="submitDocumentWithBinaryResource">
|
191 |
+
<soap:operation soapAction="urn:submitDocumentWithBinaryResource"
|
192 |
+
style="document" />
|
193 |
+
<wsdl:input>
|
194 |
+
<soap:body use="literal" />
|
195 |
+
</wsdl:input>
|
196 |
+
<wsdl:output>
|
197 |
+
<soap:body use="literal" />
|
198 |
+
</wsdl:output>
|
199 |
+
</wsdl:operation>
|
200 |
+
<wsdl:operation name="cancelDocument">
|
201 |
+
<soap:operation soapAction="urn:cancelDocument" style="document" />
|
202 |
+
<wsdl:input>
|
203 |
+
<soap:body use="literal" />
|
204 |
+
</wsdl:input>
|
205 |
+
<wsdl:output>
|
206 |
+
<soap:body use="literal" />
|
207 |
+
</wsdl:output>
|
208 |
+
</wsdl:operation>
|
209 |
+
<wsdl:operation name="search">
|
210 |
+
<soap:operation soapAction="urn:search" style="document" />
|
211 |
+
<wsdl:input>
|
212 |
+
<soap:body use="literal" />
|
213 |
+
</wsdl:input>
|
214 |
+
<wsdl:output>
|
215 |
+
<soap:body use="literal" />
|
216 |
+
</wsdl:output>
|
217 |
+
</wsdl:operation>
|
218 |
+
</wsdl:binding>
|
219 |
+
<wsdl:binding name="DocumentService2Soap12Binding" type="ns:DocumentService2PortType">
|
220 |
+
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
|
221 |
+
style="document" />
|
222 |
+
<wsdl:operation name="findByTicket">
|
223 |
+
<soap12:operation soapAction="urn:findByTicket"
|
224 |
+
style="document" />
|
225 |
+
<wsdl:input>
|
226 |
+
<soap12:body use="literal" />
|
227 |
+
</wsdl:input>
|
228 |
+
<wsdl:output>
|
229 |
+
<soap12:body use="literal" />
|
230 |
+
</wsdl:output>
|
231 |
+
</wsdl:operation>
|
232 |
+
<wsdl:operation name="submitDocumentWithTextResource">
|
233 |
+
<soap12:operation soapAction="urn:submitDocumentWithTextResource"
|
234 |
+
style="document" />
|
235 |
+
<wsdl:input>
|
236 |
+
<soap12:body use="literal" />
|
237 |
+
</wsdl:input>
|
238 |
+
<wsdl:output>
|
239 |
+
<soap12:body use="literal" />
|
240 |
+
</wsdl:output>
|
241 |
+
</wsdl:operation>
|
242 |
+
<wsdl:operation name="submitDocumentWithBinaryResource">
|
243 |
+
<soap12:operation soapAction="urn:submitDocumentWithBinaryResource"
|
244 |
+
style="document" />
|
245 |
+
<wsdl:input>
|
246 |
+
<soap12:body use="literal" />
|
247 |
+
</wsdl:input>
|
248 |
+
<wsdl:output>
|
249 |
+
<soap12:body use="literal" />
|
250 |
+
</wsdl:output>
|
251 |
+
</wsdl:operation>
|
252 |
+
<wsdl:operation name="cancelDocument">
|
253 |
+
<soap12:operation soapAction="urn:cancelDocument"
|
254 |
+
style="document" />
|
255 |
+
<wsdl:input>
|
256 |
+
<soap12:body use="literal" />
|
257 |
+
</wsdl:input>
|
258 |
+
<wsdl:output>
|
259 |
+
<soap12:body use="literal" />
|
260 |
+
</wsdl:output>
|
261 |
+
</wsdl:operation>
|
262 |
+
<wsdl:operation name="search">
|
263 |
+
<soap12:operation soapAction="urn:search" style="document" />
|
264 |
+
<wsdl:input>
|
265 |
+
<soap12:body use="literal" />
|
266 |
+
</wsdl:input>
|
267 |
+
<wsdl:output>
|
268 |
+
<soap12:body use="literal" />
|
269 |
+
</wsdl:output>
|
270 |
+
</wsdl:operation>
|
271 |
+
</wsdl:binding>
|
272 |
+
<wsdl:binding name="DocumentService2HttpBinding" type="ns:DocumentService2PortType">
|
273 |
+
<http:binding verb="POST" />
|
274 |
+
<wsdl:operation name="findByTicket">
|
275 |
+
<http:operation location="DocumentService2/findByTicket" />
|
276 |
+
<wsdl:input>
|
277 |
+
<mime:content type="text/xml" part="findByTicket" />
|
278 |
+
</wsdl:input>
|
279 |
+
<wsdl:output>
|
280 |
+
<mime:content type="text/xml" part="findByTicket" />
|
281 |
+
</wsdl:output>
|
282 |
+
</wsdl:operation>
|
283 |
+
<wsdl:operation name="submitDocumentWithTextResource">
|
284 |
+
<http:operation location="DocumentService2/submitDocumentWithTextResource" />
|
285 |
+
<wsdl:input>
|
286 |
+
<mime:content type="text/xml" part="submitDocumentWithTextResource" />
|
287 |
+
</wsdl:input>
|
288 |
+
<wsdl:output>
|
289 |
+
<mime:content type="text/xml" part="submitDocumentWithTextResource" />
|
290 |
+
</wsdl:output>
|
291 |
+
</wsdl:operation>
|
292 |
+
<wsdl:operation name="submitDocumentWithBinaryResource">
|
293 |
+
<http:operation location="DocumentService2/submitDocumentWithBinaryResource" />
|
294 |
+
<wsdl:input>
|
295 |
+
<mime:content type="text/xml" part="submitDocumentWithBinaryResource" />
|
296 |
+
</wsdl:input>
|
297 |
+
<wsdl:output>
|
298 |
+
<mime:content type="text/xml" part="submitDocumentWithBinaryResource" />
|
299 |
+
</wsdl:output>
|
300 |
+
</wsdl:operation>
|
301 |
+
<wsdl:operation name="cancelDocument">
|
302 |
+
<http:operation location="DocumentService2/cancelDocument" />
|
303 |
+
<wsdl:input>
|
304 |
+
<mime:content type="text/xml" part="cancelDocument" />
|
305 |
+
</wsdl:input>
|
306 |
+
<wsdl:output>
|
307 |
+
<mime:content type="text/xml" part="cancelDocument" />
|
308 |
+
</wsdl:output>
|
309 |
+
</wsdl:operation>
|
310 |
+
<wsdl:operation name="search">
|
311 |
+
<http:operation location="DocumentService2/search" />
|
312 |
+
<wsdl:input>
|
313 |
+
<mime:content type="text/xml" part="search" />
|
314 |
+
</wsdl:input>
|
315 |
+
<wsdl:output>
|
316 |
+
<mime:content type="text/xml" part="search" />
|
317 |
+
</wsdl:output>
|
318 |
+
</wsdl:operation>
|
319 |
+
</wsdl:binding>
|
320 |
+
<wsdl:service name="DocumentService2">
|
321 |
+
<wsdl:port name="DocumentService2HttpSoap11Endpoint"
|
322 |
+
binding="ns:DocumentService2Soap11Binding">
|
323 |
+
<soap:address
|
324 |
+
location="http://localhost/services/DocumentService2.DocumentService2HttpSoap11Endpoint" />
|
325 |
+
</wsdl:port>
|
326 |
+
<wsdl:port name="DocumentService2HttpSoap12Endpoint"
|
327 |
+
binding="ns:DocumentService2Soap12Binding">
|
328 |
+
<soap12:address
|
329 |
+
location="http://localhost/services/DocumentService2.DocumentService2HttpSoap12Endpoint" />
|
330 |
+
</wsdl:port>
|
331 |
+
<wsdl:port name="DocumentService2HttpEndpoint" binding="ns:DocumentService2HttpBinding">
|
332 |
+
<http:address
|
333 |
+
location="http://localhost/services/DocumentService2.DocumentService2HttpEndpoint" />
|
334 |
+
</wsdl:port>
|
335 |
+
</wsdl:service>
|
336 |
+
</wsdl:definitions>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/ProjectService2.wsdl
ADDED
@@ -0,0 +1,268 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
3 |
+
xmlns:ns="http://impl.services2.service.ws.projectdirector.gs4tr.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
|
4 |
+
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
5 |
+
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
6 |
+
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ax21="http://dto.model.projectdirector.gs4tr.org/xsd"
|
7 |
+
targetNamespace="http://impl.services2.service.ws.projectdirector.gs4tr.org">
|
8 |
+
<wsdl:documentation>ProjectService2</wsdl:documentation>
|
9 |
+
<wsdl:types>
|
10 |
+
<xs:schema xmlns:ax22="http://dto.model.projectdirector.gs4tr.org/xsd"
|
11 |
+
attributeFormDefault="qualified" elementFormDefault="qualified"
|
12 |
+
targetNamespace="http://impl.services2.service.ws.projectdirector.gs4tr.org">
|
13 |
+
<xs:import namespace="http://dto.model.projectdirector.gs4tr.org/xsd" schemaLocation="types.xsd" />
|
14 |
+
<xs:element name="findByTicket">
|
15 |
+
<xs:complexType>
|
16 |
+
<xs:sequence>
|
17 |
+
<xs:element name="ticket" nillable="false" type="xs:string" />
|
18 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
19 |
+
</xs:sequence>
|
20 |
+
</xs:complexType>
|
21 |
+
</xs:element>
|
22 |
+
<xs:element name="findByTicketResponse">
|
23 |
+
<xs:complexType>
|
24 |
+
<xs:sequence>
|
25 |
+
<xs:element name="return" nillable="true" type="ax22:Project" />
|
26 |
+
</xs:sequence>
|
27 |
+
</xs:complexType>
|
28 |
+
</xs:element>
|
29 |
+
<xs:element name="findProjectByName">
|
30 |
+
<xs:complexType>
|
31 |
+
<xs:sequence>
|
32 |
+
<xs:element name="projectName" nillable="false" type="xs:string" />
|
33 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
34 |
+
</xs:sequence>
|
35 |
+
</xs:complexType>
|
36 |
+
</xs:element>
|
37 |
+
<xs:element name="findProjectByNameResponse">
|
38 |
+
<xs:complexType>
|
39 |
+
<xs:sequence>
|
40 |
+
<xs:element name="return" nillable="true" type="ax22:Project" />
|
41 |
+
</xs:sequence>
|
42 |
+
</xs:complexType>
|
43 |
+
</xs:element>
|
44 |
+
<xs:element name="findProjectByShortCode">
|
45 |
+
<xs:complexType>
|
46 |
+
<xs:sequence>
|
47 |
+
<xs:element name="projectShortCode" nillable="false"
|
48 |
+
type="xs:string" />
|
49 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
50 |
+
</xs:sequence>
|
51 |
+
</xs:complexType>
|
52 |
+
</xs:element>
|
53 |
+
<xs:element name="findProjectByShortCodeResponse">
|
54 |
+
<xs:complexType>
|
55 |
+
<xs:sequence>
|
56 |
+
<xs:element name="return" nillable="true" type="ax22:Project" />
|
57 |
+
</xs:sequence>
|
58 |
+
</xs:complexType>
|
59 |
+
</xs:element>
|
60 |
+
<xs:element name="getUserProjects">
|
61 |
+
<xs:complexType>
|
62 |
+
<xs:sequence>
|
63 |
+
<xs:element name="isSubProjectIncluded" nillable="false"
|
64 |
+
type="xs:boolean" />
|
65 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
66 |
+
</xs:sequence>
|
67 |
+
</xs:complexType>
|
68 |
+
</xs:element>
|
69 |
+
<xs:element name="getUserProjectsResponse">
|
70 |
+
<xs:complexType>
|
71 |
+
<xs:sequence>
|
72 |
+
<xs:element name="return" maxOccurs="unbounded" type="ax21:Project"
|
73 |
+
nillable="true" />
|
74 |
+
</xs:sequence>
|
75 |
+
</xs:complexType>
|
76 |
+
</xs:element>
|
77 |
+
</xs:schema>
|
78 |
+
</wsdl:types>
|
79 |
+
<wsdl:message name="findByTicketRequest">
|
80 |
+
<wsdl:part name="parameters" element="ns:findByTicket" />
|
81 |
+
</wsdl:message>
|
82 |
+
<wsdl:message name="findByTicketResponse">
|
83 |
+
<wsdl:part name="parameters" element="ns:findByTicketResponse" />
|
84 |
+
</wsdl:message>
|
85 |
+
<wsdl:message name="findProjectByNameRequest">
|
86 |
+
<wsdl:part name="parameters" element="ns:findProjectByName" />
|
87 |
+
</wsdl:message>
|
88 |
+
<wsdl:message name="findProjectByNameResponse">
|
89 |
+
<wsdl:part name="parameters" element="ns:findProjectByNameResponse" />
|
90 |
+
</wsdl:message>
|
91 |
+
<wsdl:message name="findProjectByShortCodeRequest">
|
92 |
+
<wsdl:part name="parameters" element="ns:findProjectByShortCode" />
|
93 |
+
</wsdl:message>
|
94 |
+
<wsdl:message name="findProjectByShortCodeResponse">
|
95 |
+
<wsdl:part name="parameters" element="ns:findProjectByShortCodeResponse" />
|
96 |
+
</wsdl:message>
|
97 |
+
<wsdl:message name="getUserProjectsRequest">
|
98 |
+
<wsdl:part name="parameters" element="ns:getUserProjects" />
|
99 |
+
</wsdl:message>
|
100 |
+
<wsdl:message name="getUserProjectsResponse">
|
101 |
+
<wsdl:part name="parameters" element="ns:getUserProjectsResponse" />
|
102 |
+
</wsdl:message>
|
103 |
+
<wsdl:portType name="ProjectService2PortType">
|
104 |
+
<wsdl:operation name="findByTicket">
|
105 |
+
<wsdl:input message="ns:findByTicketRequest" wsaw:Action="urn:findByTicket" />
|
106 |
+
<wsdl:output message="ns:findByTicketResponse"
|
107 |
+
wsaw:Action="urn:findByTicketResponse" />
|
108 |
+
</wsdl:operation>
|
109 |
+
<wsdl:operation name="findProjectByName">
|
110 |
+
<wsdl:input message="ns:findProjectByNameRequest"
|
111 |
+
wsaw:Action="urn:findProjectByName" />
|
112 |
+
<wsdl:output message="ns:findProjectByNameResponse"
|
113 |
+
wsaw:Action="urn:findProjectByNameResponse" />
|
114 |
+
</wsdl:operation>
|
115 |
+
<wsdl:operation name="findProjectByShortCode">
|
116 |
+
<wsdl:input message="ns:findProjectByShortCodeRequest"
|
117 |
+
wsaw:Action="urn:findProjectByShortCode" />
|
118 |
+
<wsdl:output message="ns:findProjectByShortCodeResponse"
|
119 |
+
wsaw:Action="urn:findProjectByShortCodeResponse" />
|
120 |
+
</wsdl:operation>
|
121 |
+
<wsdl:operation name="getUserProjects">
|
122 |
+
<wsdl:input message="ns:getUserProjectsRequest"
|
123 |
+
wsaw:Action="urn:getUserProjectsRequest" />
|
124 |
+
<wsdl:output message="ns:getUserProjectsResponse"
|
125 |
+
wsaw:Action="urn:getUserProjectsResponse" />
|
126 |
+
</wsdl:operation>
|
127 |
+
</wsdl:portType>
|
128 |
+
<wsdl:binding name="ProjectService2Soap11Binding" type="ns:ProjectService2PortType">
|
129 |
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
130 |
+
style="document" />
|
131 |
+
<wsdl:operation name="findByTicket">
|
132 |
+
<soap:operation soapAction="urn:findByTicket" style="document" />
|
133 |
+
<wsdl:input>
|
134 |
+
<soap:body use="literal" />
|
135 |
+
</wsdl:input>
|
136 |
+
<wsdl:output>
|
137 |
+
<soap:body use="literal" />
|
138 |
+
</wsdl:output>
|
139 |
+
</wsdl:operation>
|
140 |
+
<wsdl:operation name="findProjectByName">
|
141 |
+
<soap:operation soapAction="urn:findProjectByName"
|
142 |
+
style="document" />
|
143 |
+
<wsdl:input>
|
144 |
+
<soap:body use="literal" />
|
145 |
+
</wsdl:input>
|
146 |
+
<wsdl:output>
|
147 |
+
<soap:body use="literal" />
|
148 |
+
</wsdl:output>
|
149 |
+
</wsdl:operation>
|
150 |
+
<wsdl:operation name="findProjectByShortCode">
|
151 |
+
<soap:operation soapAction="urn:findProjectByShortCode"
|
152 |
+
style="document" />
|
153 |
+
<wsdl:input>
|
154 |
+
<soap:body use="literal" />
|
155 |
+
</wsdl:input>
|
156 |
+
<wsdl:output>
|
157 |
+
<soap:body use="literal" />
|
158 |
+
</wsdl:output>
|
159 |
+
</wsdl:operation>
|
160 |
+
<wsdl:operation name="getUserProjects">
|
161 |
+
<soap:operation soapAction="urn:getUserProjects"
|
162 |
+
style="document" />
|
163 |
+
<wsdl:input>
|
164 |
+
<soap:body use="literal" />
|
165 |
+
</wsdl:input>
|
166 |
+
<wsdl:output>
|
167 |
+
<soap:body use="literal" />
|
168 |
+
</wsdl:output>
|
169 |
+
</wsdl:operation>
|
170 |
+
</wsdl:binding>
|
171 |
+
<wsdl:binding name="ProjectService2Soap12Binding" type="ns:ProjectService2PortType">
|
172 |
+
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
|
173 |
+
style="document" />
|
174 |
+
<wsdl:operation name="findByTicket">
|
175 |
+
<soap12:operation soapAction="urn:findByTicket"
|
176 |
+
style="document" />
|
177 |
+
<wsdl:input>
|
178 |
+
<soap12:body use="literal" />
|
179 |
+
</wsdl:input>
|
180 |
+
<wsdl:output>
|
181 |
+
<soap12:body use="literal" />
|
182 |
+
</wsdl:output>
|
183 |
+
</wsdl:operation>
|
184 |
+
<wsdl:operation name="findProjectByName">
|
185 |
+
<soap12:operation soapAction="urn:findProjectByName"
|
186 |
+
style="document" />
|
187 |
+
<wsdl:input>
|
188 |
+
<soap12:body use="literal" />
|
189 |
+
</wsdl:input>
|
190 |
+
<wsdl:output>
|
191 |
+
<soap12:body use="literal" />
|
192 |
+
</wsdl:output>
|
193 |
+
</wsdl:operation>
|
194 |
+
<wsdl:operation name="findProjectByShortCode">
|
195 |
+
<soap12:operation soapAction="urn:findProjectByShortCode"
|
196 |
+
style="document" />
|
197 |
+
<wsdl:input>
|
198 |
+
<soap12:body use="literal" />
|
199 |
+
</wsdl:input>
|
200 |
+
<wsdl:output>
|
201 |
+
<soap12:body use="literal" />
|
202 |
+
</wsdl:output>
|
203 |
+
</wsdl:operation>
|
204 |
+
<wsdl:operation name="getUserProjects">
|
205 |
+
<soap12:operation soapAction="urn:getUserProjects"
|
206 |
+
style="document" />
|
207 |
+
<wsdl:input>
|
208 |
+
<soap12:body use="literal" />
|
209 |
+
</wsdl:input>
|
210 |
+
<wsdl:output>
|
211 |
+
<soap12:body use="literal" />
|
212 |
+
</wsdl:output>
|
213 |
+
</wsdl:operation>
|
214 |
+
</wsdl:binding>
|
215 |
+
<wsdl:binding name="ProjectService2HttpBinding" type="ns:ProjectService2PortType">
|
216 |
+
<http:binding verb="POST" />
|
217 |
+
<wsdl:operation name="findByTicket">
|
218 |
+
<http:operation location="ProjectService2/findByTicket" />
|
219 |
+
<wsdl:input>
|
220 |
+
<mime:content type="text/xml" part="findByTicket" />
|
221 |
+
</wsdl:input>
|
222 |
+
<wsdl:output>
|
223 |
+
<mime:content type="text/xml" part="findByTicket" />
|
224 |
+
</wsdl:output>
|
225 |
+
</wsdl:operation>
|
226 |
+
<wsdl:operation name="findProjectByName">
|
227 |
+
<http:operation location="ProjectService2/findProjectByName" />
|
228 |
+
<wsdl:input>
|
229 |
+
<mime:content type="text/xml" part="findProjectByName" />
|
230 |
+
</wsdl:input>
|
231 |
+
<wsdl:output>
|
232 |
+
<mime:content type="text/xml" part="findProjectByName" />
|
233 |
+
</wsdl:output>
|
234 |
+
</wsdl:operation>
|
235 |
+
<wsdl:operation name="findProjectByShortCode">
|
236 |
+
<http:operation location="ProjectService2/findProjectByShortCode" />
|
237 |
+
<wsdl:input>
|
238 |
+
<mime:content type="text/xml" part="findProjectByShortCode" />
|
239 |
+
</wsdl:input>
|
240 |
+
<wsdl:output>
|
241 |
+
<mime:content type="text/xml" part="findProjectByShortCode" />
|
242 |
+
</wsdl:output>
|
243 |
+
</wsdl:operation>
|
244 |
+
<wsdl:operation name="getUserProjects">
|
245 |
+
<http:operation location="ProjectService/getUserProjects" />
|
246 |
+
<wsdl:input>
|
247 |
+
<mime:content type="text/xml" part="getUserProjects" />
|
248 |
+
</wsdl:input>
|
249 |
+
<wsdl:output>
|
250 |
+
<mime:content type="text/xml" part="getUserProjects" />
|
251 |
+
</wsdl:output>
|
252 |
+
</wsdl:operation>
|
253 |
+
</wsdl:binding>
|
254 |
+
<wsdl:service name="ProjectService2">
|
255 |
+
<wsdl:port name="ProjectService2HttpSoap11Endpoint" binding="ns:ProjectService2Soap11Binding">
|
256 |
+
<soap:address
|
257 |
+
location="http://localhost/services/ProjectService2.ProjectService2HttpSoap11Endpoint" />
|
258 |
+
</wsdl:port>
|
259 |
+
<wsdl:port name="ProjectService2HttpSoap12Endpoint" binding="ns:ProjectService2Soap12Binding">
|
260 |
+
<soap12:address
|
261 |
+
location="http://localhost/services/ProjectService2.ProjectService2HttpSoap12Endpoint" />
|
262 |
+
</wsdl:port>
|
263 |
+
<wsdl:port name="ProjectService2HttpEndpoint" binding="ns:ProjectService2HttpBinding">
|
264 |
+
<http:address
|
265 |
+
location="http://localhost/services/ProjectService2.ProjectService2HttpEndpoint" />
|
266 |
+
</wsdl:port>
|
267 |
+
</wsdl:service>
|
268 |
+
</wsdl:definitions>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/SessionService2.wsdl
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
3 |
+
xmlns:ns="http://impl.services2.service.ws.projectdirector.gs4tr.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
|
4 |
+
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
5 |
+
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
6 |
+
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://impl.services2.service.ws.projectdirector.gs4tr.org">
|
7 |
+
<wsdl:documentation>SessionService2</wsdl:documentation>
|
8 |
+
<wsdl:types>
|
9 |
+
<xs:schema xmlns:ax22="http://impl.services2.service.ws.projectdirector.gs4tr.org/xsd"
|
10 |
+
attributeFormDefault="qualified" elementFormDefault="qualified"
|
11 |
+
targetNamespace="http://impl.services2.service.ws.projectdirector.gs4tr.org">
|
12 |
+
<xs:element name="login">
|
13 |
+
<xs:complexType>
|
14 |
+
<xs:sequence>
|
15 |
+
<xs:element name="username" nillable="false" type="xs:string" />
|
16 |
+
<xs:element name="password" nillable="false" type="xs:string" />
|
17 |
+
</xs:sequence>
|
18 |
+
</xs:complexType>
|
19 |
+
</xs:element>
|
20 |
+
<xs:element name="loginResponse">
|
21 |
+
<xs:complexType>
|
22 |
+
<xs:sequence>
|
23 |
+
<xs:element name="return" nillable="true" type="xs:string" />
|
24 |
+
</xs:sequence>
|
25 |
+
</xs:complexType>
|
26 |
+
</xs:element>
|
27 |
+
<xs:element name="logout">
|
28 |
+
<xs:complexType>
|
29 |
+
<xs:sequence>
|
30 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
31 |
+
</xs:sequence>
|
32 |
+
</xs:complexType>
|
33 |
+
</xs:element>
|
34 |
+
<xs:element name="logoutResponse">
|
35 |
+
<xs:complexType>
|
36 |
+
<xs:sequence>
|
37 |
+
<xs:element name="return" nillable="true" type="xs:string" />
|
38 |
+
</xs:sequence>
|
39 |
+
</xs:complexType>
|
40 |
+
</xs:element>
|
41 |
+
</xs:schema>
|
42 |
+
</wsdl:types>
|
43 |
+
<wsdl:message name="logoutRequest">
|
44 |
+
<wsdl:part name="parameters" element="ns:logout" />
|
45 |
+
</wsdl:message>
|
46 |
+
<wsdl:message name="logoutResponse">
|
47 |
+
<wsdl:part name="parameters" element="ns:logoutResponse" />
|
48 |
+
</wsdl:message>
|
49 |
+
<wsdl:message name="loginRequest">
|
50 |
+
<wsdl:part name="parameters" element="ns:login" />
|
51 |
+
</wsdl:message>
|
52 |
+
<wsdl:message name="loginResponse">
|
53 |
+
<wsdl:part name="parameters" element="ns:loginResponse" />
|
54 |
+
</wsdl:message>
|
55 |
+
<wsdl:portType name="SessionService2PortType">
|
56 |
+
<wsdl:operation name="logout">
|
57 |
+
<wsdl:input message="ns:logoutRequest" wsaw:Action="urn:logout" />
|
58 |
+
<wsdl:output message="ns:logoutResponse" wsaw:Action="urn:logoutResponse" />
|
59 |
+
</wsdl:operation>
|
60 |
+
<wsdl:operation name="login">
|
61 |
+
<wsdl:input message="ns:loginRequest" wsaw:Action="urn:login" />
|
62 |
+
<wsdl:output message="ns:loginResponse" wsaw:Action="urn:loginResponse" />
|
63 |
+
</wsdl:operation>
|
64 |
+
</wsdl:portType>
|
65 |
+
<wsdl:binding name="SessionService2Soap11Binding" type="ns:SessionService2PortType">
|
66 |
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
67 |
+
style="document" />
|
68 |
+
<wsdl:operation name="logout">
|
69 |
+
<soap:operation soapAction="urn:logout" style="document" />
|
70 |
+
<wsdl:input>
|
71 |
+
<soap:body use="literal" />
|
72 |
+
</wsdl:input>
|
73 |
+
<wsdl:output>
|
74 |
+
<soap:body use="literal" />
|
75 |
+
</wsdl:output>
|
76 |
+
</wsdl:operation>
|
77 |
+
<wsdl:operation name="login">
|
78 |
+
<soap:operation soapAction="urn:login" style="document" />
|
79 |
+
<wsdl:input>
|
80 |
+
<soap:body use="literal" />
|
81 |
+
</wsdl:input>
|
82 |
+
<wsdl:output>
|
83 |
+
<soap:body use="literal" />
|
84 |
+
</wsdl:output>
|
85 |
+
</wsdl:operation>
|
86 |
+
</wsdl:binding>
|
87 |
+
<wsdl:binding name="SessionService2Soap12Binding" type="ns:SessionService2PortType">
|
88 |
+
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
|
89 |
+
style="document" />
|
90 |
+
<wsdl:operation name="logout">
|
91 |
+
<soap12:operation soapAction="urn:logout" style="document" />
|
92 |
+
<wsdl:input>
|
93 |
+
<soap12:body use="literal" />
|
94 |
+
</wsdl:input>
|
95 |
+
<wsdl:output>
|
96 |
+
<soap12:body use="literal" />
|
97 |
+
</wsdl:output>
|
98 |
+
</wsdl:operation>
|
99 |
+
<wsdl:operation name="login">
|
100 |
+
<soap12:operation soapAction="urn:login" style="document" />
|
101 |
+
<wsdl:input>
|
102 |
+
<soap12:body use="literal" />
|
103 |
+
</wsdl:input>
|
104 |
+
<wsdl:output>
|
105 |
+
<soap12:body use="literal" />
|
106 |
+
</wsdl:output>
|
107 |
+
</wsdl:operation>
|
108 |
+
</wsdl:binding>
|
109 |
+
<wsdl:binding name="SessionService2HttpBinding" type="ns:SessionService2PortType">
|
110 |
+
<http:binding verb="POST" />
|
111 |
+
<wsdl:operation name="logout">
|
112 |
+
<http:operation location="SessionService2/logout" />
|
113 |
+
<wsdl:input>
|
114 |
+
<mime:content type="text/xml" part="logout" />
|
115 |
+
</wsdl:input>
|
116 |
+
<wsdl:output>
|
117 |
+
<mime:content type="text/xml" part="logout" />
|
118 |
+
</wsdl:output>
|
119 |
+
</wsdl:operation>
|
120 |
+
<wsdl:operation name="login">
|
121 |
+
<http:operation location="SessionService2/login" />
|
122 |
+
<wsdl:input>
|
123 |
+
<mime:content type="text/xml" part="login" />
|
124 |
+
</wsdl:input>
|
125 |
+
<wsdl:output>
|
126 |
+
<mime:content type="text/xml" part="login" />
|
127 |
+
</wsdl:output>
|
128 |
+
</wsdl:operation>
|
129 |
+
</wsdl:binding>
|
130 |
+
<wsdl:service name="SessionService2">
|
131 |
+
<wsdl:port name="SessionService2HttpSoap11Endpoint" binding="ns:SessionService2Soap11Binding">
|
132 |
+
<soap:address
|
133 |
+
location="http://localhost/services/SessionService2.SessionService2HttpSoap11Endpoint" />
|
134 |
+
</wsdl:port>
|
135 |
+
<wsdl:port name="SessionService2HttpSoap12Endpoint" binding="ns:SessionService2Soap12Binding">
|
136 |
+
<soap12:address
|
137 |
+
location="http://localhost/services/SessionService2.SessionService2HttpSoap12Endpoint" />
|
138 |
+
</wsdl:port>
|
139 |
+
<wsdl:port name="SessionService2HttpEndpoint" binding="ns:SessionService2HttpBinding">
|
140 |
+
<http:address
|
141 |
+
location="http://localhost/services/SessionService2.SessionService2HttpEndpoint" />
|
142 |
+
</wsdl:port>
|
143 |
+
</wsdl:service>
|
144 |
+
</wsdl:definitions>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/SubmissionService2.wsdl
ADDED
@@ -0,0 +1,518 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
3 |
+
xmlns:ns="http://impl.services2.service.ws.projectdirector.gs4tr.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
|
4 |
+
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
5 |
+
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
6 |
+
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ax233="http://dto.model.projectdirector.gs4tr.org/xsd"
|
7 |
+
xmlns:xmime="http://www.w3.org/2005/05/xmlmime" targetNamespace="http://impl.services2.service.ws.projectdirector.gs4tr.org">
|
8 |
+
<wsdl:documentation>SubmissionService2</wsdl:documentation>
|
9 |
+
<wsdl:types>
|
10 |
+
<xs:schema xmlns:ax234="http://dto.model.projectdirector.gs4tr.org/xsd"
|
11 |
+
attributeFormDefault="qualified" elementFormDefault="qualified"
|
12 |
+
targetNamespace="http://impl.services2.service.ws.projectdirector.gs4tr.org">
|
13 |
+
<xs:import namespace="http://dto.model.projectdirector.gs4tr.org/xsd"
|
14 |
+
schemaLocation="types.xsd" />
|
15 |
+
<xs:import namespace="http://www.w3.org/2005/05/xmlmime"
|
16 |
+
schemaLocation="xmime.xsd" />
|
17 |
+
<xs:element name="cancelSubmission">
|
18 |
+
<xs:complexType>
|
19 |
+
<xs:sequence>
|
20 |
+
<xs:element name="submissionId" nillable="false" type="xs:string" />
|
21 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
22 |
+
</xs:sequence>
|
23 |
+
</xs:complexType>
|
24 |
+
</xs:element>
|
25 |
+
<xs:element name="cancelSubmissionResponse">
|
26 |
+
<xs:complexType>
|
27 |
+
<xs:sequence>
|
28 |
+
<xs:element name="return" nillable="true" type="xs:string" />
|
29 |
+
</xs:sequence>
|
30 |
+
</xs:complexType>
|
31 |
+
</xs:element>
|
32 |
+
<xs:element name="cancelSubmissionWithComment">
|
33 |
+
<xs:complexType>
|
34 |
+
<xs:sequence>
|
35 |
+
<xs:element name="submissionId" nillable="false" type="xs:string" />
|
36 |
+
<xs:element name="comment" nillable="false" type="xs:string" />
|
37 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
38 |
+
</xs:sequence>
|
39 |
+
</xs:complexType>
|
40 |
+
</xs:element>
|
41 |
+
<xs:element name="cancelSubmissionWithCommentResponse">
|
42 |
+
<xs:complexType>
|
43 |
+
<xs:sequence>
|
44 |
+
<xs:element name="return" nillable="true" type="xs:string" />
|
45 |
+
</xs:sequence>
|
46 |
+
</xs:complexType>
|
47 |
+
</xs:element>
|
48 |
+
<xs:element name="findByTicket">
|
49 |
+
<xs:complexType>
|
50 |
+
<xs:sequence>
|
51 |
+
<xs:element name="ticket" nillable="false" type="xs:string" />
|
52 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
53 |
+
</xs:sequence>
|
54 |
+
</xs:complexType>
|
55 |
+
</xs:element>
|
56 |
+
<xs:element name="findByTicketResponse">
|
57 |
+
<xs:complexType>
|
58 |
+
<xs:sequence>
|
59 |
+
<xs:element name="return" nillable="true" type="ax234:Submission" />
|
60 |
+
</xs:sequence>
|
61 |
+
</xs:complexType>
|
62 |
+
</xs:element>
|
63 |
+
<xs:element name="search">
|
64 |
+
<xs:complexType>
|
65 |
+
<xs:sequence>
|
66 |
+
<xs:element name="command" nillable="false"
|
67 |
+
type="ax234:SubmissionSearchRequest" />
|
68 |
+
<xs:element name="info" nillable="false" type="ax234:PagedListInfo" />
|
69 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
70 |
+
</xs:sequence>
|
71 |
+
</xs:complexType>
|
72 |
+
</xs:element>
|
73 |
+
<xs:element name="searchResponse">
|
74 |
+
<xs:complexType>
|
75 |
+
<xs:sequence>
|
76 |
+
<xs:element name="return" nillable="true"
|
77 |
+
type="ax234:SubmissionPagedList" />
|
78 |
+
</xs:sequence>
|
79 |
+
</xs:complexType>
|
80 |
+
</xs:element>
|
81 |
+
<xs:element name="searchSubmissions">
|
82 |
+
<xs:complexType>
|
83 |
+
<xs:sequence>
|
84 |
+
<xs:element name="submissionSearchRequest" nillable="false"
|
85 |
+
type="ax234:SubmissionSearchRequest" />
|
86 |
+
<xs:element name="info" nillable="false" type="ax234:PagedListInfo" />
|
87 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
88 |
+
</xs:sequence>
|
89 |
+
</xs:complexType>
|
90 |
+
</xs:element>
|
91 |
+
<xs:element name="searchSubmissionsResponse">
|
92 |
+
<xs:complexType>
|
93 |
+
<xs:sequence>
|
94 |
+
<xs:element name="return" nillable="true"
|
95 |
+
type="ax234:SubmissionSearchModelPagedList" />
|
96 |
+
</xs:sequence>
|
97 |
+
</xs:complexType>
|
98 |
+
</xs:element>
|
99 |
+
|
100 |
+
<xs:element name="startSingleBatchSubmission">
|
101 |
+
<xs:complexType>
|
102 |
+
<xs:sequence>
|
103 |
+
<xs:element name="submissionId" nillable="false" type="xs:string" />
|
104 |
+
<xs:element name="submissionInfo" nillable="true"
|
105 |
+
type="ax234:SubmissionInfo" />
|
106 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
107 |
+
</xs:sequence>
|
108 |
+
</xs:complexType>
|
109 |
+
</xs:element>
|
110 |
+
<xs:element name="startSingleBatchSubmissionResponse">
|
111 |
+
<xs:complexType>
|
112 |
+
<xs:sequence>
|
113 |
+
<xs:element name="return" nillable="true" type="xs:string" />
|
114 |
+
</xs:sequence>
|
115 |
+
</xs:complexType>
|
116 |
+
</xs:element>
|
117 |
+
|
118 |
+
<xs:element name="startSubmission">
|
119 |
+
<xs:complexType>
|
120 |
+
<xs:sequence>
|
121 |
+
<xs:element name="submissionId" nillable="false" type="xs:string" />
|
122 |
+
<xs:element name="submissionInfo" nillable="true"
|
123 |
+
type="ax234:SubmissionInfo" />
|
124 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
125 |
+
</xs:sequence>
|
126 |
+
</xs:complexType>
|
127 |
+
</xs:element>
|
128 |
+
<xs:element name="startSubmissionResponse">
|
129 |
+
<xs:complexType>
|
130 |
+
<xs:sequence>
|
131 |
+
<xs:element name="return" nillable="true" type="xs:string" />
|
132 |
+
</xs:sequence>
|
133 |
+
</xs:complexType>
|
134 |
+
</xs:element>
|
135 |
+
<xs:element name="uploadReference">
|
136 |
+
<xs:complexType>
|
137 |
+
<xs:sequence>
|
138 |
+
<xs:element name="submissionId" type="xs:string"
|
139 |
+
nillable="false" />
|
140 |
+
<xs:element name="resourceInfo" type="ax234:ResourceInfo"
|
141 |
+
nillable="false" />
|
142 |
+
<xs:element name="data" type="xmime:base64Binary"
|
143 |
+
nillable="false" />
|
144 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
145 |
+
</xs:sequence>
|
146 |
+
</xs:complexType>
|
147 |
+
</xs:element>
|
148 |
+
<xs:element name="uploadReferenceResponse">
|
149 |
+
<xs:complexType>
|
150 |
+
<xs:sequence>
|
151 |
+
<xs:element name="return" type="xs:string" nillable="true" />
|
152 |
+
</xs:sequence>
|
153 |
+
</xs:complexType>
|
154 |
+
</xs:element>
|
155 |
+
</xs:schema>
|
156 |
+
</wsdl:types>
|
157 |
+
<wsdl:message name="cancelSubmissionRequest">
|
158 |
+
<wsdl:part name="parameters" element="ns:cancelSubmission" />
|
159 |
+
</wsdl:message>
|
160 |
+
<wsdl:message name="cancelSubmissionResponse">
|
161 |
+
<wsdl:part name="parameters" element="ns:cancelSubmissionResponse" />
|
162 |
+
</wsdl:message>
|
163 |
+
<wsdl:message name="cancelSubmissionWithCommentRequest">
|
164 |
+
<wsdl:part name="parameters" element="ns:cancelSubmissionWithComment" />
|
165 |
+
</wsdl:message>
|
166 |
+
<wsdl:message name="cancelSubmissionWithCommentResponse">
|
167 |
+
<wsdl:part name="parameters" element="ns:cancelSubmissionWithCommentResponse" />
|
168 |
+
</wsdl:message>
|
169 |
+
<wsdl:message name="findByTicketRequest">
|
170 |
+
<wsdl:part name="parameters" element="ns:findByTicket" />
|
171 |
+
</wsdl:message>
|
172 |
+
<wsdl:message name="findByTicketResponse">
|
173 |
+
<wsdl:part name="parameters" element="ns:findByTicketResponse" />
|
174 |
+
</wsdl:message>
|
175 |
+
<wsdl:message name="searchRequest">
|
176 |
+
<wsdl:part name="parameters" element="ns:search" />
|
177 |
+
</wsdl:message>
|
178 |
+
<wsdl:message name="searchResponse">
|
179 |
+
<wsdl:part name="parameters" element="ns:searchResponse" />
|
180 |
+
</wsdl:message>
|
181 |
+
<wsdl:message name="searchSubmissionsRequest">
|
182 |
+
<wsdl:part name="parameters" element="ns:searchSubmissions" />
|
183 |
+
</wsdl:message>
|
184 |
+
<wsdl:message name="searchSubmissionsResponse">
|
185 |
+
<wsdl:part name="parameters" element="ns:searchSubmissionsResponse" />
|
186 |
+
</wsdl:message>
|
187 |
+
|
188 |
+
<wsdl:message name="startSingleBatchSubmissionRequest">
|
189 |
+
<wsdl:part name="parameters" element="ns:startSingleBatchSubmission" />
|
190 |
+
</wsdl:message>
|
191 |
+
<wsdl:message name="startSingleBatchSubmissionResponse">
|
192 |
+
<wsdl:part name="parameters" element="ns:startSingleBatchSubmissionResponse" />
|
193 |
+
</wsdl:message>
|
194 |
+
|
195 |
+
<wsdl:message name="startSubmissionRequest">
|
196 |
+
<wsdl:part name="parameters" element="ns:startSubmission" />
|
197 |
+
</wsdl:message>
|
198 |
+
<wsdl:message name="startSubmissionResponse">
|
199 |
+
<wsdl:part name="parameters" element="ns:startSubmissionResponse" />
|
200 |
+
</wsdl:message>
|
201 |
+
<wsdl:message name="uploadReferenceRequest">
|
202 |
+
<wsdl:part name="parameters" element="ns:uploadReference" />
|
203 |
+
</wsdl:message>
|
204 |
+
<wsdl:message name="uploadReferenceResponse">
|
205 |
+
<wsdl:part name="parameters" element="ns:uploadReferenceResponse" />
|
206 |
+
</wsdl:message>
|
207 |
+
<wsdl:portType name="SubmissionService2PortType">
|
208 |
+
<wsdl:operation name="cancelSubmission">
|
209 |
+
<wsdl:input message="ns:cancelSubmissionRequest"
|
210 |
+
wsaw:Action="urn:cancelSubmission" />
|
211 |
+
<wsdl:output message="ns:cancelSubmissionResponse"
|
212 |
+
wsaw:Action="urn:cancelSubmissionResponse" />
|
213 |
+
</wsdl:operation>
|
214 |
+
<wsdl:operation name="cancelSubmissionWithComment">
|
215 |
+
<wsdl:input message="ns:cancelSubmissionWithCommentRequest"
|
216 |
+
wsaw:Action="urn:cancelSubmissionWithComment" />
|
217 |
+
<wsdl:output message="ns:cancelSubmissionWithCommentResponse"
|
218 |
+
wsaw:Action="urn:cancelSubmissionWithCommentResponse" />
|
219 |
+
</wsdl:operation>
|
220 |
+
<wsdl:operation name="findByTicket">
|
221 |
+
<wsdl:input message="ns:findByTicketRequest" wsaw:Action="urn:findByTicket" />
|
222 |
+
<wsdl:output message="ns:findByTicketResponse"
|
223 |
+
wsaw:Action="urn:findByTicketResponse" />
|
224 |
+
</wsdl:operation>
|
225 |
+
<wsdl:operation name="search">
|
226 |
+
<wsdl:input message="ns:searchRequest" wsaw:Action="urn:search" />
|
227 |
+
<wsdl:output message="ns:searchResponse" wsaw:Action="urn:searchResponse" />
|
228 |
+
</wsdl:operation>
|
229 |
+
<wsdl:operation name="searchSubmissions">
|
230 |
+
<wsdl:input message="ns:searchSubmissionsRequest"
|
231 |
+
wsaw:Action="urn:searchSubmissions" />
|
232 |
+
<wsdl:output message="ns:searchSubmissionsResponse"
|
233 |
+
wsaw:Action="urn:searchSubmissionsResponse" />
|
234 |
+
</wsdl:operation>
|
235 |
+
|
236 |
+
<wsdl:operation name="startSingleBatchSubmission">
|
237 |
+
<wsdl:input message="ns:startSingleBatchSubmissionRequest"
|
238 |
+
wsaw:Action="urn:startSingleBatchSubmission" />
|
239 |
+
<wsdl:output message="ns:startSingleBatchSubmissionResponse"
|
240 |
+
wsaw:Action="urn:startSingleBatchSubmissionResponse" />
|
241 |
+
</wsdl:operation>
|
242 |
+
|
243 |
+
<wsdl:operation name="startSubmission">
|
244 |
+
<wsdl:input message="ns:startSubmissionRequest"
|
245 |
+
wsaw:Action="urn:startSubmission" />
|
246 |
+
<wsdl:output message="ns:startSubmissionResponse"
|
247 |
+
wsaw:Action="urn:startSubmissionResponse" />
|
248 |
+
</wsdl:operation>
|
249 |
+
<wsdl:operation name="uploadReference">
|
250 |
+
<wsdl:input message="ns:uploadReferenceRequest"
|
251 |
+
wsaw:Action="urn:uploadReferenceRequest" />
|
252 |
+
<wsdl:output message="ns:uploadReferenceResponse"
|
253 |
+
wsaw:Action="urn:uploadReferenceResponse" />
|
254 |
+
</wsdl:operation>
|
255 |
+
</wsdl:portType>
|
256 |
+
<wsdl:binding name="SubmissionService2Soap11Binding" type="ns:SubmissionService2PortType">
|
257 |
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
258 |
+
style="document" />
|
259 |
+
<wsdl:operation name="cancelSubmission">
|
260 |
+
<soap:operation soapAction="urn:cancelSubmission"
|
261 |
+
style="document" />
|
262 |
+
<wsdl:input>
|
263 |
+
<soap:body use="literal" />
|
264 |
+
</wsdl:input>
|
265 |
+
<wsdl:output>
|
266 |
+
<soap:body use="literal" />
|
267 |
+
</wsdl:output>
|
268 |
+
</wsdl:operation>
|
269 |
+
<wsdl:operation name="cancelSubmissionWithComment">
|
270 |
+
<soap:operation soapAction="urn:cancelSubmissionWithComment"
|
271 |
+
style="document" />
|
272 |
+
<wsdl:input>
|
273 |
+
<soap:body use="literal" />
|
274 |
+
</wsdl:input>
|
275 |
+
<wsdl:output>
|
276 |
+
<soap:body use="literal" />
|
277 |
+
</wsdl:output>
|
278 |
+
</wsdl:operation>
|
279 |
+
<wsdl:operation name="findByTicket">
|
280 |
+
<soap:operation soapAction="urn:findByTicket" style="document" />
|
281 |
+
<wsdl:input>
|
282 |
+
<soap:body use="literal" />
|
283 |
+
</wsdl:input>
|
284 |
+
<wsdl:output>
|
285 |
+
<soap:body use="literal" />
|
286 |
+
</wsdl:output>
|
287 |
+
</wsdl:operation>
|
288 |
+
<wsdl:operation name="search">
|
289 |
+
<soap:operation soapAction="urn:search" style="document" />
|
290 |
+
<wsdl:input>
|
291 |
+
<soap:body use="literal" />
|
292 |
+
</wsdl:input>
|
293 |
+
<wsdl:output>
|
294 |
+
<soap:body use="literal" />
|
295 |
+
</wsdl:output>
|
296 |
+
</wsdl:operation>
|
297 |
+
<wsdl:operation name="searchSubmissions">
|
298 |
+
<soap:operation soapAction="urn:searchSubmissions"
|
299 |
+
style="document" />
|
300 |
+
<wsdl:input>
|
301 |
+
<soap:body use="literal" />
|
302 |
+
</wsdl:input>
|
303 |
+
<wsdl:output>
|
304 |
+
<soap:body use="literal" />
|
305 |
+
</wsdl:output>
|
306 |
+
</wsdl:operation>
|
307 |
+
|
308 |
+
<wsdl:operation name="startSingleBatchSubmission">
|
309 |
+
<soap:operation soapAction="urn:startSingleBatchSubmission"
|
310 |
+
style="document" />
|
311 |
+
<wsdl:input>
|
312 |
+
<soap:body use="literal" />
|
313 |
+
</wsdl:input>
|
314 |
+
<wsdl:output>
|
315 |
+
<soap:body use="literal" />
|
316 |
+
</wsdl:output>
|
317 |
+
</wsdl:operation>
|
318 |
+
|
319 |
+
<wsdl:operation name="startSubmission">
|
320 |
+
<soap:operation soapAction="urn:startSubmission"
|
321 |
+
style="document" />
|
322 |
+
<wsdl:input>
|
323 |
+
<soap:body use="literal" />
|
324 |
+
</wsdl:input>
|
325 |
+
<wsdl:output>
|
326 |
+
<soap:body use="literal" />
|
327 |
+
</wsdl:output>
|
328 |
+
</wsdl:operation>
|
329 |
+
<wsdl:operation name="uploadReference">
|
330 |
+
<soap:operation soapAction="urn:uploadReference"
|
331 |
+
style="document" />
|
332 |
+
<wsdl:input>
|
333 |
+
<soap:body use="literal" />
|
334 |
+
</wsdl:input>
|
335 |
+
<wsdl:output>
|
336 |
+
<soap:body use="literal" />
|
337 |
+
</wsdl:output>
|
338 |
+
</wsdl:operation>
|
339 |
+
</wsdl:binding>
|
340 |
+
<wsdl:binding name="SubmissionService2Soap12Binding" type="ns:SubmissionService2PortType">
|
341 |
+
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
|
342 |
+
style="document" />
|
343 |
+
<wsdl:operation name="cancelSubmission">
|
344 |
+
<soap12:operation soapAction="urn:cancelSubmission"
|
345 |
+
style="document" />
|
346 |
+
<wsdl:input>
|
347 |
+
<soap12:body use="literal" />
|
348 |
+
</wsdl:input>
|
349 |
+
<wsdl:output>
|
350 |
+
<soap12:body use="literal" />
|
351 |
+
</wsdl:output>
|
352 |
+
</wsdl:operation>
|
353 |
+
<wsdl:operation name="cancelSubmissionWithComment">
|
354 |
+
<soap12:operation soapAction="urn:cancelSubmissionWithComment"
|
355 |
+
style="document" />
|
356 |
+
<wsdl:input>
|
357 |
+
<soap12:body use="literal" />
|
358 |
+
</wsdl:input>
|
359 |
+
<wsdl:output>
|
360 |
+
<soap12:body use="literal" />
|
361 |
+
</wsdl:output>
|
362 |
+
</wsdl:operation>
|
363 |
+
<wsdl:operation name="findByTicket">
|
364 |
+
<soap12:operation soapAction="urn:findByTicket"
|
365 |
+
style="document" />
|
366 |
+
<wsdl:input>
|
367 |
+
<soap12:body use="literal" />
|
368 |
+
</wsdl:input>
|
369 |
+
<wsdl:output>
|
370 |
+
<soap12:body use="literal" />
|
371 |
+
</wsdl:output>
|
372 |
+
</wsdl:operation>
|
373 |
+
<wsdl:operation name="search">
|
374 |
+
<soap12:operation soapAction="urn:search" style="document" />
|
375 |
+
<wsdl:input>
|
376 |
+
<soap12:body use="literal" />
|
377 |
+
</wsdl:input>
|
378 |
+
<wsdl:output>
|
379 |
+
<soap12:body use="literal" />
|
380 |
+
</wsdl:output>
|
381 |
+
</wsdl:operation>
|
382 |
+
<wsdl:operation name="searchSubmissions">
|
383 |
+
<soap12:operation soapAction="urn:searchSubmissions"
|
384 |
+
style="document" />
|
385 |
+
<wsdl:input>
|
386 |
+
<soap12:body use="literal" />
|
387 |
+
</wsdl:input>
|
388 |
+
<wsdl:output>
|
389 |
+
<soap12:body use="literal" />
|
390 |
+
</wsdl:output>
|
391 |
+
</wsdl:operation>
|
392 |
+
|
393 |
+
<wsdl:operation name="startSingleBatchSubmission">
|
394 |
+
<soap12:operation soapAction="urn:startSingleBatchSubmission"
|
395 |
+
style="document" />
|
396 |
+
<wsdl:input>
|
397 |
+
<soap12:body use="literal" />
|
398 |
+
</wsdl:input>
|
399 |
+
<wsdl:output>
|
400 |
+
<soap12:body use="literal" />
|
401 |
+
</wsdl:output>
|
402 |
+
</wsdl:operation>
|
403 |
+
|
404 |
+
<wsdl:operation name="startSubmission">
|
405 |
+
<soap12:operation soapAction="urn:startSubmission"
|
406 |
+
style="document" />
|
407 |
+
<wsdl:input>
|
408 |
+
<soap12:body use="literal" />
|
409 |
+
</wsdl:input>
|
410 |
+
<wsdl:output>
|
411 |
+
<soap12:body use="literal" />
|
412 |
+
</wsdl:output>
|
413 |
+
</wsdl:operation>
|
414 |
+
<wsdl:operation name="uploadReference">
|
415 |
+
<soap12:operation soapAction="urn:uploadReference"
|
416 |
+
style="document" />
|
417 |
+
<wsdl:input>
|
418 |
+
<soap12:body use="literal" />
|
419 |
+
</wsdl:input>
|
420 |
+
<wsdl:output>
|
421 |
+
<soap12:body use="literal" />
|
422 |
+
</wsdl:output>
|
423 |
+
</wsdl:operation>
|
424 |
+
</wsdl:binding>
|
425 |
+
<wsdl:binding name="SubmissionService2HttpBinding" type="ns:SubmissionService2PortType">
|
426 |
+
<http:binding verb="POST" />
|
427 |
+
<wsdl:operation name="cancelSubmission">
|
428 |
+
<http:operation location="SubmissionService2/cancelSubmission" />
|
429 |
+
<wsdl:input>
|
430 |
+
<mime:content type="text/xml" part="cancelSubmission" />
|
431 |
+
</wsdl:input>
|
432 |
+
<wsdl:output>
|
433 |
+
<mime:content type="text/xml" part="cancelSubmission" />
|
434 |
+
</wsdl:output>
|
435 |
+
</wsdl:operation>
|
436 |
+
<wsdl:operation name="cancelSubmissionWithComment">
|
437 |
+
<http:operation location="SubmissionService2/cancelSubmissionWithComment" />
|
438 |
+
<wsdl:input>
|
439 |
+
<mime:content type="text/xml" part="cancelSubmissionWithComment" />
|
440 |
+
</wsdl:input>
|
441 |
+
<wsdl:output>
|
442 |
+
<mime:content type="text/xml" part="cancelSubmissionWithComment" />
|
443 |
+
</wsdl:output>
|
444 |
+
</wsdl:operation>
|
445 |
+
<wsdl:operation name="findByTicket">
|
446 |
+
<http:operation location="SubmissionService2/findByTicket" />
|
447 |
+
<wsdl:input>
|
448 |
+
<mime:content type="text/xml" part="findByTicket" />
|
449 |
+
</wsdl:input>
|
450 |
+
<wsdl:output>
|
451 |
+
<mime:content type="text/xml" part="findByTicket" />
|
452 |
+
</wsdl:output>
|
453 |
+
</wsdl:operation>
|
454 |
+
<wsdl:operation name="search">
|
455 |
+
<http:operation location="SubmissionService2/search" />
|
456 |
+
<wsdl:input>
|
457 |
+
<mime:content type="text/xml" part="search" />
|
458 |
+
</wsdl:input>
|
459 |
+
<wsdl:output>
|
460 |
+
<mime:content type="text/xml" part="search" />
|
461 |
+
</wsdl:output>
|
462 |
+
</wsdl:operation>
|
463 |
+
<wsdl:operation name="searchSubmissions">
|
464 |
+
<http:operation location="SubmissionService/searchSubmissions" />
|
465 |
+
<wsdl:input>
|
466 |
+
<mime:content type="text/xml" part="searchSubmissions" />
|
467 |
+
</wsdl:input>
|
468 |
+
<wsdl:output>
|
469 |
+
<mime:content type="text/xml" part="searchSubmissions" />
|
470 |
+
</wsdl:output>
|
471 |
+
</wsdl:operation>
|
472 |
+
|
473 |
+
<wsdl:operation name="startSingleBatchSubmission">
|
474 |
+
<http:operation location="SubmissionService/startSingleBatchSubmission" />
|
475 |
+
<wsdl:input>
|
476 |
+
<mime:content type="text/xml" part="startSingleBatchSubmission" />
|
477 |
+
</wsdl:input>
|
478 |
+
<wsdl:output>
|
479 |
+
<mime:content type="text/xml" part="startSingleBatchSubmission" />
|
480 |
+
</wsdl:output>
|
481 |
+
</wsdl:operation>
|
482 |
+
|
483 |
+
<wsdl:operation name="startSubmission">
|
484 |
+
<http:operation location="SubmissionService2/startSubmission" />
|
485 |
+
<wsdl:input>
|
486 |
+
<mime:content type="text/xml" part="startSubmission" />
|
487 |
+
</wsdl:input>
|
488 |
+
<wsdl:output>
|
489 |
+
<mime:content type="text/xml" part="startSubmission" />
|
490 |
+
</wsdl:output>
|
491 |
+
</wsdl:operation>
|
492 |
+
<wsdl:operation name="uploadReference">
|
493 |
+
<http:operation location="SubmissionService/uploadReference" />
|
494 |
+
<wsdl:input>
|
495 |
+
<mime:content type="text/xml" part="startSubmission" />
|
496 |
+
</wsdl:input>
|
497 |
+
<wsdl:output>
|
498 |
+
<mime:content type="text/xml" part="startSubmission" />
|
499 |
+
</wsdl:output>
|
500 |
+
</wsdl:operation>
|
501 |
+
</wsdl:binding>
|
502 |
+
<wsdl:service name="SubmissionService2">
|
503 |
+
<wsdl:port name="SubmissionService2HttpSoap11Endpoint"
|
504 |
+
binding="ns:SubmissionService2Soap11Binding">
|
505 |
+
<soap:address
|
506 |
+
location="http://localhost/services/SubmissionService2.SubmissionService2HttpSoap11Endpoint" />
|
507 |
+
</wsdl:port>
|
508 |
+
<wsdl:port name="SubmissionService2HttpSoap12Endpoint"
|
509 |
+
binding="ns:SubmissionService2Soap12Binding">
|
510 |
+
<soap12:address
|
511 |
+
location="http://localhost/services/SubmissionService2.SubmissionService2HttpSoap12Endpoint" />
|
512 |
+
</wsdl:port>
|
513 |
+
<wsdl:port name="SubmissionService2HttpEndpoint" binding="ns:SubmissionService2HttpBinding">
|
514 |
+
<http:address
|
515 |
+
location="http://localhost/services/SubmissionService2.SubmissionService2HttpEndpoint" />
|
516 |
+
</wsdl:port>
|
517 |
+
</wsdl:service>
|
518 |
+
</wsdl:definitions>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/TargetService2.wsdl
ADDED
@@ -0,0 +1,733 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
3 |
+
xmlns:ns="http://impl.services2.service.ws.projectdirector.gs4tr.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
|
4 |
+
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
5 |
+
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
6 |
+
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
|
7 |
+
xmlns:ax241="http://dto.model.projectdirector.gs4tr.org/xsd"
|
8 |
+
targetNamespace="http://impl.services2.service.ws.projectdirector.gs4tr.org">
|
9 |
+
<wsdl:documentation>TargetService2</wsdl:documentation>
|
10 |
+
<wsdl:types>
|
11 |
+
<xs:schema xmlns:ax242="http://dto.model.projectdirector.gs4tr.org/xsd"
|
12 |
+
attributeFormDefault="qualified" elementFormDefault="qualified"
|
13 |
+
targetNamespace="http://impl.services2.service.ws.projectdirector.gs4tr.org">
|
14 |
+
<xs:import namespace="http://dto.model.projectdirector.gs4tr.org/xsd" schemaLocation="types.xsd" />
|
15 |
+
<xs:element name="cancelTargetByDocumentId">
|
16 |
+
<xs:complexType>
|
17 |
+
<xs:sequence>
|
18 |
+
<xs:element name="documentId" nillable="false"
|
19 |
+
type="ax241:DocumentTicket" />
|
20 |
+
<xs:element name="targetLocale" nillable="false" type="xs:string" />
|
21 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
22 |
+
</xs:sequence>
|
23 |
+
</xs:complexType>
|
24 |
+
</xs:element>
|
25 |
+
<xs:element name="cancelTargetByDocumentIdResponse">
|
26 |
+
<xs:complexType>
|
27 |
+
<xs:sequence>
|
28 |
+
<xs:element name="return" nillable="true" type="xs:string" />
|
29 |
+
</xs:sequence>
|
30 |
+
</xs:complexType>
|
31 |
+
</xs:element>
|
32 |
+
<xs:element name="cancelTarget">
|
33 |
+
<xs:complexType>
|
34 |
+
<xs:sequence>
|
35 |
+
<xs:element name="targetId" nillable="false" type="xs:string" />
|
36 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
37 |
+
</xs:sequence>
|
38 |
+
</xs:complexType>
|
39 |
+
</xs:element>
|
40 |
+
<xs:element name="cancelTargetResponse">
|
41 |
+
<xs:complexType>
|
42 |
+
<xs:sequence>
|
43 |
+
<xs:element name="return" nillable="true" type="xs:string" />
|
44 |
+
</xs:sequence>
|
45 |
+
</xs:complexType>
|
46 |
+
</xs:element>
|
47 |
+
<xs:element name="downloadTargetResource">
|
48 |
+
<xs:complexType>
|
49 |
+
<xs:sequence>
|
50 |
+
<xs:element name="targetId" nillable="false" type="xs:string" />
|
51 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
52 |
+
</xs:sequence>
|
53 |
+
</xs:complexType>
|
54 |
+
</xs:element>
|
55 |
+
<xs:element name="downloadTargetResourceResponse">
|
56 |
+
<xs:complexType>
|
57 |
+
<xs:sequence>
|
58 |
+
<xs:element name="return" nillable="true"
|
59 |
+
type="ax241:RepositoryItem" />
|
60 |
+
</xs:sequence>
|
61 |
+
</xs:complexType>
|
62 |
+
</xs:element>
|
63 |
+
<xs:element name="findByTicket">
|
64 |
+
<xs:complexType>
|
65 |
+
<xs:sequence>
|
66 |
+
<xs:element name="ticket" nillable="false" type="xs:string" />
|
67 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
68 |
+
</xs:sequence>
|
69 |
+
</xs:complexType>
|
70 |
+
</xs:element>
|
71 |
+
<xs:element name="findByTicketResponse">
|
72 |
+
<xs:complexType>
|
73 |
+
<xs:sequence>
|
74 |
+
<xs:element name="return" nillable="true" type="ax241:Target" />
|
75 |
+
</xs:sequence>
|
76 |
+
</xs:complexType>
|
77 |
+
</xs:element>
|
78 |
+
<xs:element name="getCompletedTargetsByDocuments">
|
79 |
+
<xs:complexType>
|
80 |
+
<xs:sequence>
|
81 |
+
<xs:element maxOccurs="unbounded" name="documentTickets"
|
82 |
+
nillable="false" type="xs:string" />
|
83 |
+
<xs:element name="maxResults" type="xs:int" />
|
84 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
85 |
+
</xs:sequence>
|
86 |
+
</xs:complexType>
|
87 |
+
</xs:element>
|
88 |
+
<xs:element name="getCompletedTargetsByDocumentsResponse">
|
89 |
+
<xs:complexType>
|
90 |
+
<xs:sequence>
|
91 |
+
<xs:element maxOccurs="unbounded" name="return"
|
92 |
+
nillable="true" type="ax241:Target" />
|
93 |
+
</xs:sequence>
|
94 |
+
</xs:complexType>
|
95 |
+
</xs:element>
|
96 |
+
<xs:element name="getCompletedTargetsByProjects">
|
97 |
+
<xs:complexType>
|
98 |
+
<xs:sequence>
|
99 |
+
<xs:element maxOccurs="unbounded" name="projectTickets"
|
100 |
+
nillable="false" type="xs:string" />
|
101 |
+
<xs:element name="maxResults" type="xs:int" />
|
102 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
103 |
+
</xs:sequence>
|
104 |
+
</xs:complexType>
|
105 |
+
</xs:element>
|
106 |
+
<xs:element name="getCompletedTargetsByProjectsResponse">
|
107 |
+
<xs:complexType>
|
108 |
+
<xs:sequence>
|
109 |
+
<xs:element maxOccurs="unbounded" name="return"
|
110 |
+
nillable="true" type="ax241:Target" />
|
111 |
+
</xs:sequence>
|
112 |
+
</xs:complexType>
|
113 |
+
</xs:element>
|
114 |
+
<xs:element name="getCompletedTargetsBySubmissions">
|
115 |
+
<xs:complexType>
|
116 |
+
<xs:sequence>
|
117 |
+
<xs:element maxOccurs="unbounded" name="submissionTickets"
|
118 |
+
nillable="false" type="xs:string" />
|
119 |
+
<xs:element name="maxResults" type="xs:int" />
|
120 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
121 |
+
</xs:sequence>
|
122 |
+
</xs:complexType>
|
123 |
+
</xs:element>
|
124 |
+
<xs:element name="getCompletedTargetsBySubmissionsResponse">
|
125 |
+
<xs:complexType>
|
126 |
+
<xs:sequence>
|
127 |
+
<xs:element maxOccurs="unbounded" name="return"
|
128 |
+
nillable="true" type="ax241:Target" />
|
129 |
+
</xs:sequence>
|
130 |
+
</xs:complexType>
|
131 |
+
</xs:element>
|
132 |
+
<xs:element name="search">
|
133 |
+
<xs:complexType>
|
134 |
+
<xs:sequence>
|
135 |
+
<xs:element name="command" nillable="false"
|
136 |
+
type="ax241:TargetSearchRequest" />
|
137 |
+
<xs:element name="info" nillable="false" type="ax241:PagedListInfo" />
|
138 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
139 |
+
</xs:sequence>
|
140 |
+
</xs:complexType>
|
141 |
+
</xs:element>
|
142 |
+
<xs:element name="searchResponse">
|
143 |
+
<xs:complexType>
|
144 |
+
<xs:sequence>
|
145 |
+
<xs:element name="return" nillable="true"
|
146 |
+
type="ax241:TargetPagedList" />
|
147 |
+
</xs:sequence>
|
148 |
+
</xs:complexType>
|
149 |
+
</xs:element>
|
150 |
+
<xs:element name="sendDownloadConfirmation">
|
151 |
+
<xs:complexType>
|
152 |
+
<xs:sequence>
|
153 |
+
<xs:element name="targetId" nillable="false" type="xs:string" />
|
154 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
155 |
+
</xs:sequence>
|
156 |
+
</xs:complexType>
|
157 |
+
</xs:element>
|
158 |
+
<xs:element name="sendDownloadConfirmationResponse">
|
159 |
+
<xs:complexType>
|
160 |
+
<xs:sequence>
|
161 |
+
<xs:element name="return" nillable="true" type="xs:string" />
|
162 |
+
</xs:sequence>
|
163 |
+
</xs:complexType>
|
164 |
+
</xs:element>
|
165 |
+
<xs:element name="getCanceledTargetsByDocuments">
|
166 |
+
<xs:complexType>
|
167 |
+
<xs:sequence>
|
168 |
+
<xs:element maxOccurs="unbounded" name="documentTickets"
|
169 |
+
nillable="false" type="xs:string" />
|
170 |
+
<xs:element name="maxResults" type="xs:int" />
|
171 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
172 |
+
</xs:sequence>
|
173 |
+
</xs:complexType>
|
174 |
+
</xs:element>
|
175 |
+
<xs:element name="getCanceledTargetsByDocumentsResponse">
|
176 |
+
<xs:complexType>
|
177 |
+
<xs:sequence>
|
178 |
+
<xs:element maxOccurs="unbounded" name="return"
|
179 |
+
nillable="true" type="ax241:Target" />
|
180 |
+
</xs:sequence>
|
181 |
+
</xs:complexType>
|
182 |
+
</xs:element>
|
183 |
+
<xs:element name="getCanceledTargetsByProjects">
|
184 |
+
<xs:complexType>
|
185 |
+
<xs:sequence>
|
186 |
+
<xs:element maxOccurs="unbounded" name="projectTickets"
|
187 |
+
nillable="false" type="xs:string" />
|
188 |
+
<xs:element name="maxResults" type="xs:int" />
|
189 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
190 |
+
</xs:sequence>
|
191 |
+
</xs:complexType>
|
192 |
+
</xs:element>
|
193 |
+
<xs:element name="getCanceledTargetsByProjectsResponse">
|
194 |
+
<xs:complexType>
|
195 |
+
<xs:sequence>
|
196 |
+
<xs:element maxOccurs="unbounded" name="return"
|
197 |
+
nillable="true" type="ax241:Target" />
|
198 |
+
</xs:sequence>
|
199 |
+
</xs:complexType>
|
200 |
+
</xs:element>
|
201 |
+
<xs:element name="getCanceledTargetsBySubmissions">
|
202 |
+
<xs:complexType>
|
203 |
+
<xs:sequence>
|
204 |
+
<xs:element maxOccurs="unbounded" name="submissionTickets"
|
205 |
+
nillable="false" type="xs:string" />
|
206 |
+
<xs:element name="maxResults" type="xs:int" />
|
207 |
+
<xs:element name="userId" nillable="false" type="xs:string" />
|
208 |
+
</xs:sequence>
|
209 |
+
</xs:complexType>
|
210 |
+
</xs:element>
|
211 |
+
<xs:element name="getCanceledTargetsBySubmissionsResponse">
|
212 |
+
<xs:complexType>
|
213 |
+
<xs:sequence>
|
214 |
+
<xs:element maxOccurs="unbounded" name="return"
|
215 |
+
nillable="true" type="ax241:Target" />
|
216 |
+
</xs:sequence>
|
217 |
+
</xs:complexType>
|
218 |
+
</xs:element>
|
219 |
+
</xs:schema>
|
220 |
+
</wsdl:types>
|
221 |
+
<wsdl:message name="findByTicketRequest">
|
222 |
+
<wsdl:part name="parameters" element="ns:findByTicket" />
|
223 |
+
</wsdl:message>
|
224 |
+
<wsdl:message name="findByTicketResponse">
|
225 |
+
<wsdl:part name="parameters" element="ns:findByTicketResponse" />
|
226 |
+
</wsdl:message>
|
227 |
+
<wsdl:message name="cancelTargetRequest">
|
228 |
+
<wsdl:part name="parameters" element="ns:cancelTarget" />
|
229 |
+
</wsdl:message>
|
230 |
+
<wsdl:message name="cancelTargetResponse">
|
231 |
+
<wsdl:part name="parameters" element="ns:cancelTargetResponse" />
|
232 |
+
</wsdl:message>
|
233 |
+
<wsdl:message name="cancelTargetByDocumentIdRequest">
|
234 |
+
<wsdl:part name="parameters" element="ns:cancelTargetByDocumentId" />
|
235 |
+
</wsdl:message>
|
236 |
+
<wsdl:message name="cancelTargetByDocumentIdResponse">
|
237 |
+
<wsdl:part name="parameters" element="ns:cancelTargetByDocumentIdResponse" />
|
238 |
+
</wsdl:message>
|
239 |
+
<wsdl:message name="getCompletedTargetsBySubmissionsRequest">
|
240 |
+
<wsdl:part name="parameters" element="ns:getCompletedTargetsBySubmissions" />
|
241 |
+
</wsdl:message>
|
242 |
+
<wsdl:message name="getCompletedTargetsBySubmissionsResponse">
|
243 |
+
<wsdl:part name="parameters"
|
244 |
+
element="ns:getCompletedTargetsBySubmissionsResponse" />
|
245 |
+
</wsdl:message>
|
246 |
+
<wsdl:message name="getCompletedTargetsByProjectsRequest">
|
247 |
+
<wsdl:part name="parameters" element="ns:getCompletedTargetsByProjects" />
|
248 |
+
</wsdl:message>
|
249 |
+
<wsdl:message name="getCompletedTargetsByProjectsResponse">
|
250 |
+
<wsdl:part name="parameters" element="ns:getCompletedTargetsByProjectsResponse" />
|
251 |
+
</wsdl:message>
|
252 |
+
<wsdl:message name="downloadTargetResourceRequest">
|
253 |
+
<wsdl:part name="parameters" element="ns:downloadTargetResource" />
|
254 |
+
</wsdl:message>
|
255 |
+
<wsdl:message name="downloadTargetResourceResponse">
|
256 |
+
<wsdl:part name="parameters" element="ns:downloadTargetResourceResponse" />
|
257 |
+
</wsdl:message>
|
258 |
+
<wsdl:message name="sendDownloadConfirmationRequest">
|
259 |
+
<wsdl:part name="parameters" element="ns:sendDownloadConfirmation" />
|
260 |
+
</wsdl:message>
|
261 |
+
<wsdl:message name="sendDownloadConfirmationResponse">
|
262 |
+
<wsdl:part name="parameters" element="ns:sendDownloadConfirmationResponse" />
|
263 |
+
</wsdl:message>
|
264 |
+
<wsdl:message name="getCompletedTargetsByDocumentsRequest">
|
265 |
+
<wsdl:part name="parameters" element="ns:getCompletedTargetsByDocuments" />
|
266 |
+
</wsdl:message>
|
267 |
+
<wsdl:message name="getCompletedTargetsByDocumentsResponse">
|
268 |
+
<wsdl:part name="parameters" element="ns:getCompletedTargetsByDocumentsResponse" />
|
269 |
+
</wsdl:message>
|
270 |
+
<wsdl:message name="searchRequest">
|
271 |
+
<wsdl:part name="parameters" element="ns:search" />
|
272 |
+
</wsdl:message>
|
273 |
+
<wsdl:message name="searchResponse">
|
274 |
+
<wsdl:part name="parameters" element="ns:searchResponse" />
|
275 |
+
</wsdl:message>
|
276 |
+
<wsdl:message name="getCanceledTargetsByDocumentsRequest">
|
277 |
+
<wsdl:part name="parameters" element="ns:getCanceledTargetsByDocuments" />
|
278 |
+
</wsdl:message>
|
279 |
+
<wsdl:message name="getCanceledTargetsByDocumentsResponse">
|
280 |
+
<wsdl:part name="parameters" element="ns:getCanceledTargetsByDocumentsResponse" />
|
281 |
+
</wsdl:message>
|
282 |
+
<wsdl:message name="getCanceledTargetsByProjectsRequest">
|
283 |
+
<wsdl:part name="parameters" element="ns:getCanceledTargetsByProjects" />
|
284 |
+
</wsdl:message>
|
285 |
+
<wsdl:message name="getCanceledTargetsByProjectsResponse">
|
286 |
+
<wsdl:part name="parameters" element="ns:getCanceledTargetsByProjectsResponse" />
|
287 |
+
</wsdl:message>
|
288 |
+
<wsdl:message name="getCanceledTargetsBySubmissionsRequest">
|
289 |
+
<wsdl:part name="parameters" element="ns:getCanceledTargetsBySubmissions" />
|
290 |
+
</wsdl:message>
|
291 |
+
<wsdl:message name="getCanceledTargetsBySubmissionsResponse">
|
292 |
+
<wsdl:part name="parameters" element="ns:getCanceledTargetsBySubmissionsResponse" />
|
293 |
+
</wsdl:message>
|
294 |
+
<wsdl:portType name="TargetService2PortType">
|
295 |
+
<wsdl:operation name="findByTicket">
|
296 |
+
<wsdl:input message="ns:findByTicketRequest" wsaw:Action="urn:findByTicket" />
|
297 |
+
<wsdl:output message="ns:findByTicketResponse"
|
298 |
+
wsaw:Action="urn:findByTicketResponse" />
|
299 |
+
</wsdl:operation>
|
300 |
+
<wsdl:operation name="cancelTarget">
|
301 |
+
<wsdl:input message="ns:cancelTargetRequest" wsaw:Action="urn:cancelTarget" />
|
302 |
+
<wsdl:output message="ns:cancelTargetResponse"
|
303 |
+
wsaw:Action="urn:cancelTargetResponse" />
|
304 |
+
</wsdl:operation>
|
305 |
+
<wsdl:operation name="cancelTargetByDocumentId">
|
306 |
+
<wsdl:input message="ns:cancelTargetByDocumentIdRequest"
|
307 |
+
wsaw:Action="urn:cancelTargetByDocumentId" />
|
308 |
+
<wsdl:output message="ns:cancelTargetByDocumentIdResponse"
|
309 |
+
wsaw:Action="urn:cancelTargetByDocumentIdResponse" />
|
310 |
+
</wsdl:operation>
|
311 |
+
<wsdl:operation name="getCompletedTargetsBySubmissions">
|
312 |
+
<wsdl:input message="ns:getCompletedTargetsBySubmissionsRequest"
|
313 |
+
wsaw:Action="urn:getCompletedTargetsBySubmissions" />
|
314 |
+
<wsdl:output message="ns:getCompletedTargetsBySubmissionsResponse"
|
315 |
+
wsaw:Action="urn:getCompletedTargetsBySubmissionsResponse" />
|
316 |
+
</wsdl:operation>
|
317 |
+
<wsdl:operation name="getCompletedTargetsByProjects">
|
318 |
+
<wsdl:input message="ns:getCompletedTargetsByProjectsRequest"
|
319 |
+
wsaw:Action="urn:getCompletedTargetsByProjects" />
|
320 |
+
<wsdl:output message="ns:getCompletedTargetsByProjectsResponse"
|
321 |
+
wsaw:Action="urn:getCompletedTargetsByProjectsResponse" />
|
322 |
+
</wsdl:operation>
|
323 |
+
<wsdl:operation name="downloadTargetResource">
|
324 |
+
<wsdl:input message="ns:downloadTargetResourceRequest"
|
325 |
+
wsaw:Action="urn:downloadTargetResource" />
|
326 |
+
<wsdl:output message="ns:downloadTargetResourceResponse"
|
327 |
+
wsaw:Action="urn:downloadTargetResourceResponse" />
|
328 |
+
</wsdl:operation>
|
329 |
+
<wsdl:operation name="sendDownloadConfirmation">
|
330 |
+
<wsdl:input message="ns:sendDownloadConfirmationRequest"
|
331 |
+
wsaw:Action="urn:sendDownloadConfirmation" />
|
332 |
+
<wsdl:output message="ns:sendDownloadConfirmationResponse"
|
333 |
+
wsaw:Action="urn:sendDownloadConfirmationResponse" />
|
334 |
+
</wsdl:operation>
|
335 |
+
<wsdl:operation name="getCompletedTargetsByDocuments">
|
336 |
+
<wsdl:input message="ns:getCompletedTargetsByDocumentsRequest"
|
337 |
+
wsaw:Action="urn:getCompletedTargetsByDocuments" />
|
338 |
+
<wsdl:output message="ns:getCompletedTargetsByDocumentsResponse"
|
339 |
+
wsaw:Action="urn:getCompletedTargetsByDocumentsResponse" />
|
340 |
+
</wsdl:operation>
|
341 |
+
<wsdl:operation name="search">
|
342 |
+
<wsdl:input message="ns:searchRequest" wsaw:Action="urn:search" />
|
343 |
+
<wsdl:output message="ns:searchResponse" wsaw:Action="urn:searchResponse" />
|
344 |
+
</wsdl:operation>
|
345 |
+
<wsdl:operation name="getCanceledTargetsByDocuments">
|
346 |
+
<wsdl:input message="ns:getCanceledTargetsByDocumentsRequest"
|
347 |
+
wsaw:Action="urn:getCanceledTargetsByDocuments" />
|
348 |
+
<wsdl:output message="ns:getCanceledTargetsByDocumentsResponse"
|
349 |
+
wsaw:Action="urn:getCanceledTargetsByDocumentsResponse" />
|
350 |
+
</wsdl:operation>
|
351 |
+
<wsdl:operation name="getCanceledTargetsByProjects">
|
352 |
+
<wsdl:input message="ns:getCanceledTargetsByProjectsRequest"
|
353 |
+
wsaw:Action="urn:getCanceledTargetsByProjects" />
|
354 |
+
<wsdl:output message="ns:getCanceledTargetsByProjectsResponse"
|
355 |
+
wsaw:Action="urn:getCanceledTargetsByProjectsResponse" />
|
356 |
+
</wsdl:operation>
|
357 |
+
<wsdl:operation name="getCanceledTargetsBySubmissions">
|
358 |
+
<wsdl:input message="ns:getCanceledTargetsBySubmissionsRequest"
|
359 |
+
wsaw:Action="urn:getCanceledTargetsBySubmissions" />
|
360 |
+
<wsdl:output message="ns:getCanceledTargetsBySubmissionsResponse"
|
361 |
+
wsaw:Action="urn:getCanceledTargetsBySubmissionsResponse" />
|
362 |
+
</wsdl:operation>
|
363 |
+
</wsdl:portType>
|
364 |
+
<wsdl:binding name="TargetService2Soap11Binding" type="ns:TargetService2PortType">
|
365 |
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
366 |
+
style="document" />
|
367 |
+
<wsdl:operation name="findByTicket">
|
368 |
+
<soap:operation soapAction="urn:findByTicket" style="document" />
|
369 |
+
<wsdl:input>
|
370 |
+
<soap:body use="literal" />
|
371 |
+
</wsdl:input>
|
372 |
+
<wsdl:output>
|
373 |
+
<soap:body use="literal" />
|
374 |
+
</wsdl:output>
|
375 |
+
</wsdl:operation>
|
376 |
+
<wsdl:operation name="cancelTarget">
|
377 |
+
<soap:operation soapAction="urn:cancelTarget" style="document" />
|
378 |
+
<wsdl:input>
|
379 |
+
<soap:body use="literal" />
|
380 |
+
</wsdl:input>
|
381 |
+
<wsdl:output>
|
382 |
+
<soap:body use="literal" />
|
383 |
+
</wsdl:output>
|
384 |
+
</wsdl:operation>
|
385 |
+
<wsdl:operation name="cancelTargetByDocumentId">
|
386 |
+
<soap:operation soapAction="urn:cancelTargetByDocumentId"
|
387 |
+
style="document" />
|
388 |
+
<wsdl:input>
|
389 |
+
<soap:body use="literal" />
|
390 |
+
</wsdl:input>
|
391 |
+
<wsdl:output>
|
392 |
+
<soap:body use="literal" />
|
393 |
+
</wsdl:output>
|
394 |
+
</wsdl:operation>
|
395 |
+
<wsdl:operation name="getCompletedTargetsBySubmissions">
|
396 |
+
<soap:operation soapAction="urn:getCompletedTargetsBySubmissions"
|
397 |
+
style="document" />
|
398 |
+
<wsdl:input>
|
399 |
+
<soap:body use="literal" />
|
400 |
+
</wsdl:input>
|
401 |
+
<wsdl:output>
|
402 |
+
<soap:body use="literal" />
|
403 |
+
</wsdl:output>
|
404 |
+
</wsdl:operation>
|
405 |
+
<wsdl:operation name="getCompletedTargetsByProjects">
|
406 |
+
<soap:operation soapAction="urn:getCompletedTargetsByProjects"
|
407 |
+
style="document" />
|
408 |
+
<wsdl:input>
|
409 |
+
<soap:body use="literal" />
|
410 |
+
</wsdl:input>
|
411 |
+
<wsdl:output>
|
412 |
+
<soap:body use="literal" />
|
413 |
+
</wsdl:output>
|
414 |
+
</wsdl:operation>
|
415 |
+
<wsdl:operation name="downloadTargetResource">
|
416 |
+
<soap:operation soapAction="urn:downloadTargetResource"
|
417 |
+
style="document" />
|
418 |
+
<wsdl:input>
|
419 |
+
<soap:body use="literal" />
|
420 |
+
</wsdl:input>
|
421 |
+
<wsdl:output>
|
422 |
+
<soap:body use="literal" />
|
423 |
+
</wsdl:output>
|
424 |
+
</wsdl:operation>
|
425 |
+
<wsdl:operation name="sendDownloadConfirmation">
|
426 |
+
<soap:operation soapAction="urn:sendDownloadConfirmation"
|
427 |
+
style="document" />
|
428 |
+
<wsdl:input>
|
429 |
+
<soap:body use="literal" />
|
430 |
+
</wsdl:input>
|
431 |
+
<wsdl:output>
|
432 |
+
<soap:body use="literal" />
|
433 |
+
</wsdl:output>
|
434 |
+
</wsdl:operation>
|
435 |
+
<wsdl:operation name="getCompletedTargetsByDocuments">
|
436 |
+
<soap:operation soapAction="urn:getCompletedTargetsByDocuments"
|
437 |
+
style="document" />
|
438 |
+
<wsdl:input>
|
439 |
+
<soap:body use="literal" />
|
440 |
+
</wsdl:input>
|
441 |
+
<wsdl:output>
|
442 |
+
<soap:body use="literal" />
|
443 |
+
</wsdl:output>
|
444 |
+
</wsdl:operation>
|
445 |
+
<wsdl:operation name="search">
|
446 |
+
<soap:operation soapAction="urn:search" style="document" />
|
447 |
+
<wsdl:input>
|
448 |
+
<soap:body use="literal" />
|
449 |
+
</wsdl:input>
|
450 |
+
<wsdl:output>
|
451 |
+
<soap:body use="literal" />
|
452 |
+
</wsdl:output>
|
453 |
+
</wsdl:operation>
|
454 |
+
<wsdl:operation name="getCanceledTargetsByDocuments">
|
455 |
+
<soap:operation soapAction="urn:getCanceledTargetsByDocuments"
|
456 |
+
style="document" />
|
457 |
+
<wsdl:input>
|
458 |
+
<soap:body use="literal" />
|
459 |
+
</wsdl:input>
|
460 |
+
<wsdl:output>
|
461 |
+
<soap:body use="literal" />
|
462 |
+
</wsdl:output>
|
463 |
+
</wsdl:operation>
|
464 |
+
<wsdl:operation name="getCanceledTargetsByProjects">
|
465 |
+
<soap:operation soapAction="urn:getCanceledTargetsByProjects"
|
466 |
+
style="document" />
|
467 |
+
<wsdl:input>
|
468 |
+
<soap:body use="literal" />
|
469 |
+
</wsdl:input>
|
470 |
+
<wsdl:output>
|
471 |
+
<soap:body use="literal" />
|
472 |
+
</wsdl:output>
|
473 |
+
</wsdl:operation>
|
474 |
+
<wsdl:operation name="getCanceledTargetsBySubmissions">
|
475 |
+
<soap:operation soapAction="urn:getCanceledTargetsBySubmissions"
|
476 |
+
style="document" />
|
477 |
+
<wsdl:input>
|
478 |
+
<soap:body use="literal" />
|
479 |
+
</wsdl:input>
|
480 |
+
<wsdl:output>
|
481 |
+
<soap:body use="literal" />
|
482 |
+
</wsdl:output>
|
483 |
+
</wsdl:operation>
|
484 |
+
</wsdl:binding>
|
485 |
+
<wsdl:binding name="TargetService2Soap12Binding" type="ns:TargetService2PortType">
|
486 |
+
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
|
487 |
+
style="document" />
|
488 |
+
<wsdl:operation name="findByTicket">
|
489 |
+
<soap12:operation soapAction="urn:findByTicket"
|
490 |
+
style="document" />
|
491 |
+
<wsdl:input>
|
492 |
+
<soap12:body use="literal" />
|
493 |
+
</wsdl:input>
|
494 |
+
<wsdl:output>
|
495 |
+
<soap12:body use="literal" />
|
496 |
+
</wsdl:output>
|
497 |
+
</wsdl:operation>
|
498 |
+
<wsdl:operation name="cancelTarget">
|
499 |
+
<soap12:operation soapAction="urn:cancelTarget"
|
500 |
+
style="document" />
|
501 |
+
<wsdl:input>
|
502 |
+
<soap12:body use="literal" />
|
503 |
+
</wsdl:input>
|
504 |
+
<wsdl:output>
|
505 |
+
<soap12:body use="literal" />
|
506 |
+
</wsdl:output>
|
507 |
+
</wsdl:operation>
|
508 |
+
<wsdl:operation name="cancelTargetByDocumentId">
|
509 |
+
<soap12:operation soapAction="urn:cancelTargetByDocumentId"
|
510 |
+
style="document" />
|
511 |
+
<wsdl:input>
|
512 |
+
<soap12:body use="literal" />
|
513 |
+
</wsdl:input>
|
514 |
+
<wsdl:output>
|
515 |
+
<soap12:body use="literal" />
|
516 |
+
</wsdl:output>
|
517 |
+
</wsdl:operation>
|
518 |
+
<wsdl:operation name="getCompletedTargetsBySubmissions">
|
519 |
+
<soap12:operation soapAction="urn:getCompletedTargetsBySubmissions"
|
520 |
+
style="document" />
|
521 |
+
<wsdl:input>
|
522 |
+
<soap12:body use="literal" />
|
523 |
+
</wsdl:input>
|
524 |
+
<wsdl:output>
|
525 |
+
<soap12:body use="literal" />
|
526 |
+
</wsdl:output>
|
527 |
+
</wsdl:operation>
|
528 |
+
<wsdl:operation name="getCompletedTargetsByProjects">
|
529 |
+
<soap12:operation soapAction="urn:getCompletedTargetsByProjects"
|
530 |
+
style="document" />
|
531 |
+
<wsdl:input>
|
532 |
+
<soap12:body use="literal" />
|
533 |
+
</wsdl:input>
|
534 |
+
<wsdl:output>
|
535 |
+
<soap12:body use="literal" />
|
536 |
+
</wsdl:output>
|
537 |
+
</wsdl:operation>
|
538 |
+
<wsdl:operation name="downloadTargetResource">
|
539 |
+
<soap12:operation soapAction="urn:downloadTargetResource"
|
540 |
+
style="document" />
|
541 |
+
<wsdl:input>
|
542 |
+
<soap12:body use="literal" />
|
543 |
+
</wsdl:input>
|
544 |
+
<wsdl:output>
|
545 |
+
<soap12:body use="literal" />
|
546 |
+
</wsdl:output>
|
547 |
+
</wsdl:operation>
|
548 |
+
<wsdl:operation name="sendDownloadConfirmation">
|
549 |
+
<soap12:operation soapAction="urn:sendDownloadConfirmation"
|
550 |
+
style="document" />
|
551 |
+
<wsdl:input>
|
552 |
+
<soap12:body use="literal" />
|
553 |
+
</wsdl:input>
|
554 |
+
<wsdl:output>
|
555 |
+
<soap12:body use="literal" />
|
556 |
+
</wsdl:output>
|
557 |
+
</wsdl:operation>
|
558 |
+
<wsdl:operation name="getCompletedTargetsByDocuments">
|
559 |
+
<soap12:operation soapAction="urn:getCompletedTargetsByDocuments"
|
560 |
+
style="document" />
|
561 |
+
<wsdl:input>
|
562 |
+
<soap12:body use="literal" />
|
563 |
+
</wsdl:input>
|
564 |
+
<wsdl:output>
|
565 |
+
<soap12:body use="literal" />
|
566 |
+
</wsdl:output>
|
567 |
+
</wsdl:operation>
|
568 |
+
<wsdl:operation name="search">
|
569 |
+
<soap12:operation soapAction="urn:search" style="document" />
|
570 |
+
<wsdl:input>
|
571 |
+
<soap12:body use="literal" />
|
572 |
+
</wsdl:input>
|
573 |
+
<wsdl:output>
|
574 |
+
<soap12:body use="literal" />
|
575 |
+
</wsdl:output>
|
576 |
+
</wsdl:operation>
|
577 |
+
<wsdl:operation name="getCanceledTargetsByDocuments">
|
578 |
+
<soap12:operation soapAction="urn:getCanceledTargetsByDocuments"
|
579 |
+
style="document" />
|
580 |
+
<wsdl:input>
|
581 |
+
<soap12:body use="literal" />
|
582 |
+
</wsdl:input>
|
583 |
+
<wsdl:output>
|
584 |
+
<soap12:body use="literal" />
|
585 |
+
</wsdl:output>
|
586 |
+
</wsdl:operation>
|
587 |
+
<wsdl:operation name="getCanceledTargetsByProjects">
|
588 |
+
<soap12:operation soapAction="urn:getCanceledTargetsByProjects"
|
589 |
+
style="document" />
|
590 |
+
<wsdl:input>
|
591 |
+
<soap12:body use="literal" />
|
592 |
+
</wsdl:input>
|
593 |
+
<wsdl:output>
|
594 |
+
<soap12:body use="literal" />
|
595 |
+
</wsdl:output>
|
596 |
+
</wsdl:operation>
|
597 |
+
<wsdl:operation name="getCanceledTargetsBySubmissions">
|
598 |
+
<soap12:operation soapAction="urn:getCanceledTargetsBySubmissions"
|
599 |
+
style="document" />
|
600 |
+
<wsdl:input>
|
601 |
+
<soap12:body use="literal" />
|
602 |
+
</wsdl:input>
|
603 |
+
<wsdl:output>
|
604 |
+
<soap12:body use="literal" />
|
605 |
+
</wsdl:output>
|
606 |
+
</wsdl:operation>
|
607 |
+
</wsdl:binding>
|
608 |
+
<wsdl:binding name="TargetService2HttpBinding" type="ns:TargetService2PortType">
|
609 |
+
<http:binding verb="POST" />
|
610 |
+
<wsdl:operation name="findByTicket">
|
611 |
+
<http:operation location="TargetService2/findByTicket" />
|
612 |
+
<wsdl:input>
|
613 |
+
<mime:content type="text/xml" part="findByTicket" />
|
614 |
+
</wsdl:input>
|
615 |
+
<wsdl:output>
|
616 |
+
<mime:content type="text/xml" part="findByTicket" />
|
617 |
+
</wsdl:output>
|
618 |
+
</wsdl:operation>
|
619 |
+
<wsdl:operation name="cancelTarget">
|
620 |
+
<http:operation location="TargetService2/cancelTarget" />
|
621 |
+
<wsdl:input>
|
622 |
+
<mime:content type="text/xml" part="cancelTarget" />
|
623 |
+
</wsdl:input>
|
624 |
+
<wsdl:output>
|
625 |
+
<mime:content type="text/xml" part="cancelTarget" />
|
626 |
+
</wsdl:output>
|
627 |
+
</wsdl:operation>
|
628 |
+
<wsdl:operation name="cancelTargetByDocumentId">
|
629 |
+
<http:operation location="TargetService2/cancelTargetByDocumentId" />
|
630 |
+
<wsdl:input>
|
631 |
+
<mime:content type="text/xml" part="cancelTargetByDocumentId" />
|
632 |
+
</wsdl:input>
|
633 |
+
<wsdl:output>
|
634 |
+
<mime:content type="text/xml" part="cancelTargetByDocumentId" />
|
635 |
+
</wsdl:output>
|
636 |
+
</wsdl:operation>
|
637 |
+
<wsdl:operation name="getCompletedTargetsBySubmissions">
|
638 |
+
<http:operation location="TargetService2/getCompletedTargetsBySubmissions" />
|
639 |
+
<wsdl:input>
|
640 |
+
<mime:content type="text/xml" part="getCompletedTargetsBySubmissions" />
|
641 |
+
</wsdl:input>
|
642 |
+
<wsdl:output>
|
643 |
+
<mime:content type="text/xml" part="getCompletedTargetsBySubmissions" />
|
644 |
+
</wsdl:output>
|
645 |
+
</wsdl:operation>
|
646 |
+
<wsdl:operation name="getCompletedTargetsByProjects">
|
647 |
+
<http:operation location="TargetService2/getCompletedTargetsByProjects" />
|
648 |
+
<wsdl:input>
|
649 |
+
<mime:content type="text/xml" part="getCompletedTargetsByProjects" />
|
650 |
+
</wsdl:input>
|
651 |
+
<wsdl:output>
|
652 |
+
<mime:content type="text/xml" part="getCompletedTargetsByProjects" />
|
653 |
+
</wsdl:output>
|
654 |
+
</wsdl:operation>
|
655 |
+
<wsdl:operation name="downloadTargetResource">
|
656 |
+
<http:operation location="TargetService2/downloadTargetResource" />
|
657 |
+
<wsdl:input>
|
658 |
+
<mime:content type="text/xml" part="downloadTargetResource" />
|
659 |
+
</wsdl:input>
|
660 |
+
<wsdl:output>
|
661 |
+
<mime:content type="text/xml" part="downloadTargetResource" />
|
662 |
+
</wsdl:output>
|
663 |
+
</wsdl:operation>
|
664 |
+
<wsdl:operation name="sendDownloadConfirmation">
|
665 |
+
<http:operation location="TargetService2/sendDownloadConfirmation" />
|
666 |
+
<wsdl:input>
|
667 |
+
<mime:content type="text/xml" part="sendDownloadConfirmation" />
|
668 |
+
</wsdl:input>
|
669 |
+
<wsdl:output>
|
670 |
+
<mime:content type="text/xml" part="sendDownloadConfirmation" />
|
671 |
+
</wsdl:output>
|
672 |
+
</wsdl:operation>
|
673 |
+
<wsdl:operation name="getCompletedTargetsByDocuments">
|
674 |
+
<http:operation location="TargetService2/getCompletedTargetsByDocuments" />
|
675 |
+
<wsdl:input>
|
676 |
+
<mime:content type="text/xml" part="getCompletedTargetsByDocuments" />
|
677 |
+
</wsdl:input>
|
678 |
+
<wsdl:output>
|
679 |
+
<mime:content type="text/xml" part="getCompletedTargetsByDocuments" />
|
680 |
+
</wsdl:output>
|
681 |
+
</wsdl:operation>
|
682 |
+
<wsdl:operation name="search">
|
683 |
+
<http:operation location="TargetService2/search" />
|
684 |
+
<wsdl:input>
|
685 |
+
<mime:content type="text/xml" part="search" />
|
686 |
+
</wsdl:input>
|
687 |
+
<wsdl:output>
|
688 |
+
<mime:content type="text/xml" part="search" />
|
689 |
+
</wsdl:output>
|
690 |
+
</wsdl:operation>
|
691 |
+
<wsdl:operation name="getCanceledTargetsByDocuments">
|
692 |
+
<http:operation location="TargetService/getCanceledTargetsByDocuments" />
|
693 |
+
<wsdl:input>
|
694 |
+
<mime:content type="text/xml" part="getCanceledTargetsByDocuments" />
|
695 |
+
</wsdl:input>
|
696 |
+
<wsdl:output>
|
697 |
+
<mime:content type="text/xml" part="getCanceledTargetsByDocuments" />
|
698 |
+
</wsdl:output>
|
699 |
+
</wsdl:operation>
|
700 |
+
<wsdl:operation name="getCanceledTargetsByProjects">
|
701 |
+
<http:operation location="TargetService/getCanceledTargetsByProjects" />
|
702 |
+
<wsdl:input>
|
703 |
+
<mime:content type="text/xml" part="getCanceledTargetsByProjects" />
|
704 |
+
</wsdl:input>
|
705 |
+
<wsdl:output>
|
706 |
+
<mime:content type="text/xml" part="getCanceledTargetsByProjects" />
|
707 |
+
</wsdl:output>
|
708 |
+
</wsdl:operation>
|
709 |
+
<wsdl:operation name="getCanceledTargetsBySubmissions">
|
710 |
+
<http:operation location="TargetService/getCanceledTargetsBySubmissions" />
|
711 |
+
<wsdl:input>
|
712 |
+
<mime:content type="text/xml" part="getCanceledTargetsBySubmissions" />
|
713 |
+
</wsdl:input>
|
714 |
+
<wsdl:output>
|
715 |
+
<mime:content type="text/xml" part="getCanceledTargetsBySubmissions" />
|
716 |
+
</wsdl:output>
|
717 |
+
</wsdl:operation>
|
718 |
+
</wsdl:binding>
|
719 |
+
<wsdl:service name="TargetService2">
|
720 |
+
<wsdl:port name="TargetService2HttpSoap11Endpoint" binding="ns:TargetService2Soap11Binding">
|
721 |
+
<soap:address
|
722 |
+
location="http://localhost/services/TargetService2.TargetService2HttpSoap11Endpoint" />
|
723 |
+
</wsdl:port>
|
724 |
+
<wsdl:port name="TargetService2HttpSoap12Endpoint" binding="ns:TargetService2Soap12Binding">
|
725 |
+
<soap12:address
|
726 |
+
location="http://localhost/services/TargetService2.TargetService2HttpSoap12Endpoint" />
|
727 |
+
</wsdl:port>
|
728 |
+
<wsdl:port name="TargetService2HttpEndpoint" binding="ns:TargetService2HttpBinding">
|
729 |
+
<http:address
|
730 |
+
location="http://localhost/services/TargetService2.TargetService2HttpEndpoint" />
|
731 |
+
</wsdl:port>
|
732 |
+
</wsdl:service>
|
733 |
+
</wsdl:definitions>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/types.xsd
ADDED
@@ -0,0 +1,537 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
3 |
+
targetNamespace="http://dto.model.projectdirector.gs4tr.org/xsd"
|
4 |
+
xmlns:tns="http://dto.model.projectdirector.gs4tr.org/xsd"
|
5 |
+
elementFormDefault="qualified" attributeFormDefault="qualified"
|
6 |
+
xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
|
7 |
+
<xs:import namespace="http://www.w3.org/2005/05/xmlmime"
|
8 |
+
schemaLocation="xmime.xsd" />
|
9 |
+
<xs:complexType name="Notification">
|
10 |
+
<xs:sequence>
|
11 |
+
<xs:element name="errorMessage" nillable="true" type="xs:string" />
|
12 |
+
<xs:element name="notificationDate" nillable="true" type="tns:Date" />
|
13 |
+
<xs:element name="notificationPriority" nillable="true"
|
14 |
+
type="tns:NotificationPriority" />
|
15 |
+
<xs:element name="notificationText" nillable="true" type="xs:string" />
|
16 |
+
</xs:sequence>
|
17 |
+
</xs:complexType>
|
18 |
+
<xs:complexType name="NotificationPriority">
|
19 |
+
<xs:sequence>
|
20 |
+
<xs:element name="notificationPriorityName" nillable="true"
|
21 |
+
type="xs:string" />
|
22 |
+
</xs:sequence>
|
23 |
+
</xs:complexType>
|
24 |
+
<xs:complexType name="Announcement">
|
25 |
+
<xs:sequence>
|
26 |
+
<xs:element name="announcementText" nillable="true" type="xs:string" />
|
27 |
+
<xs:element name="date" nillable="true" type="tns:Date" />
|
28 |
+
</xs:sequence>
|
29 |
+
</xs:complexType>
|
30 |
+
<xs:complexType name="ContentMonitorPluginInfo">
|
31 |
+
<xs:sequence>
|
32 |
+
<xs:element name="pluginId" nillable="true" type="xs:string" />
|
33 |
+
<xs:element name="pluginName" nillable="true" type="xs:string" />
|
34 |
+
</xs:sequence>
|
35 |
+
</xs:complexType>
|
36 |
+
<xs:complexType name="Date">
|
37 |
+
<xs:sequence>
|
38 |
+
<xs:element name="critical" type="xs:boolean" />
|
39 |
+
<xs:element name="date" type="xs:long" />
|
40 |
+
</xs:sequence>
|
41 |
+
</xs:complexType>
|
42 |
+
<xs:complexType name="Document">
|
43 |
+
<xs:sequence>
|
44 |
+
<xs:element name="documentGroup" nillable="true"
|
45 |
+
type="tns:DocumentGroup" />
|
46 |
+
<xs:element name="documentInfo" nillable="true"
|
47 |
+
type="tns:DocumentInfo" />
|
48 |
+
<xs:element name="id" nillable="true" type="xs:string" />
|
49 |
+
<xs:element name="sourceLanguage" nillable="true" type="tns:Language" />
|
50 |
+
<xs:element name="sourceWordCount" nillable="true" type="xs:int" />
|
51 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
52 |
+
</xs:sequence>
|
53 |
+
</xs:complexType>
|
54 |
+
<xs:complexType name="DocumentGroup">
|
55 |
+
<xs:sequence>
|
56 |
+
<xs:element name="classifier" nillable="true" type="xs:string" />
|
57 |
+
<xs:element maxOccurs="unbounded" name="documents"
|
58 |
+
nillable="true" type="tns:Document" />
|
59 |
+
<xs:element name="mimeType" nillable="true" type="xs:string" />
|
60 |
+
<xs:element name="submission" nillable="true" type="tns:Submission" />
|
61 |
+
</xs:sequence>
|
62 |
+
</xs:complexType>
|
63 |
+
<xs:complexType name="DocumentInfo">
|
64 |
+
<xs:sequence>
|
65 |
+
<xs:element name="clientIdentifier" nillable="true" type="xs:string" />
|
66 |
+
<xs:element name="dateRequested" nillable="true" type="tns:Date" />
|
67 |
+
<xs:element name="instructions" nillable="true" type="xs:string" />
|
68 |
+
<xs:element name="metadata" nillable="true" maxOccurs="unbounded"
|
69 |
+
type="tns:Metadata" />
|
70 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
71 |
+
<xs:element name="projectTicket" nillable="true" type="xs:string" />
|
72 |
+
<xs:element name="sourceLocale" nillable="true" type="xs:string" />
|
73 |
+
<xs:element name="submissionTicket" nillable="true" type="xs:string" />
|
74 |
+
<xs:element maxOccurs="unbounded" name="targetInfos"
|
75 |
+
nillable="true" type="tns:TargetInfo" />
|
76 |
+
<xs:element name="wordCount" nillable="true" type="xs:int" />
|
77 |
+
</xs:sequence>
|
78 |
+
</xs:complexType>
|
79 |
+
<xs:complexType name="DocumentPagedList">
|
80 |
+
<xs:sequence>
|
81 |
+
<xs:element maxOccurs="unbounded" name="elements"
|
82 |
+
nillable="true" type="tns:Document" />
|
83 |
+
<xs:element name="pagedListInfo" nillable="true"
|
84 |
+
type="tns:PagedListInfo" />
|
85 |
+
<xs:element maxOccurs="unbounded" name="tasks" nillable="true"
|
86 |
+
type="tns:Task" />
|
87 |
+
<xs:element name="totalCount" nillable="true" type="xs:long" />
|
88 |
+
</xs:sequence>
|
89 |
+
</xs:complexType>
|
90 |
+
<xs:complexType name="DocumentSearchRequest">
|
91 |
+
<xs:sequence>
|
92 |
+
<xs:element maxOccurs="unbounded" name="projectTickets"
|
93 |
+
nillable="true" type="xs:string" />
|
94 |
+
<xs:element name="sourceLocaleId" nillable="true" type="xs:string" />
|
95 |
+
<xs:element name="submissionTicket" nillable="true" type="xs:string" />
|
96 |
+
</xs:sequence>
|
97 |
+
</xs:complexType>
|
98 |
+
<xs:complexType name="DocumentTicket">
|
99 |
+
<xs:sequence>
|
100 |
+
<xs:element name="submissionTicket" nillable="true" type="xs:string" />
|
101 |
+
<xs:element name="ticketId" nillable="true" type="xs:string" />
|
102 |
+
</xs:sequence>
|
103 |
+
</xs:complexType>
|
104 |
+
<xs:complexType name="EntityTypeEnum">
|
105 |
+
<xs:sequence>
|
106 |
+
<xs:element name="name" type="xs:string" />
|
107 |
+
<xs:element name="value" type="xs:int" />
|
108 |
+
</xs:sequence>
|
109 |
+
</xs:complexType>
|
110 |
+
<xs:complexType name="FileFormatProfile">
|
111 |
+
<xs:sequence>
|
112 |
+
<xs:element name="configurable" nillable="true" type="xs:boolean" />
|
113 |
+
<xs:element name="isDefault" nillable="true" type="xs:boolean" />
|
114 |
+
<xs:element name="mimeType" nillable="true" type="xs:string" />
|
115 |
+
<xs:element name="pluginId" nillable="true" type="xs:string" />
|
116 |
+
<xs:element name="pluginName" nillable="true" type="xs:string" />
|
117 |
+
<xs:element name="profileName" nillable="true" type="xs:string" />
|
118 |
+
<xs:element name="targetWorkflowDefinition" nillable="true"
|
119 |
+
type="tns:WorkflowDefinition" />
|
120 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
121 |
+
</xs:sequence>
|
122 |
+
</xs:complexType>
|
123 |
+
<xs:complexType name="FileFormatProgressData">
|
124 |
+
<xs:sequence>
|
125 |
+
<xs:element name="dateCompleted" nillable="true" type="tns:Date" />
|
126 |
+
<xs:element name="fileCount" type="xs:long" />
|
127 |
+
<xs:element name="fileFormatName" nillable="true" type="xs:string" />
|
128 |
+
<xs:element name="fileProgressData" nillable="true"
|
129 |
+
type="tns:FileProgressData" />
|
130 |
+
<xs:element name="jobTicket" nillable="true" type="xs:string" />
|
131 |
+
<xs:element name="workflowDueDate" nillable="true" type="tns:Date" />
|
132 |
+
<xs:element name="workflowStatus" nillable="true" type="xs:string" />
|
133 |
+
</xs:sequence>
|
134 |
+
</xs:complexType>
|
135 |
+
<xs:complexType name="FileProgressData">
|
136 |
+
<xs:sequence>
|
137 |
+
<xs:element name="numberOfAvailableFiles" type="xs:int" />
|
138 |
+
<xs:element name="numberOfCanceledFiles" type="xs:int" />
|
139 |
+
<xs:element name="numberOfCompletedFiles" type="xs:int" />
|
140 |
+
<xs:element name="numberOfDeliveredFiles" type="xs:int" />
|
141 |
+
<xs:element name="numberOfFailedFiles" type="xs:int" />
|
142 |
+
<xs:element name="numberOfInProcessFiles" type="xs:int" />
|
143 |
+
<xs:element name="overallProgressPercent" type="xs:int" />
|
144 |
+
</xs:sequence>
|
145 |
+
</xs:complexType>
|
146 |
+
<xs:complexType name="FuzzyTmStatistics">
|
147 |
+
<xs:sequence>
|
148 |
+
<xs:element name="fuzzyName" nillable="true" type="xs:string" />
|
149 |
+
<xs:element name="wordCount" nillable="true" type="xs:int" />
|
150 |
+
</xs:sequence>
|
151 |
+
</xs:complexType>
|
152 |
+
<xs:complexType name="ItemFolderEnum">
|
153 |
+
<xs:sequence>
|
154 |
+
<xs:element name="value" type="xs:int" />
|
155 |
+
</xs:sequence>
|
156 |
+
</xs:complexType>
|
157 |
+
<xs:complexType name="ItemStatusEnum">
|
158 |
+
<xs:sequence>
|
159 |
+
<xs:element name="name" type="xs:string" />
|
160 |
+
<xs:element name="value" type="xs:int" />
|
161 |
+
</xs:sequence>
|
162 |
+
</xs:complexType>
|
163 |
+
<xs:complexType name="Metadata">
|
164 |
+
<xs:sequence>
|
165 |
+
<xs:element name="key" nillable="true" type="xs:string" />
|
166 |
+
<xs:element name="value" nillable="true" type="xs:string" />
|
167 |
+
</xs:sequence>
|
168 |
+
</xs:complexType>
|
169 |
+
<xs:complexType name="Language">
|
170 |
+
<xs:sequence>
|
171 |
+
<xs:element name="locale" nillable="true" type="xs:string" />
|
172 |
+
<xs:element name="value" nillable="true" type="xs:string" />
|
173 |
+
</xs:sequence>
|
174 |
+
</xs:complexType>
|
175 |
+
<xs:complexType name="LanguageDirection">
|
176 |
+
<xs:sequence>
|
177 |
+
<xs:element name="sourceLanguage" nillable="true" type="tns:Language" />
|
178 |
+
<xs:element name="targetLanguage" nillable="true" type="tns:Language" />
|
179 |
+
</xs:sequence>
|
180 |
+
</xs:complexType>
|
181 |
+
<xs:complexType name="LanguageDirectionModel">
|
182 |
+
<xs:sequence>
|
183 |
+
<xs:element name="dateCompleted" nillable="true" type="tns:Date" />
|
184 |
+
<xs:element name="fileCount" type="xs:long" />
|
185 |
+
<xs:element maxOccurs="unbounded" name="fileFormatProgressData"
|
186 |
+
nillable="true" type="tns:FileFormatProgressData" />
|
187 |
+
<xs:element name="fileProgress" nillable="true"
|
188 |
+
type="tns:FileProgressData" />
|
189 |
+
<xs:element name="sourceLanguage" nillable="true" type="tns:Language" />
|
190 |
+
<xs:element name="targetLanguage" nillable="true" type="tns:Language" />
|
191 |
+
<xs:element name="workflowDueDate" nillable="true" type="tns:Date" />
|
192 |
+
<xs:element name="workflowStatus" nillable="true" type="xs:string" />
|
193 |
+
</xs:sequence>
|
194 |
+
</xs:complexType>
|
195 |
+
<xs:complexType name="PagedListInfo">
|
196 |
+
<xs:sequence>
|
197 |
+
<xs:element name="index" nillable="true" type="xs:int" />
|
198 |
+
<xs:element name="indexesSize" nillable="true" type="xs:int" />
|
199 |
+
<xs:element name="size" nillable="true" type="xs:int" />
|
200 |
+
<xs:element name="sortDirection" nillable="true" type="xs:string" />
|
201 |
+
<xs:element name="sortProperty" nillable="true" type="xs:string" />
|
202 |
+
</xs:sequence>
|
203 |
+
</xs:complexType>
|
204 |
+
<xs:complexType name="Phase">
|
205 |
+
<xs:sequence>
|
206 |
+
<xs:element name="dateEnded" nillable="true" type="tns:Date" />
|
207 |
+
<xs:element name="dueDate" nillable="true" type="tns:Date" />
|
208 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
209 |
+
<xs:element name="status" nillable="true" type="tns:ItemStatusEnum" />
|
210 |
+
</xs:sequence>
|
211 |
+
</xs:complexType>
|
212 |
+
<xs:complexType name="Priority">
|
213 |
+
<xs:sequence>
|
214 |
+
<xs:element name="name" type="xs:string" />
|
215 |
+
<xs:element name="value" type="xs:int" />
|
216 |
+
</xs:sequence>
|
217 |
+
</xs:complexType>
|
218 |
+
<xs:complexType name="Project">
|
219 |
+
<xs:sequence>
|
220 |
+
<xs:element maxOccurs="unbounded" name="announcements"
|
221 |
+
nillable="true" type="tns:Announcement" />
|
222 |
+
<xs:element name="contentMonitorPluginInfo" nillable="true"
|
223 |
+
type="tns:ContentMonitorPluginInfo" />
|
224 |
+
<xs:element maxOccurs="unbounded" name="defaultLanguageDirections"
|
225 |
+
nillable="true" type="tns:LanguageDirection" />
|
226 |
+
<xs:element name="defaultTargetWorkflowDefinition"
|
227 |
+
nillable="true" type="tns:WorkflowDefinition" />
|
228 |
+
<xs:element name="defaultTargetWorkflowDefinitionTicket"
|
229 |
+
nillable="true" type="xs:string" />
|
230 |
+
<xs:element maxOccurs="unbounded" name="fileFormatProfiles"
|
231 |
+
nillable="true" type="tns:FileFormatProfile" />
|
232 |
+
<xs:element maxOccurs="unbounded" name="frequentLanguageDirections"
|
233 |
+
nillable="true" type="tns:LanguageDirection" />
|
234 |
+
<xs:element maxOccurs="unbounded" name="metadata"
|
235 |
+
nillable="true" type="tns:Metadata" />
|
236 |
+
<xs:element name="organizationName" nillable="true" type="xs:string" />
|
237 |
+
<xs:element name="projectInfo" nillable="true" type="tns:ProjectInfo" />
|
238 |
+
<xs:element maxOccurs="unbounded" name="projectLanguageDirections"
|
239 |
+
nillable="true" type="tns:LanguageDirection" />
|
240 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
241 |
+
<xs:element maxOccurs="unbounded" name="workflowDefinitions"
|
242 |
+
nillable="true" type="tns:WorkflowDefinition" />
|
243 |
+
</xs:sequence>
|
244 |
+
</xs:complexType>
|
245 |
+
<xs:complexType name="ProjectInfo">
|
246 |
+
<xs:sequence>
|
247 |
+
<xs:element name="clientIdentifier" nillable="true" type="xs:string" />
|
248 |
+
<xs:element name="defaultJobWorkflowDefinitionTicket"
|
249 |
+
nillable="true" type="xs:string" />
|
250 |
+
<xs:element name="defaultSubmissionWorkflowDefinitionTicket"
|
251 |
+
nillable="true" type="xs:string" />
|
252 |
+
<xs:element name="defaultTargetWorkflowDefinitionTicket"
|
253 |
+
nillable="true" type="xs:string" />
|
254 |
+
<xs:element name="enabled" nillable="true" type="xs:boolean" />
|
255 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
256 |
+
<xs:element name="shortCode" nillable="true" type="xs:string" />
|
257 |
+
</xs:sequence>
|
258 |
+
</xs:complexType>
|
259 |
+
<xs:complexType name="ProjectLanguage">
|
260 |
+
<xs:sequence>
|
261 |
+
<xs:element name="customLocaleCode" nillable="true" type="xs:string" />
|
262 |
+
<xs:element name="localeCode" nillable="true" type="xs:string" />
|
263 |
+
</xs:sequence>
|
264 |
+
</xs:complexType>
|
265 |
+
<xs:complexType name="RepositoryItem">
|
266 |
+
<xs:sequence>
|
267 |
+
<xs:element name="data" nillable="true" type="xmime:base64Binary" />
|
268 |
+
<xs:element name="resourceInfo" nillable="true"
|
269 |
+
type="tns:ResourceInfo" />
|
270 |
+
</xs:sequence>
|
271 |
+
</xs:complexType>
|
272 |
+
<xs:complexType name="ResourceInfo">
|
273 |
+
<xs:sequence>
|
274 |
+
<xs:element name="classifier" nillable="true" type="xs:string" />
|
275 |
+
<xs:element name="clientIdentifier" nillable="true" type="xs:string" />
|
276 |
+
<xs:element name="description" nillable="true" type="xs:string" />
|
277 |
+
<xs:element name="encoding" nillable="true" type="xs:string" />
|
278 |
+
<xs:element name="md5Checksum" nillable="true" type="xs:string" />
|
279 |
+
<xs:element name="mimeType" nillable="true" type="xs:string" />
|
280 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
281 |
+
<xs:element name="path" nillable="true" type="xs:string" />
|
282 |
+
<xs:element name="resourceInfoId" nillable="true" type="xs:long" />
|
283 |
+
<xs:element name="size" nillable="true" type="xs:long" />
|
284 |
+
<xs:element name="type" nillable="true" type="tns:ResourceType" />
|
285 |
+
</xs:sequence>
|
286 |
+
</xs:complexType>
|
287 |
+
<xs:complexType name="ResourceType">
|
288 |
+
<xs:sequence>
|
289 |
+
<xs:element name="value" type="xs:int" />
|
290 |
+
</xs:sequence>
|
291 |
+
</xs:complexType>
|
292 |
+
<xs:complexType name="Submission">
|
293 |
+
<xs:sequence>
|
294 |
+
<xs:element name="alerts" nillable="true" type="tns:Notification"
|
295 |
+
maxOccurs="unbounded" />
|
296 |
+
<xs:element name="availableTasks" nillable="true" type="xs:int" />
|
297 |
+
<xs:element name="dateCompleted" nillable="true" type="tns:Date" />
|
298 |
+
<xs:element name="dateCreated" nillable="true" type="tns:Date" />
|
299 |
+
<xs:element name="dateEstimated" nillable="true" type="tns:Date" />
|
300 |
+
<xs:element maxOccurs="unbounded" name="documents"
|
301 |
+
nillable="true" type="tns:Document" />
|
302 |
+
<xs:element name="dueDate" nillable="true" type="tns:Date" />
|
303 |
+
<xs:element name="id" nillable="true" type="xs:string" />
|
304 |
+
<xs:element name="owner" nillable="true" type="xs:string" />
|
305 |
+
<xs:element name="project" nillable="true" type="tns:Project" />
|
306 |
+
<xs:element name="status" nillable="true" type="tns:ItemStatusEnum" />
|
307 |
+
<xs:element name="submissionInfo" nillable="true"
|
308 |
+
type="tns:SubmissionInfo" />
|
309 |
+
<xs:element name="submitter" nillable="true" type="xs:string" />
|
310 |
+
<xs:element name="submitterFullName" nillable="true" type="xs:string" />
|
311 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
312 |
+
<xs:element name="workflowDefinition" nillable="true"
|
313 |
+
type="tns:WorkflowDefinition" />
|
314 |
+
</xs:sequence>
|
315 |
+
</xs:complexType>
|
316 |
+
<xs:complexType name="SubmissionInfo">
|
317 |
+
<xs:sequence>
|
318 |
+
<xs:element name="clientIdentifier" nillable="true" type="xs:string" />
|
319 |
+
<xs:element name="dateRequested" nillable="true" type="tns:Date" />
|
320 |
+
<xs:element name="metadata" nillable="true" maxOccurs="unbounded"
|
321 |
+
type="tns:Metadata" />
|
322 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
323 |
+
<xs:element name="projectTicket" nillable="true" type="xs:string" />
|
324 |
+
<xs:element name="submitter" nillable="true" type="xs:string" />
|
325 |
+
<xs:element name="workflowDefinitionTicket" nillable="true"
|
326 |
+
type="xs:string" />
|
327 |
+
</xs:sequence>
|
328 |
+
</xs:complexType>
|
329 |
+
<xs:complexType name="SubmissionPagedList">
|
330 |
+
<xs:sequence>
|
331 |
+
<xs:element maxOccurs="unbounded" name="elements"
|
332 |
+
nillable="true" type="tns:Submission" />
|
333 |
+
<xs:element name="pagedListInfo" nillable="true"
|
334 |
+
type="tns:PagedListInfo" />
|
335 |
+
<xs:element maxOccurs="unbounded" name="tasks" nillable="true"
|
336 |
+
type="tns:Task" />
|
337 |
+
<xs:element name="totalCount" nillable="true" type="xs:long" />
|
338 |
+
</xs:sequence>
|
339 |
+
</xs:complexType>
|
340 |
+
<xs:complexType name="SimpleSubmissionSearchModel">
|
341 |
+
<xs:sequence>
|
342 |
+
<xs:element maxOccurs="unbounded" name="alerts" nillable="true"
|
343 |
+
type="tns:Notification" />
|
344 |
+
<xs:element name="availableTasks" nillable="true" type="xs:long" />
|
345 |
+
<xs:element name="date" nillable="true" type="tns:Date" />
|
346 |
+
<xs:element name="dateCompleted" nillable="true" type="tns:Date" />
|
347 |
+
<xs:element name="dueDate" nillable="true" type="tns:Date" />
|
348 |
+
<xs:element name="fileCount" type="xs:long" />
|
349 |
+
<xs:element name="fileProgress" nillable="true"
|
350 |
+
type="tns:FileProgressData" />
|
351 |
+
<xs:element name="id" nillable="true" type="xs:string" />
|
352 |
+
<xs:element name="instructions" nillable="true" type="xs:string" />
|
353 |
+
<xs:element name="officeName" nillable="true" type="xs:string" />
|
354 |
+
<xs:element name="owner" nillable="true" type="xs:string" />
|
355 |
+
<xs:element name="priority" nillable="true" type="xs:string" />
|
356 |
+
<xs:element name="projectName" nillable="true" type="xs:string" />
|
357 |
+
<xs:element name="projectTicket" nillable="true" type="xs:string" />
|
358 |
+
<xs:element name="sourceLanguage" nillable="true" type="xs:string"/>
|
359 |
+
<xs:element name="status" nillable="true" type="tns:ItemStatusEnum" />
|
360 |
+
<xs:element name="submissionName" nillable="true" type="xs:string" />
|
361 |
+
<xs:element name="submitterFullName" nillable="true" type="xs:string" />
|
362 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
363 |
+
<xs:element name="wordCount" nillable="true" type="xs:long" />
|
364 |
+
<xs:element name="workflowDueDate" nillable="true" type="tns:Date" />
|
365 |
+
<xs:element name="workflowStatus" nillable="true" type="xs:string" />
|
366 |
+
</xs:sequence>
|
367 |
+
</xs:complexType>
|
368 |
+
<xs:complexType name="SubmissionSearchModelPagedList">
|
369 |
+
<xs:sequence>
|
370 |
+
<xs:element maxOccurs="unbounded" name="elements"
|
371 |
+
nillable="true" type="tns:SimpleSubmissionSearchModel" />
|
372 |
+
<xs:element name="pagedListInfo" nillable="true"
|
373 |
+
type="tns:PagedListInfo" />
|
374 |
+
<xs:element maxOccurs="unbounded" name="tasks" nillable="true"
|
375 |
+
type="tns:Task" />
|
376 |
+
<xs:element name="totalCount" nillable="true" type="xs:long" />
|
377 |
+
</xs:sequence>
|
378 |
+
</xs:complexType>
|
379 |
+
<xs:complexType name="SubmissionSearchRequest">
|
380 |
+
<xs:sequence>
|
381 |
+
<xs:element name="folder" nillable="true" type="tns:ItemFolderEnum" />
|
382 |
+
<xs:element maxOccurs="unbounded" name="projectTickets"
|
383 |
+
nillable="true" type="xs:string" />
|
384 |
+
<xs:element name="submissionDate" nillable="true" type="tns:Date" />
|
385 |
+
<xs:element name="submissionDueDate" nillable="true" type="tns:Date" />
|
386 |
+
<xs:element name="submissionName" nillable="true" type="xs:string" />
|
387 |
+
</xs:sequence>
|
388 |
+
</xs:complexType>
|
389 |
+
<xs:complexType name="Target">
|
390 |
+
<xs:sequence>
|
391 |
+
<xs:element name="availableTasks" nillable="true" type="xs:long" />
|
392 |
+
<xs:element name="dateCompleted" nillable="true" type="tns:Date" />
|
393 |
+
<xs:element name="dateCreated" nillable="true" type="tns:Date" />
|
394 |
+
<xs:element name="dateEstimated" nillable="true" type="tns:Date" />
|
395 |
+
<xs:element name="document" nillable="true" type="tns:Document" />
|
396 |
+
<xs:element name="downloadThresholdTimeStamp" nillable="true"
|
397 |
+
type="tns:Date" />
|
398 |
+
<xs:element name="dueDate" nillable="true" type="tns:Date" />
|
399 |
+
<xs:element name="fileName" nillable="true" type="xs:string" />
|
400 |
+
<xs:element name="id" nillable="true" type="xs:string" />
|
401 |
+
<xs:element maxOccurs="unbounded" name="phases" nillable="true"
|
402 |
+
type="tns:Phase" />
|
403 |
+
<xs:element name="refPhase" nillable="true" type="tns:Phase" />
|
404 |
+
<xs:element name="sourceLanguage" nillable="true" type="tns:Language" />
|
405 |
+
<xs:element name="sourceWordCount" nillable="true" type="xs:int" />
|
406 |
+
<xs:element name="status" nillable="true" type="tns:ItemStatusEnum" />
|
407 |
+
<xs:element name="targetInfo" nillable="true" type="tns:TargetInfo" />
|
408 |
+
<xs:element name="targetLanguage" nillable="true" type="tns:Language" />
|
409 |
+
<xs:element name="targetWordCount" nillable="true" type="xs:int" />
|
410 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
411 |
+
<xs:element name="tmStatistics" nillable="true"
|
412 |
+
type="tns:TmStatistics" />
|
413 |
+
<xs:element name="workflowDefinition" nillable="true"
|
414 |
+
type="tns:WorkflowDefinition" />
|
415 |
+
</xs:sequence>
|
416 |
+
</xs:complexType>
|
417 |
+
<xs:complexType name="TargetInfo">
|
418 |
+
<xs:sequence>
|
419 |
+
<xs:element name="dateRequested" nillable="true" type="tns:Date" />
|
420 |
+
<xs:element name="encoding" nillable="true" type="xs:string" />
|
421 |
+
<xs:element name="instructions" nillable="true" type="xs:string" />
|
422 |
+
<xs:element name="metadata" nillable="true" maxOccurs="unbounded"
|
423 |
+
type="tns:Metadata" />
|
424 |
+
<xs:element name="priority" nillable="true" type="tns:Priority" />
|
425 |
+
<xs:element name="requestedDueDate" type="xs:long" />
|
426 |
+
<xs:element name="targetLocale" nillable="true" type="xs:string" />
|
427 |
+
<xs:element name="workflowDefinitionTicket" nillable="true"
|
428 |
+
type="xs:string" />
|
429 |
+
</xs:sequence>
|
430 |
+
</xs:complexType>
|
431 |
+
<xs:complexType name="TargetPagedList">
|
432 |
+
<xs:sequence>
|
433 |
+
<xs:element maxOccurs="unbounded" name="elements"
|
434 |
+
nillable="true" type="tns:Target" />
|
435 |
+
<xs:element name="pagedListInfo" nillable="true"
|
436 |
+
type="tns:PagedListInfo" />
|
437 |
+
<xs:element maxOccurs="unbounded" name="tasks" nillable="true"
|
438 |
+
type="tns:Task" />
|
439 |
+
<xs:element name="totalCount" nillable="true" type="xs:long" />
|
440 |
+
</xs:sequence>
|
441 |
+
</xs:complexType>
|
442 |
+
<xs:complexType name="TargetSearchRequest">
|
443 |
+
<xs:sequence>
|
444 |
+
<xs:element name="dateCreated" nillable="true" type="tns:Date" />
|
445 |
+
<xs:element name="folder" nillable="true" type="tns:ItemFolderEnum" />
|
446 |
+
<xs:element maxOccurs="unbounded" name="projectTickets"
|
447 |
+
nillable="true" type="xs:string" />
|
448 |
+
<xs:element name="sourceLocaleId" nillable="true" type="xs:string" />
|
449 |
+
<xs:element name="submissionTicket" nillable="true" type="xs:string" />
|
450 |
+
<xs:element name="targetLocaleId" nillable="true" type="xs:string" />
|
451 |
+
</xs:sequence>
|
452 |
+
</xs:complexType>
|
453 |
+
<xs:complexType name="Task">
|
454 |
+
<xs:sequence>
|
455 |
+
<xs:element name="groupName" nillable="true" type="xs:string" />
|
456 |
+
<xs:element name="selectStyle" nillable="true" type="xs:int" />
|
457 |
+
<xs:element name="taskId" nillable="true" type="xs:long" />
|
458 |
+
<xs:element name="taskName" nillable="true" type="xs:string" />
|
459 |
+
<xs:element name="weight" nillable="true" type="xs:int" />
|
460 |
+
</xs:sequence>
|
461 |
+
</xs:complexType>
|
462 |
+
<xs:complexType name="TmStatistics">
|
463 |
+
<xs:sequence>
|
464 |
+
<xs:element name="fuzzyWordCount1" nillable="true"
|
465 |
+
type="tns:FuzzyTmStatistics" />
|
466 |
+
<xs:element name="fuzzyWordCount10" nillable="true"
|
467 |
+
type="tns:FuzzyTmStatistics" />
|
468 |
+
<xs:element name="fuzzyWordCount2" nillable="true"
|
469 |
+
type="tns:FuzzyTmStatistics" />
|
470 |
+
<xs:element name="fuzzyWordCount3" nillable="true"
|
471 |
+
type="tns:FuzzyTmStatistics" />
|
472 |
+
<xs:element name="fuzzyWordCount4" nillable="true"
|
473 |
+
type="tns:FuzzyTmStatistics" />
|
474 |
+
<xs:element name="fuzzyWordCount5" nillable="true"
|
475 |
+
type="tns:FuzzyTmStatistics" />
|
476 |
+
<xs:element name="fuzzyWordCount6" nillable="true"
|
477 |
+
type="tns:FuzzyTmStatistics" />
|
478 |
+
<xs:element name="fuzzyWordCount7" nillable="true"
|
479 |
+
type="tns:FuzzyTmStatistics" />
|
480 |
+
<xs:element name="fuzzyWordCount8" nillable="true"
|
481 |
+
type="tns:FuzzyTmStatistics" />
|
482 |
+
<xs:element name="fuzzyWordCount9" nillable="true"
|
483 |
+
type="tns:FuzzyTmStatistics" />
|
484 |
+
<xs:element name="goldWordCount" nillable="true" type="xs:int" />
|
485 |
+
<xs:element name="noMatchWordCount" nillable="true" type="xs:int" />
|
486 |
+
<xs:element name="oneHundredMatchWordCount" nillable="true"
|
487 |
+
type="xs:int" />
|
488 |
+
<xs:element name="repetitionWordCount" nillable="true"
|
489 |
+
type="xs:int" />
|
490 |
+
<xs:element name="totalWordCount" nillable="true" type="xs:int" />
|
491 |
+
</xs:sequence>
|
492 |
+
</xs:complexType>
|
493 |
+
<xs:complexType name="WorkflowDefinition">
|
494 |
+
<xs:sequence>
|
495 |
+
<xs:element name="description" nillable="true" type="xs:string" />
|
496 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
497 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
498 |
+
<xs:element name="type" nillable="true" type="tns:EntityTypeEnum" />
|
499 |
+
</xs:sequence>
|
500 |
+
</xs:complexType>
|
501 |
+
<xs:complexType name="UserInfo">
|
502 |
+
<xs:sequence>
|
503 |
+
<xs:element name="accountNonExpired" nillable="true" type="xs:boolean" />
|
504 |
+
<xs:element name="accountNonLocked" nillable="true" type="xs:boolean" />
|
505 |
+
<xs:element name="autoClaimMultipleTasks" nillable="true"
|
506 |
+
type="xs:boolean" />
|
507 |
+
<xs:element name="claimMultipleJobTasks" nillable="true"
|
508 |
+
type="xs:boolean" />
|
509 |
+
<xs:element name="credentialsNonExpired" nillable="true"
|
510 |
+
type="xs:boolean" />
|
511 |
+
<xs:element name="dateLastLogin" nillable="true" type="xs:dateTime" />
|
512 |
+
<xs:element name="emailAddress" nillable="true" type="xs:string" />
|
513 |
+
<xs:element name="emailNotification" nillable="true" type="xs:boolean" />
|
514 |
+
<xs:element name="enabled" nillable="true" type="xs:boolean" />
|
515 |
+
<xs:element name="firstName" nillable="true" type="xs:string" />
|
516 |
+
<xs:element name="lastName" nillable="true" type="xs:string" />
|
517 |
+
<xs:element name="password" nillable="true" type="xs:string" />
|
518 |
+
<xs:element name="timeZone" nillable="true" type="xs:string" />
|
519 |
+
<xs:element name="userName" nillable="true" type="xs:string" />
|
520 |
+
<xs:element name="userType" nillable="true" type="xs:string" />
|
521 |
+
</xs:sequence>
|
522 |
+
</xs:complexType>
|
523 |
+
<xs:complexType name="TiUserInfo">
|
524 |
+
<xs:sequence>
|
525 |
+
<xs:element name="languageDirections" nillable="true"
|
526 |
+
maxOccurs="unbounded" type="tns:LanguageDirection" />
|
527 |
+
<xs:element name="organizationId" nillable="true" type="xs:long" />
|
528 |
+
<xs:element name="projectRoles" nillable="true" maxOccurs="unbounded"
|
529 |
+
type="xs:string" />
|
530 |
+
<xs:element name="projectTicket" nillable="true"
|
531 |
+
maxOccurs="unbounded" type="xs:string" />
|
532 |
+
<xs:element name="systemRoles" nillable="true" maxOccurs="unbounded"
|
533 |
+
type="xs:string" />
|
534 |
+
<xs:element name="vendorId" nillable="true" type="xs:long" />
|
535 |
+
</xs:sequence>
|
536 |
+
</xs:complexType>
|
537 |
+
</xs:schema>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/typesInternal.xsd
ADDED
@@ -0,0 +1,502 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
3 |
+
targetNamespace="http://dto.model.projectdirector.gs4tr.org/xsd"
|
4 |
+
xmlns:tns="http://dto.model.projectdirector.gs4tr.org/xsd" xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
|
5 |
+
elementFormDefault="qualified" attributeFormDefault="qualified">
|
6 |
+
<xs:import namespace="http://www.w3.org/2005/05/xmlmime"
|
7 |
+
schemaLocation="xmime.xsd" />
|
8 |
+
<xs:complexType name="Notification">
|
9 |
+
<xs:sequence>
|
10 |
+
<xs:element name="errorMessage" nillable="true" type="xs:string" />
|
11 |
+
<xs:element name="notificationDate" nillable="true" type="tns:Date" />
|
12 |
+
<xs:element name="notificationPriority" nillable="true"
|
13 |
+
type="tns:NotificationPriority" />
|
14 |
+
<xs:element name="notificationText" nillable="true" type="xs:string" />
|
15 |
+
</xs:sequence>
|
16 |
+
</xs:complexType>
|
17 |
+
<xs:complexType name="NotificationPriority">
|
18 |
+
<xs:sequence>
|
19 |
+
<xs:element name="notificationPriorityName" nillable="true"
|
20 |
+
type="xs:string" />
|
21 |
+
</xs:sequence>
|
22 |
+
</xs:complexType>
|
23 |
+
<xs:complexType name="Announcement">
|
24 |
+
<xs:sequence>
|
25 |
+
<xs:element name="announcementText" nillable="true" type="xs:string" />
|
26 |
+
<xs:element name="date" nillable="true" type="tns:Date" />
|
27 |
+
</xs:sequence>
|
28 |
+
</xs:complexType>
|
29 |
+
<xs:complexType name="ContentMonitorPluginInfo">
|
30 |
+
<xs:sequence>
|
31 |
+
<xs:element name="pluginId" nillable="true" type="xs:string" />
|
32 |
+
<xs:element name="pluginName" nillable="true" type="xs:string" />
|
33 |
+
</xs:sequence>
|
34 |
+
</xs:complexType>
|
35 |
+
<xs:complexType name="Date">
|
36 |
+
<xs:sequence>
|
37 |
+
<xs:element name="critical" type="xs:boolean" />
|
38 |
+
<xs:element name="date" type="xs:long" />
|
39 |
+
</xs:sequence>
|
40 |
+
</xs:complexType>
|
41 |
+
<xs:complexType name="Document">
|
42 |
+
<xs:sequence>
|
43 |
+
<xs:element name="documentGroup" nillable="true"
|
44 |
+
type="tns:DocumentGroup" />
|
45 |
+
<xs:element name="documentInfo" nillable="true"
|
46 |
+
type="tns:DocumentInfo" />
|
47 |
+
<xs:element name="id" nillable="true" type="xs:string" />
|
48 |
+
<xs:element name="sourceLanguage" nillable="true" type="tns:Language" />
|
49 |
+
<xs:element name="sourceWordCount" nillable="true" type="xs:int" />
|
50 |
+
<xs:element maxOccurs="unbounded" name="targets" nillable="true"
|
51 |
+
type="tns:Target" />
|
52 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
53 |
+
</xs:sequence>
|
54 |
+
</xs:complexType>
|
55 |
+
<xs:complexType name="DocumentGroup">
|
56 |
+
<xs:sequence>
|
57 |
+
<xs:element name="classifier" nillable="true" type="xs:string" />
|
58 |
+
<xs:element maxOccurs="unbounded" name="documents"
|
59 |
+
nillable="true" type="tns:Document" />
|
60 |
+
<xs:element name="mimeType" nillable="true" type="xs:string" />
|
61 |
+
<xs:element name="submission" nillable="true" type="tns:Submission" />
|
62 |
+
</xs:sequence>
|
63 |
+
</xs:complexType>
|
64 |
+
<xs:complexType name="DocumentInfo">
|
65 |
+
<xs:sequence>
|
66 |
+
<xs:element name="clientIdentifier" nillable="true" type="xs:string" />
|
67 |
+
<xs:element name="dateRequested" nillable="true" type="tns:Date" />
|
68 |
+
<xs:element name="instructions" nillable="true" type="xs:string" />
|
69 |
+
<xs:element name="metadata" nillable="true" maxOccurs="unbounded"
|
70 |
+
type="tns:Metadata" />
|
71 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
72 |
+
<xs:element name="projectTicket" nillable="true" type="xs:string" />
|
73 |
+
<xs:element name="sourceLocale" nillable="true" type="xs:string" />
|
74 |
+
<xs:element name="submissionTicket" nillable="true" type="xs:string" />
|
75 |
+
<xs:element maxOccurs="unbounded" name="targetInfos"
|
76 |
+
nillable="true" type="tns:TargetInfo" />
|
77 |
+
<xs:element name="wordCount" nillable="true" type="xs:int" />
|
78 |
+
</xs:sequence>
|
79 |
+
</xs:complexType>
|
80 |
+
<xs:complexType name="EntityTypeEnum">
|
81 |
+
<xs:sequence>
|
82 |
+
<xs:element name="name" type="xs:string" />
|
83 |
+
<xs:element name="value" type="xs:int" />
|
84 |
+
</xs:sequence>
|
85 |
+
</xs:complexType>
|
86 |
+
<xs:complexType name="FileFormatProfile">
|
87 |
+
<xs:sequence>
|
88 |
+
<xs:element name="configurable" nillable="true" type="xs:boolean" />
|
89 |
+
<xs:element name="isDefault" nillable="true" type="xs:boolean" />
|
90 |
+
<xs:element name="mimeType" nillable="true" type="xs:string" />
|
91 |
+
<xs:element name="pluginId" nillable="true" type="xs:string" />
|
92 |
+
<xs:element name="pluginName" nillable="true" type="xs:string" />
|
93 |
+
<xs:element name="profileName" nillable="true" type="xs:string" />
|
94 |
+
<xs:element name="rulesFileTicketId" nillable="true" type="xs:string" />
|
95 |
+
<xs:element name="sourceEncoding" nillable="true" type="xs:string" />
|
96 |
+
<xs:element name="targetEncoding" nillable="true" type="xs:string" />
|
97 |
+
<xs:element name="targetWorkflowDefinition" nillable="true"
|
98 |
+
type="tns:WorkflowDefinition" />
|
99 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
100 |
+
</xs:sequence>
|
101 |
+
</xs:complexType>
|
102 |
+
<xs:complexType name="FuzzyTmStatistics">
|
103 |
+
<xs:sequence>
|
104 |
+
<xs:element name="fuzzyName" nillable="true" type="xs:string" />
|
105 |
+
<xs:element name="wordCount" nillable="true" type="xs:int" />
|
106 |
+
</xs:sequence>
|
107 |
+
</xs:complexType>
|
108 |
+
<xs:complexType name="ItemFolderEnum">
|
109 |
+
<xs:sequence>
|
110 |
+
<xs:element name="value" type="xs:int" />
|
111 |
+
</xs:sequence>
|
112 |
+
</xs:complexType>
|
113 |
+
<xs:complexType name="ItemStatusEnum">
|
114 |
+
<xs:sequence>
|
115 |
+
<xs:element name="name" type="xs:string" />
|
116 |
+
<xs:element name="value" type="xs:int" />
|
117 |
+
</xs:sequence>
|
118 |
+
</xs:complexType>
|
119 |
+
<xs:complexType name="Language">
|
120 |
+
<xs:sequence>
|
121 |
+
<xs:element name="locale" nillable="true" type="xs:string" />
|
122 |
+
<xs:element name="value" nillable="true" type="xs:string" />
|
123 |
+
</xs:sequence>
|
124 |
+
</xs:complexType>
|
125 |
+
<xs:complexType name="LanguageDirection">
|
126 |
+
<xs:sequence>
|
127 |
+
<xs:element name="sourceLanguage" nillable="true" type="tns:Language" />
|
128 |
+
<xs:element name="targetLanguage" nillable="true" type="tns:Language" />
|
129 |
+
</xs:sequence>
|
130 |
+
</xs:complexType>
|
131 |
+
<xs:complexType name="Metadata">
|
132 |
+
<xs:sequence>
|
133 |
+
<xs:element name="key" nillable="true" type="xs:string" />
|
134 |
+
<xs:element name="value" nillable="true" type="xs:string" />
|
135 |
+
</xs:sequence>
|
136 |
+
</xs:complexType>
|
137 |
+
<xs:complexType name="Job">
|
138 |
+
<xs:sequence>
|
139 |
+
<xs:element maxOccurs="unbounded" name="alerts" nillable="true"
|
140 |
+
type="tns:Notification" />
|
141 |
+
<xs:element name="availableTasks" nillable="true" type="xs:long" />
|
142 |
+
<xs:element name="classifier" nillable="true" type="xs:string" />
|
143 |
+
<xs:element name="dateCreated" nillable="true" type="tns:Date" />
|
144 |
+
<xs:element name="dueDate" nillable="true" type="tns:Date" />
|
145 |
+
<xs:element name="fileCount" nillable="true" type="xs:long" />
|
146 |
+
<xs:element name="id" nillable="true" type="xs:string" />
|
147 |
+
<xs:element name="instructions" nillable="true" type="xs:string" />
|
148 |
+
<xs:element name="mimeType" nillable="true" type="xs:string" />
|
149 |
+
<xs:element name="priority" nillable="true" type="tns:Priority" />
|
150 |
+
<xs:element name="refPhase" nillable="true" type="tns:Phase" />
|
151 |
+
<xs:element name="sourceLanguage" nillable="true" type="tns:Language" />
|
152 |
+
<xs:element name="status" nillable="true" type="tns:ItemStatusEnum" />
|
153 |
+
<xs:element name="submission" nillable="true" type="tns:Submission" />
|
154 |
+
<xs:element name="targetLanguage" nillable="true" type="tns:Language" />
|
155 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
156 |
+
<xs:element name="tmStatistics" nillable="true" type="xs:string" />
|
157 |
+
<xs:element name="wordCount" nillable="true" type="xs:string" />
|
158 |
+
</xs:sequence>
|
159 |
+
</xs:complexType>
|
160 |
+
<xs:complexType name="JobPagedList">
|
161 |
+
<xs:sequence>
|
162 |
+
<xs:element maxOccurs="unbounded" name="elements"
|
163 |
+
nillable="true" type="tns:Job" />
|
164 |
+
<xs:element name="pagedListInfo" nillable="true"
|
165 |
+
type="tns:PagedListInfo" />
|
166 |
+
<xs:element maxOccurs="unbounded" name="tasks" nillable="true"
|
167 |
+
type="tns:Task" />
|
168 |
+
<xs:element name="totalCount" nillable="true" type="xs:long" />
|
169 |
+
</xs:sequence>
|
170 |
+
</xs:complexType>
|
171 |
+
<xs:complexType name="JobSearchRequest">
|
172 |
+
<xs:sequence>
|
173 |
+
<xs:element name="dateCreated" nillable="true" type="tns:Date" />
|
174 |
+
<xs:element name="folder" nillable="true" type="tns:ItemFolderEnum" />
|
175 |
+
<xs:element maxOccurs="unbounded" name="projectTickets"
|
176 |
+
nillable="true" type="xs:string" />
|
177 |
+
<xs:element name="sourceLocaleId" nillable="true" type="xs:string" />
|
178 |
+
<xs:element name="submissionTicket" nillable="true" type="xs:string" />
|
179 |
+
<xs:element name="targetLocaleId" nillable="true" type="xs:string" />
|
180 |
+
</xs:sequence>
|
181 |
+
</xs:complexType>
|
182 |
+
<xs:complexType name="PagedListInfo">
|
183 |
+
<xs:sequence>
|
184 |
+
<xs:element name="index" nillable="true" type="xs:int" />
|
185 |
+
<xs:element name="indexesSize" nillable="true" type="xs:int" />
|
186 |
+
<xs:element name="size" nillable="true" type="xs:int" />
|
187 |
+
<xs:element name="sortDirection" nillable="true" type="xs:string" />
|
188 |
+
<xs:element name="sortProperty" nillable="true" type="xs:string" />
|
189 |
+
</xs:sequence>
|
190 |
+
</xs:complexType>
|
191 |
+
<xs:complexType name="Phase">
|
192 |
+
<xs:sequence>
|
193 |
+
<xs:element name="dateEnded" nillable="true" type="tns:Date" />
|
194 |
+
<xs:element name="dueDate" nillable="true" type="tns:Date" />
|
195 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
196 |
+
<xs:element name="status" nillable="true" type="tns:ItemStatusEnum" />
|
197 |
+
</xs:sequence>
|
198 |
+
</xs:complexType>
|
199 |
+
<xs:complexType name="Policy">
|
200 |
+
<xs:sequence>
|
201 |
+
<xs:element name="category" nillable="true" type="xs:string" />
|
202 |
+
<xs:element name="policyId" nillable="true" type="xs:string" />
|
203 |
+
<xs:element name="policyType" nillable="true" type="tns:RoleTypeEnum" />
|
204 |
+
</xs:sequence>
|
205 |
+
</xs:complexType>
|
206 |
+
<xs:complexType name="Priority">
|
207 |
+
<xs:sequence>
|
208 |
+
<xs:element name="name" type="xs:string" />
|
209 |
+
<xs:element name="value" type="xs:int" />
|
210 |
+
</xs:sequence>
|
211 |
+
</xs:complexType>
|
212 |
+
<xs:complexType name="Project">
|
213 |
+
<xs:sequence>
|
214 |
+
<xs:element maxOccurs="unbounded" name="announcements"
|
215 |
+
nillable="true" type="tns:Announcement" />
|
216 |
+
<xs:element name="contentMonitorPluginInfo" nillable="true"
|
217 |
+
type="tns:ContentMonitorPluginInfo" />
|
218 |
+
<xs:element maxOccurs="unbounded" name="defaultLanguageDirections"
|
219 |
+
nillable="true" type="tns:LanguageDirection" />
|
220 |
+
<xs:element name="defaultTargetWorkflowDefinition"
|
221 |
+
nillable="true" type="tns:WorkflowDefinition" />
|
222 |
+
<xs:element name="defaultTargetWorkflowDefinitionTicket"
|
223 |
+
nillable="true" type="xs:string" />
|
224 |
+
<xs:element maxOccurs="unbounded" name="fileFormatProfiles"
|
225 |
+
nillable="true" type="tns:FileFormatProfile" />
|
226 |
+
<xs:element maxOccurs="unbounded" name="frequentLanguageDirections"
|
227 |
+
nillable="true" type="tns:LanguageDirection" />
|
228 |
+
<xs:element maxOccurs="unbounded" name="metadata"
|
229 |
+
nillable="true" type="tns:Metadata" />
|
230 |
+
<xs:element name="organizationName" nillable="true" type="xs:string" />
|
231 |
+
<xs:element name="projectInfo" nillable="true" type="tns:ProjectInfo" />
|
232 |
+
<xs:element maxOccurs="unbounded" name="projectLanguageDirections"
|
233 |
+
nillable="true" type="tns:LanguageDirection" />
|
234 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
235 |
+
<xs:element maxOccurs="unbounded" name="workflowDefinitions"
|
236 |
+
nillable="true" type="tns:WorkflowDefinition" />
|
237 |
+
</xs:sequence>
|
238 |
+
</xs:complexType>
|
239 |
+
<xs:complexType name="ProjectInfo">
|
240 |
+
<xs:sequence>
|
241 |
+
<xs:element name="clientIdentifier" nillable="true" type="xs:string" />
|
242 |
+
<xs:element name="defaultJobWorkflowDefinitionTicket"
|
243 |
+
nillable="true" type="xs:string" />
|
244 |
+
<xs:element name="defaultSubmissionWorkflowDefinitionTicket"
|
245 |
+
nillable="true" type="xs:string" />
|
246 |
+
<xs:element name="defaultTargetWorkflowDefinitionTicket"
|
247 |
+
nillable="true" type="xs:string" />
|
248 |
+
<xs:element name="enabled" nillable="true" type="xs:boolean" />
|
249 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
250 |
+
<xs:element name="shortCode" nillable="true" type="xs:string" />
|
251 |
+
</xs:sequence>
|
252 |
+
</xs:complexType>
|
253 |
+
<xs:complexType name="ProjectLanguage">
|
254 |
+
<xs:sequence>
|
255 |
+
<xs:element name="customLocaleCode" nillable="true" type="xs:string" />
|
256 |
+
<xs:element name="localeCode" nillable="true" type="xs:string" />
|
257 |
+
</xs:sequence>
|
258 |
+
</xs:complexType>
|
259 |
+
<xs:complexType name="RepositoryItem">
|
260 |
+
<xs:sequence>
|
261 |
+
<xs:element name="data" nillable="true" type="xmime:base64Binary" />
|
262 |
+
<xs:element name="resourceInfo" nillable="true"
|
263 |
+
type="tns:ResourceInfo" />
|
264 |
+
</xs:sequence>
|
265 |
+
</xs:complexType>
|
266 |
+
<xs:complexType name="ResourceInfo">
|
267 |
+
<xs:sequence>
|
268 |
+
<xs:element name="classifier" nillable="true" type="xs:string" />
|
269 |
+
<xs:element name="clientIdentifier" nillable="true" type="xs:string" />
|
270 |
+
<xs:element name="description" nillable="true" type="xs:string" />
|
271 |
+
<xs:element name="encoding" nillable="true" type="xs:string" />
|
272 |
+
<xs:element name="md5Checksum" nillable="true" type="xs:string" />
|
273 |
+
<xs:element name="mimeType" nillable="true" type="xs:string" />
|
274 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
275 |
+
<xs:element name="path" nillable="true" type="xs:string" />
|
276 |
+
<xs:element name="resourceInfoId" nillable="true" type="xs:long" />
|
277 |
+
<xs:element name="size" nillable="true" type="xs:long" />
|
278 |
+
<xs:element name="type" nillable="true" type="tns:ResourceType" />
|
279 |
+
</xs:sequence>
|
280 |
+
</xs:complexType>
|
281 |
+
<xs:complexType name="ResourceType">
|
282 |
+
<xs:sequence>
|
283 |
+
<xs:element name="value" type="xs:int" />
|
284 |
+
</xs:sequence>
|
285 |
+
</xs:complexType>
|
286 |
+
<xs:complexType name="Role">
|
287 |
+
<xs:sequence>
|
288 |
+
<xs:element maxOccurs="unbounded" name="policies"
|
289 |
+
nillable="true" type="tns:Policy" />
|
290 |
+
<xs:element name="roleId" nillable="true" type="xs:string" />
|
291 |
+
<xs:element name="roleInfo" nillable="true" type="tns:RoleInfo" />
|
292 |
+
<xs:element maxOccurs="unbounded" name="tasks" nillable="true"
|
293 |
+
type="tns:Task" />
|
294 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
295 |
+
</xs:sequence>
|
296 |
+
</xs:complexType>
|
297 |
+
<xs:complexType name="RoleInfo">
|
298 |
+
<xs:sequence>
|
299 |
+
<xs:element name="roleName" nillable="true" type="xs:string" />
|
300 |
+
<xs:element name="roleType" nillable="true" type="tns:RoleTypeEnum" />
|
301 |
+
</xs:sequence>
|
302 |
+
</xs:complexType>
|
303 |
+
<xs:complexType name="RoleTypeEnum">
|
304 |
+
<xs:sequence>
|
305 |
+
<xs:element name="value" type="xs:int" />
|
306 |
+
</xs:sequence>
|
307 |
+
</xs:complexType>
|
308 |
+
<xs:complexType name="Submission">
|
309 |
+
<xs:sequence>
|
310 |
+
<xs:element name="alerts" nillable="true" type="tns:Notification"
|
311 |
+
maxOccurs="unbounded" />
|
312 |
+
<xs:element name="availableTasks" nillable="true" type="xs:int" />
|
313 |
+
<xs:element name="dateCompleted" nillable="true" type="tns:Date" />
|
314 |
+
<xs:element name="dateCreated" nillable="true" type="tns:Date" />
|
315 |
+
<xs:element name="dateEstimated" nillable="true" type="tns:Date" />
|
316 |
+
<xs:element maxOccurs="unbounded" name="documents"
|
317 |
+
nillable="true" type="tns:Document" />
|
318 |
+
<xs:element name="dueDate" nillable="true" type="tns:Date" />
|
319 |
+
<xs:element name="id" nillable="true" type="xs:string" />
|
320 |
+
<xs:element name="owner" nillable="true" type="xs:string" />
|
321 |
+
<xs:element name="project" nillable="true" type="tns:Project" />
|
322 |
+
<xs:element name="status" nillable="true" type="tns:ItemStatusEnum" />
|
323 |
+
<xs:element name="submissionInfo" nillable="true"
|
324 |
+
type="tns:SubmissionInfo" />
|
325 |
+
<xs:element name="submitter" nillable="true" type="xs:string" />
|
326 |
+
<xs:element name="submitterFullName" nillable="true" type="xs:string" />
|
327 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
328 |
+
<xs:element name="workflowDefinition" nillable="true"
|
329 |
+
type="tns:WorkflowDefinition" />
|
330 |
+
</xs:sequence>
|
331 |
+
</xs:complexType>
|
332 |
+
<xs:complexType name="SubmissionInfo">
|
333 |
+
<xs:sequence>
|
334 |
+
<xs:element name="clientIdentifier" nillable="true" type="xs:string" />
|
335 |
+
<xs:element name="dateRequested" nillable="true" type="tns:Date" />
|
336 |
+
<xs:element name="metadata" nillable="true" maxOccurs="unbounded"
|
337 |
+
type="tns:Metadata" />
|
338 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
339 |
+
<xs:element name="projectTicket" nillable="true" type="xs:string" />
|
340 |
+
<xs:element name="submitter" nillable="true" type="xs:string" />
|
341 |
+
<xs:element name="workflowDefinitionTicket" nillable="true"
|
342 |
+
type="xs:string" />
|
343 |
+
</xs:sequence>
|
344 |
+
</xs:complexType>
|
345 |
+
<xs:complexType name="Target">
|
346 |
+
<xs:sequence>
|
347 |
+
<xs:element name="availableTasks" nillable="true" type="xs:long" />
|
348 |
+
<xs:element name="dateCompleted" nillable="true" type="tns:Date" />
|
349 |
+
<xs:element name="dateCreated" nillable="true" type="tns:Date" />
|
350 |
+
<xs:element name="dateEstimated" nillable="true" type="tns:Date" />
|
351 |
+
<xs:element name="document" nillable="true" type="tns:Document" />
|
352 |
+
<xs:element name="downloadThresholdTimeStamp" nillable="true"
|
353 |
+
type="tns:Date" />
|
354 |
+
<xs:element name="dueDate" nillable="true" type="tns:Date" />
|
355 |
+
<xs:element name="fileName" nillable="true" type="xs:string" />
|
356 |
+
<xs:element name="id" nillable="true" type="xs:string" />
|
357 |
+
<xs:element maxOccurs="unbounded" name="phases" nillable="true"
|
358 |
+
type="tns:Phase" />
|
359 |
+
<xs:element name="refPhase" nillable="true" type="tns:Phase" />
|
360 |
+
<xs:element name="sourceLanguage" nillable="true" type="tns:Language" />
|
361 |
+
<xs:element name="sourceWordCount" nillable="true" type="xs:int" />
|
362 |
+
<xs:element name="status" nillable="true" type="tns:ItemStatusEnum" />
|
363 |
+
<xs:element name="targetInfo" nillable="true" type="tns:TargetInfo" />
|
364 |
+
<xs:element name="targetLanguage" nillable="true" type="tns:Language" />
|
365 |
+
<xs:element name="targetWordCount" nillable="true" type="xs:int" />
|
366 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
367 |
+
<xs:element name="tmStatistics" nillable="true"
|
368 |
+
type="tns:TmStatistics" />
|
369 |
+
<xs:element name="workflowDefinition" nillable="true"
|
370 |
+
type="tns:WorkflowDefinition" />
|
371 |
+
</xs:sequence>
|
372 |
+
</xs:complexType>
|
373 |
+
<xs:complexType name="TargetInfo">
|
374 |
+
<xs:sequence>
|
375 |
+
<xs:element name="dateRequested" nillable="true" type="tns:Date" />
|
376 |
+
<xs:element name="encoding" nillable="true" type="xs:string" />
|
377 |
+
<xs:element name="instructions" nillable="true" type="xs:string" />
|
378 |
+
<xs:element name="metadata" nillable="true" maxOccurs="unbounded"
|
379 |
+
type="tns:Metadata" />
|
380 |
+
<xs:element name="priority" nillable="true" type="tns:Priority" />
|
381 |
+
<xs:element name="requestedDueDate" type="xs:long" />
|
382 |
+
<xs:element name="targetLocale" nillable="true" type="xs:string" />
|
383 |
+
<xs:element name="workflowDefinitionTicket" nillable="true"
|
384 |
+
type="xs:string" />
|
385 |
+
</xs:sequence>
|
386 |
+
</xs:complexType>
|
387 |
+
<xs:complexType name="Task">
|
388 |
+
<xs:sequence>
|
389 |
+
<xs:element name="groupName" nillable="true" type="xs:string" />
|
390 |
+
<xs:element name="selectStyle" nillable="true" type="xs:int" />
|
391 |
+
<xs:element name="taskId" nillable="true" type="xs:long" />
|
392 |
+
<xs:element name="taskName" nillable="true" type="xs:string" />
|
393 |
+
<xs:element name="weight" nillable="true" type="xs:int" />
|
394 |
+
</xs:sequence>
|
395 |
+
</xs:complexType>
|
396 |
+
<xs:complexType name="TaskModel">
|
397 |
+
<xs:sequence>
|
398 |
+
<xs:element maxOccurs="unbounded" name="metadata"
|
399 |
+
nillable="true" type="tns:Metadata" />
|
400 |
+
<xs:element name="parentEntityTicket" nillable="true"
|
401 |
+
type="xs:string" />
|
402 |
+
<xs:element name="taskTicket" nillable="true" type="xs:string" />
|
403 |
+
</xs:sequence>
|
404 |
+
</xs:complexType>
|
405 |
+
<xs:complexType name="TaskResponse">
|
406 |
+
<xs:sequence>
|
407 |
+
<xs:element maxOccurs="unbounded" name="metadata"
|
408 |
+
nillable="true" type="tns:Metadata" />
|
409 |
+
<xs:element name="repositoryItem" nillable="true"
|
410 |
+
type="tns:RepositoryItem" />
|
411 |
+
<xs:element name="responseTicket" nillable="true" type="xs:string" />
|
412 |
+
</xs:sequence>
|
413 |
+
</xs:complexType>
|
414 |
+
<xs:complexType name="TmStatistics">
|
415 |
+
<xs:sequence>
|
416 |
+
<xs:element name="fuzzyWordCount1" nillable="true"
|
417 |
+
type="tns:FuzzyTmStatistics" />
|
418 |
+
<xs:element name="fuzzyWordCount10" nillable="true"
|
419 |
+
type="tns:FuzzyTmStatistics" />
|
420 |
+
<xs:element name="fuzzyWordCount2" nillable="true"
|
421 |
+
type="tns:FuzzyTmStatistics" />
|
422 |
+
<xs:element name="fuzzyWordCount3" nillable="true"
|
423 |
+
type="tns:FuzzyTmStatistics" />
|
424 |
+
<xs:element name="fuzzyWordCount4" nillable="true"
|
425 |
+
type="tns:FuzzyTmStatistics" />
|
426 |
+
<xs:element name="fuzzyWordCount5" nillable="true"
|
427 |
+
type="tns:FuzzyTmStatistics" />
|
428 |
+
<xs:element name="fuzzyWordCount6" nillable="true"
|
429 |
+
type="tns:FuzzyTmStatistics" />
|
430 |
+
<xs:element name="fuzzyWordCount7" nillable="true"
|
431 |
+
type="tns:FuzzyTmStatistics" />
|
432 |
+
<xs:element name="fuzzyWordCount8" nillable="true"
|
433 |
+
type="tns:FuzzyTmStatistics" />
|
434 |
+
<xs:element name="fuzzyWordCount9" nillable="true"
|
435 |
+
type="tns:FuzzyTmStatistics" />
|
436 |
+
<xs:element name="goldWordCount" nillable="true" type="xs:int" />
|
437 |
+
<xs:element name="noMatchWordCount" nillable="true" type="xs:int" />
|
438 |
+
<xs:element name="oneHundredMatchWordCount" nillable="true"
|
439 |
+
type="xs:int" />
|
440 |
+
<xs:element name="repetitionWordCount" nillable="true"
|
441 |
+
type="xs:int" />
|
442 |
+
<xs:element name="totalWordCount" nillable="true" type="xs:int" />
|
443 |
+
</xs:sequence>
|
444 |
+
</xs:complexType>
|
445 |
+
<xs:complexType name="TiUserInfo">
|
446 |
+
<xs:sequence>
|
447 |
+
<xs:element name="languageDirections" nillable="true"
|
448 |
+
maxOccurs="unbounded" type="tns:LanguageDirection" />
|
449 |
+
<xs:element name="organizationId" nillable="true" type="xs:long" />
|
450 |
+
<xs:element name="projectRoles" nillable="true" maxOccurs="unbounded"
|
451 |
+
type="xs:string" />
|
452 |
+
<xs:element name="projectTicket" nillable="true"
|
453 |
+
maxOccurs="unbounded" type="xs:string" />
|
454 |
+
<xs:element name="systemRoles" nillable="true" maxOccurs="unbounded"
|
455 |
+
type="xs:string" />
|
456 |
+
<xs:element name="vendorId" nillable="true" type="xs:long" />
|
457 |
+
</xs:sequence>
|
458 |
+
</xs:complexType>
|
459 |
+
<xs:complexType name="UserInfo">
|
460 |
+
<xs:sequence>
|
461 |
+
<xs:element name="accountNonExpired" nillable="true" type="xs:boolean" />
|
462 |
+
<xs:element name="accountNonLocked" nillable="true" type="xs:boolean" />
|
463 |
+
<xs:element name="autoClaimMultipleTasks" nillable="true"
|
464 |
+
type="xs:boolean" />
|
465 |
+
<xs:element name="claimMultipleJobTasks" nillable="true"
|
466 |
+
type="xs:boolean" />
|
467 |
+
<xs:element name="credentialsNonExpired" nillable="true"
|
468 |
+
type="xs:boolean" />
|
469 |
+
<xs:element name="dateLastLogin" nillable="true" type="xs:dateTime" />
|
470 |
+
<xs:element name="emailAddress" nillable="true" type="xs:string" />
|
471 |
+
<xs:element name="emailNotification" nillable="true" type="xs:boolean" />
|
472 |
+
<xs:element name="enabled" nillable="true" type="xs:boolean" />
|
473 |
+
<xs:element name="firstName" nillable="true" type="xs:string" />
|
474 |
+
<xs:element name="lastName" nillable="true" type="xs:string" />
|
475 |
+
<xs:element name="password" nillable="true" type="xs:string" />
|
476 |
+
<xs:element name="timeZone" nillable="true" type="xs:string" />
|
477 |
+
<xs:element name="userName" nillable="true" type="xs:string" />
|
478 |
+
<xs:element name="userType" nillable="true" type="xs:string" />
|
479 |
+
</xs:sequence>
|
480 |
+
</xs:complexType>
|
481 |
+
<xs:complexType name="UserProfile">
|
482 |
+
<xs:sequence>
|
483 |
+
<xs:element name="availableTasks" nillable="true" type="xs:int" />
|
484 |
+
<xs:element name="organizationName" nillable="true" type="xs:string" />
|
485 |
+
<xs:element maxOccurs="unbounded" name="systemRoles"
|
486 |
+
nillable="true" type="tns:Role" />
|
487 |
+
<xs:element maxOccurs="unbounded" name="tasks" nillable="true"
|
488 |
+
type="tns:Task" />
|
489 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
490 |
+
<xs:element name="userInfo" nillable="true" type="tns:UserInfo" />
|
491 |
+
<xs:element name="vendorName" nillable="true" type="xs:string" />
|
492 |
+
</xs:sequence>
|
493 |
+
</xs:complexType>
|
494 |
+
<xs:complexType name="WorkflowDefinition">
|
495 |
+
<xs:sequence>
|
496 |
+
<xs:element name="description" nillable="true" type="xs:string" />
|
497 |
+
<xs:element name="name" nillable="true" type="xs:string" />
|
498 |
+
<xs:element name="ticket" nillable="true" type="xs:string" />
|
499 |
+
<xs:element name="type" nillable="true" type="tns:EntityTypeEnum" />
|
500 |
+
</xs:sequence>
|
501 |
+
</xs:complexType>
|
502 |
+
</xs:schema>
|
app/code/community/Transperfect/Globallink/controllers/Adminhtml/gl_ws/wsdl/xmime.xsd
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<!--
|
4 |
+
~ Licensed to the Apache Software Foundation (ASF) under one
|
5 |
+
~ or more contributor license agreements. See the NOTICE file
|
6 |
+
~ distributed with this work for additional information
|
7 |
+
~ regarding copyright ownership. The ASF licenses this file
|
8 |
+
~ to you under the Apache License, Version 2.0 (the
|
9 |
+
~ "License"); you may not use this file except in compliance
|
10 |
+
~ with the License. You may obtain a copy of the License at
|
11 |
+
~
|
12 |
+
~ http://www.apache.org/licenses/LICENSE-2.0
|
13 |
+
~
|
14 |
+
~ Unless required by applicable law or agreed to in writing,
|
15 |
+
~ software distributed under the License is distributed on an
|
16 |
+
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
17 |
+
~ KIND, either express or implied. See the License for the
|
18 |
+
~ specific language governing permissions and limitations
|
19 |
+
~ under the License.
|
20 |
+
-->
|
21 |
+
|
22 |
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
23 |
+
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
|
24 |
+
targetNamespace="http://www.w3.org/2005/05/xmlmime">
|
25 |
+
<xs:attribute name="contentType">
|
26 |
+
<xs:simpleType>
|
27 |
+
<xs:restriction base="xs:string">
|
28 |
+
<xs:minLength value="3" />
|
29 |
+
</xs:restriction>
|
30 |
+
</xs:simpleType>
|
31 |
+
</xs:attribute>
|
32 |
+
<xs:attribute name="expectedContentTypes" type="xs:string" />
|
33 |
+
<xs:complexType name="base64Binary">
|
34 |
+
<xs:simpleContent>
|
35 |
+
<xs:extension base="xs:base64Binary">
|
36 |
+
<xs:attribute ref="xmime:contentType" />
|
37 |
+
</xs:extension>
|
38 |
+
</xs:simpleContent>
|
39 |
+
</xs:complexType>
|
40 |
+
<xs:complexType name="hexBinary">
|
41 |
+
<xs:simpleContent>
|
42 |
+
<xs:extension base="xs:hexBinary">
|
43 |
+
<xs:attribute ref="xmime:contentType" />
|
44 |
+
</xs:extension>
|
45 |
+
</xs:simpleContent>
|
46 |
+
</xs:complexType>
|
47 |
+
</xs:schema>
|
app/code/community/Transperfect/Globallink/etc/config.xml
ADDED
@@ -0,0 +1,228 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Transperfect_Globallink>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Transperfect_Globallink>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<blocks>
|
10 |
+
<globallink>
|
11 |
+
<class>Transperfect_Globallink_Block</class>
|
12 |
+
</globallink>
|
13 |
+
</blocks>
|
14 |
+
<models>
|
15 |
+
<globallink>
|
16 |
+
<class>Transperfect_Globallink_Model</class>
|
17 |
+
<resourceModel>globallink_mysql4</resourceModel>
|
18 |
+
</globallink>
|
19 |
+
<globallink_mysql4>
|
20 |
+
<class>Transperfect_Globallink_Model_Mysql4</class>
|
21 |
+
<entities>
|
22 |
+
<glstatus>
|
23 |
+
<table>globallink_status</table>
|
24 |
+
</glstatus>
|
25 |
+
<glfield>
|
26 |
+
<table>globallink_field</table>
|
27 |
+
</glfield>
|
28 |
+
</entities>
|
29 |
+
</globallink_mysql4>
|
30 |
+
</models>
|
31 |
+
<events>
|
32 |
+
<catalog_product_save_before>
|
33 |
+
<observers>
|
34 |
+
<transperfect_globallink_product_update>
|
35 |
+
<type>singleton</type>
|
36 |
+
<class>Transperfect_Globallink_Model_Observer</class>
|
37 |
+
<method>product_update</method>
|
38 |
+
</transperfect_globallink_product_update>
|
39 |
+
</observers>
|
40 |
+
</catalog_product_save_before>
|
41 |
+
<catalog_category_prepare_save>
|
42 |
+
<observers>
|
43 |
+
<transperfect_globallink_category_update>
|
44 |
+
<type>singleton</type>
|
45 |
+
<class>Transperfect_Globallink_Model_Observer</class>
|
46 |
+
<method>category_update</method>
|
47 |
+
</transperfect_globallink_category_update>
|
48 |
+
</observers>
|
49 |
+
</catalog_category_prepare_save>
|
50 |
+
</events>
|
51 |
+
<helpers>
|
52 |
+
<globallink>
|
53 |
+
<class>Transperfect_Globallink_Helper</class>
|
54 |
+
</globallink>
|
55 |
+
</helpers>
|
56 |
+
<resources>
|
57 |
+
<globallink_setup>
|
58 |
+
<setup>
|
59 |
+
<module>Transperfect_Globallink</module>
|
60 |
+
<class> Transperfect_Globallink_Model_Resource_Mysql4_Setup</class>
|
61 |
+
</setup>
|
62 |
+
<connection>
|
63 |
+
<use>core_setup</use>
|
64 |
+
</connection>
|
65 |
+
</globallink_setup>
|
66 |
+
<globallink_write>
|
67 |
+
<connection>
|
68 |
+
<use>core_write</use>
|
69 |
+
</connection>
|
70 |
+
</globallink_write>
|
71 |
+
<globallink_read>
|
72 |
+
<connection>
|
73 |
+
<use>core_read</use>
|
74 |
+
</connection>
|
75 |
+
</globallink_read>
|
76 |
+
</resources>
|
77 |
+
</global>
|
78 |
+
<admin>
|
79 |
+
<routers>
|
80 |
+
<globallink>
|
81 |
+
<use>admin</use>
|
82 |
+
<args>
|
83 |
+
<module>Transperfect_Globallink</module>
|
84 |
+
<frontName>globallink</frontName>
|
85 |
+
</args>
|
86 |
+
</globallink>
|
87 |
+
</routers>
|
88 |
+
</admin>
|
89 |
+
<adminhtml>
|
90 |
+
<menu>
|
91 |
+
<globalLinkHeader translate="title" module="globallink">
|
92 |
+
<title>GlobalLink</title>
|
93 |
+
<sort_order>60</sort_order>
|
94 |
+
<children>
|
95 |
+
<globallink_sendfortranslation translate="title" module="globallink">
|
96 |
+
<title>Send for Translation</title>
|
97 |
+
<sort_order>10</sort_order>
|
98 |
+
<children>
|
99 |
+
<globallink_sendproduct translate="title" module="globallink">
|
100 |
+
<title>Products</title>
|
101 |
+
<action>globallink/adminhtml_glproduct</action>
|
102 |
+
<sort_order>10</sort_order>
|
103 |
+
</globallink_sendproduct>
|
104 |
+
<globallink_sendcategory translate="title" module="globallink">
|
105 |
+
<title>Product Categories</title>
|
106 |
+
<action>globallink/adminhtml_glcategory</action>
|
107 |
+
<sort_order>20</sort_order>
|
108 |
+
</globallink_sendcategory>
|
109 |
+
<globallink_sendproductattribute translate="title" module="globallink">
|
110 |
+
<title>Product Attributes</title>
|
111 |
+
<action>globallink/adminhtml_glproductattributes</action>
|
112 |
+
<sort_order>30</sort_order>
|
113 |
+
</globallink_sendproductattribute>
|
114 |
+
<globallink_sendcmspage translate="title" module="globallink">
|
115 |
+
<title>CMS Pages</title>
|
116 |
+
<action>globallink/adminhtml_glcmspage</action>
|
117 |
+
<sort_order>40</sort_order>
|
118 |
+
</globallink_sendcmspage>
|
119 |
+
<globallink_sendcmsblock translate="title" module="globallink">
|
120 |
+
<title>CMS Blocks</title>
|
121 |
+
<action>globallink/adminhtml_glcmsblock</action>
|
122 |
+
<sort_order>50</sort_order>
|
123 |
+
</globallink_sendcmsblock>
|
124 |
+
<globallink_sendemailtemplate translate="title" module="globallink">
|
125 |
+
<title>Transactional Emails</title>
|
126 |
+
<action>globallink/adminhtml_glemailtemplate</action>
|
127 |
+
<sort_order>60</sort_order>
|
128 |
+
</globallink_sendemailtemplate>
|
129 |
+
<globallink_sendnewslettertemplate translate="title" module="globallink">
|
130 |
+
<title>Newsletter Templates</title>
|
131 |
+
<action>globallink/adminhtml_glnewslettertemplate</action>
|
132 |
+
<sort_order>70</sort_order>
|
133 |
+
</globallink_sendnewslettertemplate>
|
134 |
+
</children>
|
135 |
+
</globallink_sendfortranslation>
|
136 |
+
<globallink_activesubmissionform module="globallink">
|
137 |
+
<title>Active Submissions</title>
|
138 |
+
<action>globallink/adminhtml_glactivesubmissions</action>
|
139 |
+
<sort_order>20</sort_order>
|
140 |
+
</globallink_activesubmissionform>
|
141 |
+
<globallink_receivetranslationsform module="globallink">
|
142 |
+
<title>Receive Translations</title>
|
143 |
+
<action>globallink/adminhtml_glreceivetranslations</action>
|
144 |
+
<sort_order>30</sort_order>
|
145 |
+
</globallink_receivetranslationsform>
|
146 |
+
<globallink_glfieldform module="globallink">
|
147 |
+
<title>Field Configuration</title>
|
148 |
+
<sort_order>40</sort_order>
|
149 |
+
<children>
|
150 |
+
<globallink_attributesets module="globallink">
|
151 |
+
<title>Product Attributes</title>
|
152 |
+
<action>globallink/adminhtml_attributesets</action>
|
153 |
+
<sort_order>10</sort_order>
|
154 |
+
</globallink_attributesets>
|
155 |
+
<globallink_categoryform translate="title" module="globallink">
|
156 |
+
<title>Product Categories</title>
|
157 |
+
<action>globallink/adminhtml_glfield/index/selected_object_type/catalog-category</action>
|
158 |
+
<sort_order>20</sort_order>
|
159 |
+
</globallink_categoryform>
|
160 |
+
<globallink_cmspageform translate="title" module="globallink">
|
161 |
+
<title>CMS Pages</title>
|
162 |
+
<action>globallink/adminhtml_glfield/index/selected_object_type/cms-page</action>
|
163 |
+
<sort_order>30</sort_order>
|
164 |
+
</globallink_cmspageform>
|
165 |
+
<globallink_cmsblockform translate="title" module="globallink">
|
166 |
+
<title>CMS Blocks</title>
|
167 |
+
<action>globallink/adminhtml_glfield/index/selected_object_type/cms-block</action>
|
168 |
+
<sort_order>40</sort_order>
|
169 |
+
</globallink_cmsblockform>
|
170 |
+
<globallink_emailform translate="title" module="globallink">
|
171 |
+
<title>Transactional Emails</title>
|
172 |
+
<action>globallink/adminhtml_glfield/index/selected_object_type/adminhtml-email_template</action>
|
173 |
+
<sort_order>50</sort_order>
|
174 |
+
</globallink_emailform>
|
175 |
+
<globallink_newsform translate="title" module="globallink">
|
176 |
+
<title>Newsletter Templates</title>
|
177 |
+
<action>globallink/adminhtml_glfield/index/selected_object_type/newsletter-template</action>
|
178 |
+
<sort_order>60</sort_order>
|
179 |
+
</globallink_newsform>
|
180 |
+
</children>
|
181 |
+
</globallink_glfieldform>
|
182 |
+
<globallink_configform translate="title" module="globallink">
|
183 |
+
<title>GlobalLink Configuration</title>
|
184 |
+
<sort_order>50</sort_order>
|
185 |
+
<children>
|
186 |
+
<globallink_configform translate="title" module="globallink">
|
187 |
+
<title>Settings</title>
|
188 |
+
<action>globallink/adminhtml_configuration</action>
|
189 |
+
<sort_order>10</sort_order>
|
190 |
+
</globallink_configform>
|
191 |
+
<globallink_configsets translate="title" module="globallink">
|
192 |
+
<title>Locale Mapping</title>
|
193 |
+
<action>globallink/adminhtml_localeconfig</action>
|
194 |
+
<sort_order>20</sort_order>
|
195 |
+
</globallink_configsets>
|
196 |
+
</children>
|
197 |
+
</globallink_configform>
|
198 |
+
</children>
|
199 |
+
</globalLinkHeader>
|
200 |
+
</menu>
|
201 |
+
<layout>
|
202 |
+
<updates>
|
203 |
+
<globallink>
|
204 |
+
<file>globallink.xml</file>
|
205 |
+
</globallink>
|
206 |
+
</updates>
|
207 |
+
</layout>
|
208 |
+
</adminhtml>
|
209 |
+
<acl>
|
210 |
+
<resources>
|
211 |
+
<all>
|
212 |
+
<title>Allow Everything</title>
|
213 |
+
</all>
|
214 |
+
</resources>
|
215 |
+
</acl>
|
216 |
+
<crontab>
|
217 |
+
<jobs>
|
218 |
+
<globallink_cron_update>
|
219 |
+
<schedule>
|
220 |
+
<cron_expr>*/5 * * * *</cron_expr>
|
221 |
+
</schedule>
|
222 |
+
<run>
|
223 |
+
<model>globallink/observer::run_cron</model>
|
224 |
+
</run>
|
225 |
+
</globallink_cron_update>
|
226 |
+
</jobs>
|
227 |
+
</crontab>
|
228 |
+
</config>
|
app/code/community/Transperfect/Globallink/sql/globallink_setup/mysql4-install-1.0.0.php
ADDED
@@ -0,0 +1,423 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
$installer = $this;
|
17 |
+
|
18 |
+
$installer->startSetup();
|
19 |
+
|
20 |
+
$installer->run("
|
21 |
+
|
22 |
+
|
23 |
+
--
|
24 |
+
-- Table structure for table `globallink_attribute_sets`
|
25 |
+
--
|
26 |
+
|
27 |
+
DROP TABLE IF EXISTS `globallink_attribute_sets`;
|
28 |
+
CREATE TABLE IF NOT EXISTS `globallink_attribute_sets` (
|
29 |
+
`attribute_set_id` int(11) unsigned NOT NULL,
|
30 |
+
`attribute_id` int(11) unsigned NOT NULL,
|
31 |
+
`attribute_code` varchar(255) NOT NULL,
|
32 |
+
`include_in_translation` tinyint(1) NOT NULL DEFAULT '1',
|
33 |
+
PRIMARY KEY (`attribute_set_id`,`attribute_id`)
|
34 |
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
35 |
+
|
36 |
+
-- --------------------------------------------------------
|
37 |
+
|
38 |
+
--
|
39 |
+
-- Table structure for table `globallink_field`
|
40 |
+
--
|
41 |
+
|
42 |
+
DROP TABLE IF EXISTS `globallink_field`;
|
43 |
+
CREATE TABLE IF NOT EXISTS `globallink_field` (
|
44 |
+
`globallink_field_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
45 |
+
`object_type` varchar(255) NOT NULL,
|
46 |
+
`field_code` varchar(255) NOT NULL,
|
47 |
+
`field_name` varchar(255) NOT NULL,
|
48 |
+
`include_in_translation` tinyint(1) NOT NULL DEFAULT '0',
|
49 |
+
`user_submitted` tinyint(1) NOT NULL DEFAULT '0',
|
50 |
+
PRIMARY KEY (`globallink_field_id`)
|
51 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
52 |
+
|
53 |
+
-- --------------------------------------------------------
|
54 |
+
|
55 |
+
--
|
56 |
+
-- Table structure for table `globallink_locale`
|
57 |
+
--
|
58 |
+
|
59 |
+
DROP TABLE IF EXISTS `globallink_locale`;
|
60 |
+
CREATE TABLE IF NOT EXISTS `globallink_locale` (
|
61 |
+
`gl_locale_code` varchar(10) NOT NULL,
|
62 |
+
`gl_locale_desc` varchar(255) NOT NULL,
|
63 |
+
`store_id` smallint(5) DEFAULT NULL,
|
64 |
+
`gl_default` tinyint(1) NOT NULL DEFAULT '0',
|
65 |
+
PRIMARY KEY (`gl_locale_code`)
|
66 |
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
67 |
+
|
68 |
+
-- --------------------------------------------------------
|
69 |
+
|
70 |
+
--
|
71 |
+
-- Table structure for table `globallink_projects`
|
72 |
+
--
|
73 |
+
|
74 |
+
DROP TABLE IF EXISTS `globallink_projects`;
|
75 |
+
CREATE TABLE IF NOT EXISTS `globallink_projects` (
|
76 |
+
`globallink_project_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
77 |
+
`globallink_url` varchar(255) NOT NULL DEFAULT '',
|
78 |
+
`project_short_code` varchar(255) NOT NULL DEFAULT '',
|
79 |
+
`classifier` varchar(255) NOT NULL DEFAULT '',
|
80 |
+
`mime_type` varchar(255) NOT NULL DEFAULT 'text/xml',
|
81 |
+
`files_per_submission` smallint(6) NOT NULL DEFAULT '9999',
|
82 |
+
`max_target_count` smallint(6) NOT NULL DEFAULT '9999',
|
83 |
+
PRIMARY KEY (`globallink_project_id`)
|
84 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
85 |
+
|
86 |
+
-- --------------------------------------------------------
|
87 |
+
|
88 |
+
--
|
89 |
+
-- Table structure for table `globallink_status`
|
90 |
+
--
|
91 |
+
|
92 |
+
DROP TABLE IF EXISTS `globallink_status`;
|
93 |
+
CREATE TABLE IF NOT EXISTS `globallink_status` (
|
94 |
+
`globallink_job_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
95 |
+
`globallink_user_id` int(11) unsigned NOT NULL,
|
96 |
+
`globallink_project_id` int(11) unsigned NOT NULL,
|
97 |
+
`object_type` varchar(255) NOT NULL DEFAULT 'catalog/product',
|
98 |
+
`object_id` int(11) unsigned NOT NULL,
|
99 |
+
`object_name` varchar(255) NOT NULL,
|
100 |
+
`document_name` text NOT NULL,
|
101 |
+
`document_id` text NOT NULL,
|
102 |
+
`submission_name` text NOT NULL,
|
103 |
+
`submission_id` text NOT NULL,
|
104 |
+
`gl_source_locale` varchar(10) NOT NULL,
|
105 |
+
`gl_target_locale` varchar(10) NOT NULL,
|
106 |
+
`create_date` bigint(20) NOT NULL,
|
107 |
+
`update_date` bigint(20) NOT NULL,
|
108 |
+
`due_date` bigint(20) NOT NULL,
|
109 |
+
`status` varchar(255) NOT NULL,
|
110 |
+
`submission_type` varchar(255) NOT NULL DEFAULT 'Manual',
|
111 |
+
`submitter` varchar(255) NOT NULL,
|
112 |
+
`last_modified` bigint(20) DEFAULT NULL,
|
113 |
+
`changed` tinyint(1) NOT NULL DEFAULT '0',
|
114 |
+
`extra` text DEFAULT NULL,
|
115 |
+
PRIMARY KEY (`globallink_job_id`)
|
116 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
117 |
+
|
118 |
+
-- --------------------------------------------------------
|
119 |
+
|
120 |
+
--
|
121 |
+
-- Table structure for table `globallink_settings`
|
122 |
+
--
|
123 |
+
|
124 |
+
DROP TABLE IF EXISTS `globallink_settings`;
|
125 |
+
CREATE TABLE IF NOT EXISTS `globallink_settings` (
|
126 |
+
`gl_setting_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
127 |
+
`gl_setting_name` mediumblob DEFAULT NULL,
|
128 |
+
`gl_setting_info` smallint(5) DEFAULT NULL,
|
129 |
+
`gl_setting_extra` text DEFAULT NULL,
|
130 |
+
PRIMARY KEY (`gl_setting_id`)
|
131 |
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
132 |
+
|
133 |
+
--
|
134 |
+
-- Insert locales
|
135 |
+
--
|
136 |
+
|
137 |
+
INSERT INTO `globallink_settings` ( `gl_setting_name`) VALUES ('gl_logging');
|
138 |
+
INSERT INTO `globallink_settings` ( `gl_setting_name`) VALUES ('gl_cron');
|
139 |
+
|
140 |
+
-- --------------------------------------------------------
|
141 |
+
|
142 |
+
--
|
143 |
+
-- Table structure for table `globallink_users`
|
144 |
+
--
|
145 |
+
|
146 |
+
DROP TABLE IF EXISTS `globallink_users`;
|
147 |
+
CREATE TABLE IF NOT EXISTS `globallink_users` (
|
148 |
+
`globallink_user_id` int(11) NOT NULL AUTO_INCREMENT,
|
149 |
+
`globallink_user_name` varchar(255) NOT NULL,
|
150 |
+
`globallink_user_password` varchar(255) NOT NULL,
|
151 |
+
PRIMARY KEY (`globallink_user_id`)
|
152 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
153 |
+
|
154 |
+
--
|
155 |
+
-- Insert locales
|
156 |
+
--
|
157 |
+
|
158 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('aa-DJ', 'Afar, Djibouti');
|
159 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('aa-ER', 'Afar, Eritrea');
|
160 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('aa-ET', 'Afar, Ethiopia');
|
161 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ab-GE', 'Abkhazian, Georgia');
|
162 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ae-ES', 'Spain, Aranese');
|
163 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('af-NA', 'Afrikaans, Namibia');
|
164 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('af-ZA', 'Afrikaans, South Africa');
|
165 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('am-ET', 'Amharic, Ethiopia');
|
166 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('an-ES', 'Aragonese, Spain');
|
167 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-AE', 'Arabic, United Arab Emirates');
|
168 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-BH', 'Arabic, Bahrain');
|
169 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-DZ', 'Arabic, Algeria');
|
170 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-EG', 'Arabic, Egypt');
|
171 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-IQ', 'Arabic, Iraq');
|
172 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-JO', 'Arabic, Jordan');
|
173 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-KW', 'Arabic, Kuwait');
|
174 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-LB', 'Arabic, Lebanon');
|
175 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-LY', 'Arabic, Libya');
|
176 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-MA', 'Arabic, Morocco');
|
177 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-OM', 'Arabic, Oman');
|
178 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-QA', 'Arabic, Qatar');
|
179 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-SA', 'Arabic, Saudi Arabia');
|
180 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-SD', 'Arabic, Sudan');
|
181 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-SY', 'Arabic, Syria');
|
182 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-TN', 'Arabic, Tunisia');
|
183 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ar-YE', 'Arabic, Yemen');
|
184 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('as-IN', 'Assamese, India');
|
185 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ay-BO', 'Aymara, Bolivia');
|
186 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ay-PE', 'Aymara, Peru');
|
187 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('az-AZ', 'Azerbaijani, Azerbaijan');
|
188 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ba-RU', 'Bashkir, Russia');
|
189 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('bd-ID', 'Bahasa, Indonesia');
|
190 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('bd-MY', 'Bahasa, Malaysia');
|
191 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('be-BY', 'Byelorussian, Byelorussia');
|
192 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('bg-BG', 'Bulgarian, Bulgaria');
|
193 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('bn-BD', 'Bengali, Bangladesh');
|
194 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('bn-IN', 'Bengali, India');
|
195 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('bo-CN', 'Tibetan, China');
|
196 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ca-ES', 'Catalan, Spain');
|
197 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('cb-PH', 'Cebuano, Philippines');
|
198 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('cs-CZ', 'Czech, Czech Republic');
|
199 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('cy-GB', 'Welsh, United Kingdom');
|
200 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('da-DK', 'Danish, Denmark');
|
201 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('de-AT', 'German, Austria');
|
202 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('de-CH', 'German, Switzerland');
|
203 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('de-DE', 'German, Germany');
|
204 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('de-LI', 'German, Liechtenstein');
|
205 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('de-LU', 'German, Luxembourg');
|
206 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('el-CY', 'Greek, Cyprus');
|
207 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('el-GR', 'Greek, Greece');
|
208 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-AU', 'English, Australia');
|
209 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-BZ', 'English, Belize');
|
210 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-CA', 'English, Canada');
|
211 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-CB', 'English, Caribbean');
|
212 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-GB', 'English, United Kingdom');
|
213 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-ID', 'English, Indonesia');
|
214 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-IE', 'English, Ireland');
|
215 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-IN', 'English, India');
|
216 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-JM', 'English, Jamaica');
|
217 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-MT', 'English, Malta');
|
218 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-NZ', 'English, New Zealand');
|
219 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-PH', 'English, Philippines');
|
220 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-RH', 'English, Zimbabwe');
|
221 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-SG', 'English, Singapore');
|
222 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-TT', 'English, Trinidad and Tobago');
|
223 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-US', 'English, United States');
|
224 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('en-ZA', 'English, South Africa');
|
225 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-AR', 'Spanish, Argentina');
|
226 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-BO', 'Spanish, Bolivia');
|
227 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-CL', 'Spanish, Chile');
|
228 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-CO', 'Spanish, Colombia');
|
229 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-CR', 'Spanish, Costa Rica');
|
230 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-DO', 'Spanish, Dominican Republic');
|
231 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-EC', 'Spanish, Ecuador');
|
232 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-ES', 'Spanish, Spain');
|
233 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-GT', 'Spanish, Guatemala');
|
234 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-HN', 'Spanish, Honduras');
|
235 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-LA', 'Spanish, Latin America');
|
236 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-MX', 'Spanish, Mexico');
|
237 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-NI', 'Spanish, Nicaragua');
|
238 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-PA', 'Spanish, Panama');
|
239 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-PE', 'Spanish, Peru');
|
240 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-PR', 'Spanish, Puerto Rico');
|
241 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-PY', 'Spanish, Paraguay');
|
242 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-SV', 'Spanish, El Salvador');
|
243 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-US', 'Spanish, United States');
|
244 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-UY', 'Spanish, Uruguay');
|
245 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('es-VE', 'Spanish, Venezuela');
|
246 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('et-EE', 'Estonian, Estonia');
|
247 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('eu-ES', 'Basque, Spain');
|
248 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fa-AF', 'Persian-Dari, Afghanistan');
|
249 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fa-IR', 'Farsi, Iran');
|
250 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fi-FI', 'Finnish, Finland');
|
251 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fj-FJ', 'Fijian, Fiji');
|
252 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fo-FO', 'Faroese, Faroe Islands');
|
253 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fr-BE', 'French, Belgium');
|
254 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fr-CA', 'French, Canada');
|
255 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fr-CH', 'French, Switzerland');
|
256 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fr-FR', 'French, France');
|
257 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fr-LU', 'French, Luxembourg');
|
258 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fr-MC', 'French, Monaco');
|
259 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fr-NC', 'French, New Caledonia');
|
260 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fr-PF', 'French, French Polynesia');
|
261 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fy-NL', 'Frisian, Netherlands');
|
262 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ga-IE', 'Irish Gaelic, Ireland');
|
263 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('gd-GB', 'Scottish Gaelic, United Kingdom');
|
264 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('gl-ES', 'Galician, Spain');
|
265 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('gs-ES', 'Gascon, Spain');
|
266 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('gu-IN', 'Gujarati, India');
|
267 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('he-IL', 'Hebrew, Israel');
|
268 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('hi-IN', 'Hindi, India');
|
269 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('hr-HR', 'Croatian, Croatia');
|
270 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('hu-HU', 'Hungarian, Hungary');
|
271 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('hy-AM', 'Armenian, Armenia');
|
272 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('id-ID', 'Indonesian, Indonesia');
|
273 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('is-IS', 'Icelandic, Iceland');
|
274 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('it-CH', 'Italian, Switzerland');
|
275 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('it-IT', 'Italian, Italy');
|
276 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ja-JP', 'Japanese, Japan');
|
277 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ka-GE', 'Georgian, Georgia');
|
278 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('km-KH', 'Khmer, Cambodia');
|
279 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('kn-IN', 'Kannada, India');
|
280 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ko-KR', 'Korean, South Korea');
|
281 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ko-KP', 'Korean, North Korea');
|
282 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ku-TR', 'Kurdish, Turkey');
|
283 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('lb-LU', 'Luxembourgish, Luxembourg');
|
284 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ln-CD', 'Lingala, The Democratic Republic Of Congo');
|
285 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('lo-LA', 'Lao, Laos');
|
286 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('lt-LT', 'Lithuanian, Lithuania');
|
287 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('lv-LV', 'Latvian, Latvia');
|
288 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('mg-MG', 'Malagasy, Madagascar');
|
289 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('mk-MK', 'Macedonian, Macedonia');
|
290 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ml-IN', 'Malayalam, India');
|
291 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('mn-MN', 'Mongolian, Mongolia');
|
292 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('mo-MD', 'Moldovan, Moldova');
|
293 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('mr-IN', 'Marathi, India');
|
294 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ms-BX', 'Malay, Brunei Darussalam');
|
295 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ms-MY', 'Malay, Malaysia');
|
296 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('mt-MT', 'Maltese, Malta');
|
297 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('my-MM', 'Burmese, MyanMar (Burma)');
|
298 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('nb-NO', 'Norwegian Bokmal, Norway');
|
299 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('nd-ZA', 'North Ndebele, South Africa');
|
300 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ne-NP', 'Nepali, Nepal');
|
301 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('nl-BE', 'Dutch, Belgium');
|
302 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('nl-NL', 'Dutch, Netherlands');
|
303 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('no-NO', 'Norwegian (Nynorsk), Norway');
|
304 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('nr-ZA', 'South Ndebele, South Africa');
|
305 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ns-ZA', 'Nothern Sotho, South Africa');
|
306 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ny-MW', 'Nyanja, Malawi');
|
307 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('oc-FR', 'Occitan, France');
|
308 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('om-ET', 'Oromo, Ethiopia');
|
309 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('or-IN', 'Oriya, India');
|
310 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('pa-IN', 'Punjabi (Gurmukha), India');
|
311 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('pa-PK', 'Punjabi (Shahmukhi), Pakistan');
|
312 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('pl-PL', 'Polish, Poland');
|
313 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ps-AF', 'Pashto, Afghanistan');
|
314 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('pt-BR', 'Portuguese, Brazil');
|
315 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('pt-PT', 'Portuguese, Portugal');
|
316 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('qu-BO', 'Quechua, Bolivia');
|
317 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('qu-EU', 'Quechua, Ecuador');
|
318 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ro-RO', 'Romanian, Romania');
|
319 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ru-RU', 'Russian, Russia');
|
320 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('rw-RW', 'Kinyarwanda, Rwanda');
|
321 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('sh-YU', 'Serbo_Croatian, Yugoslavia');
|
322 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('si-LK', 'Sinhalese, Sri Lanka');
|
323 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('sk-SK', 'Slovak, Slovakia');
|
324 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('sl-SL', 'Slovenian, Slovenia');
|
325 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('so-SO', 'Somali, Somalia');
|
326 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('sq-AL', 'Albanian, Albania');
|
327 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('sr-BA', 'Serbian, Bosnia and Herzegovina');
|
328 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('sr-CS', 'Serbian, Serbia and Montenegro');
|
329 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('sr-ME', 'Serbian, Montenegro');
|
330 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('sr-YU', 'Serbian (Cyrillic), Yugoslavia');
|
331 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ss-ZA', 'Swati, South Africa');
|
332 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('st-ZA', 'Southern Sotho, South Africa');
|
333 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('su-SU', 'Sudanese, Sudan');
|
334 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('sv-FI', 'Swedish, Finland');
|
335 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('sv-SE', 'Swedish, Sweden');
|
336 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('sw-KE', 'Swahili, Kenya');
|
337 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('tg-TJ', 'Tajik, Tajikistan');
|
338 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('th-TH', 'Thai, Thailand');
|
339 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ta-IN', 'Tamil, India');
|
340 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('tl-PH', 'Tagalog, Philippines');
|
341 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('tn-ZA', 'Tswana, South Africa');
|
342 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('tr-TR', 'Turkish, Turkey');
|
343 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ts-ZA', 'Tsonga, South Africa');
|
344 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('uk-UA', 'Ukrainian, Ukraine');
|
345 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ur-PK', 'Urdu (Pakistan), Pakistan');
|
346 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ve-ZA', 'Venda, South Africa');
|
347 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('vi-VN', 'Vietnamese, Vietnam');
|
348 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('uz-UZ', 'Uzbek, Uzbekistan');
|
349 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('xh-ZA', 'Xhosa, South Africa');
|
350 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('zh-CN', 'Chinese (Simplified), China');
|
351 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('zh-HK', 'Chinese, Hong Kong');
|
352 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('zh-SG', 'Chinese (Simplified), Singapore');
|
353 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('zh-TW', 'Chinese (Traditional), Taiwan');
|
354 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('zh-XM', 'Chinese, Macau');
|
355 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('zu-ZA', 'Zulu, South Africa');
|
356 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('kk-KZ', 'Kazakh, Kazakhstan');
|
357 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ru-KZ', 'Russian, Kazakhstan');
|
358 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ky-KG', 'Kirghiz, Kyrgyzstan');
|
359 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ru-KG', 'Russian, Kyrgyzstan');
|
360 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ru-UA', 'Russian, Ukraine');
|
361 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ru-BY', 'Russian, Belarus');
|
362 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('fj-PH', 'Fijian, Philippines');
|
363 |
+
INSERT INTO `globallink_locale` ( `gl_locale_code`, `gl_locale_desc`) VALUES ('ms-SG', 'Malay, Singapore');
|
364 |
+
|
365 |
+
|
366 |
+
--
|
367 |
+
-- Insert field data for non product types
|
368 |
+
--
|
369 |
+
|
370 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('cms/page', 'title', 'Page title', 1);
|
371 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('cms/page', 'content_heading', 'Content Heading', 1);
|
372 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('cms/page', 'content', 'Content', 1);
|
373 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('cms/page', 'meta_keywords', 'Meta Keywords', 1);
|
374 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('cms/page', 'meta_description', 'Meta Description', 1);
|
375 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('cms/block', 'content', 'Content', 1);
|
376 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('catalog/category', 'name', 'Name', 1);
|
377 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('catalog/category', 'description', 'Description', 1);
|
378 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('catalog/category', 'meta_title', 'Page Title', 1);
|
379 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('catalog/category', 'meta_keywords', 'Meta Keywords', 1);
|
380 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('catalog/category', 'meta_description', 'Meta Description', 1);
|
381 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('adminhtml/email_template', 'template_subject', 'Template Subject', 1);
|
382 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('adminhtml/email_template', 'template_text', 'Template Content', 1);
|
383 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('newsletter/template', 'template_subject', 'Template Subject', 1);
|
384 |
+
INSERT INTO `globallink_field` (`object_type`, `field_code`, `field_name`, `include_in_translation`) VALUES('newsletter/template', 'template_text', 'Template Content', 1);
|
385 |
+
|
386 |
+
");
|
387 |
+
|
388 |
+
|
389 |
+
// Insert Attribute Set data for Products
|
390 |
+
$entityTypeId = Mage::getModel('eav/entity')
|
391 |
+
->setType('catalog_product')
|
392 |
+
->getTypeId();
|
393 |
+
|
394 |
+
$attributeSetCollection = Mage::getModel('eav/entity_attribute_set')
|
395 |
+
->getCollection()
|
396 |
+
->setEntityTypeFilter($entityTypeId);
|
397 |
+
|
398 |
+
foreach ($attributeSetCollection as $_attributeSet) {
|
399 |
+
$arr = $_attributeSet->getData();
|
400 |
+
$attribute_set_id = $arr['attribute_set_id'];
|
401 |
+
|
402 |
+
$attributes = Mage::getModel('catalog/product_attribute_api')->items($attribute_set_id);
|
403 |
+
$attr_arr = array();
|
404 |
+
foreach ($attributes as $attr) {
|
405 |
+
$attribute = Mage::getModel('eav/entity_attribute')->load($attr['attribute_id']);
|
406 |
+
if ($attribute->getIsVisible() && !$attribute->getIsGlobal()) {
|
407 |
+
if ($attribute->getFrontendInput() == 'text' || $attribute->getFrontendInput() == 'textarea') {
|
408 |
+
$attr_arr[$attr['attribute_id']] = array('attribute_set_id' => $attribute_set_id, 'attribute_id' => $attr['attribute_id'],
|
409 |
+
'attribute_code' => $attribute->getAttributeCode(), 'attribute_type' => $attribute->getFrontendInput(), 'attribute_name' => $attribute->getFrontendLabel());
|
410 |
+
}
|
411 |
+
}
|
412 |
+
}
|
413 |
+
$insert_arr = array();
|
414 |
+
foreach ($attr_arr as $_att_id => $_attribute) {
|
415 |
+
$insert_arr[$_att_id]['attribute'] = $_attribute;
|
416 |
+
$insert_arr[$_att_id]['translatable'] = 1;
|
417 |
+
}
|
418 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Attribute Array]", $attr_arr);
|
419 |
+
Mage::helper("globallink")->delete_and_update_attribute_set_config($attribute_set_id, $insert_arr);
|
420 |
+
}
|
421 |
+
|
422 |
+
$installer->endSetup();
|
423 |
+
|
app/code/community/Transperfect/Globallink/transperfect_cron_sample.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* � 2013 Translations.com, a TransPerfect company
|
3 |
+
* Translations.com, Inc., its affiliates and its licensors (collectively, �Translations.com�) own all right, title and interest,
|
4 |
+
* including but not limited to all intellectual property rights, in and to this software and all associated documentation, updates,
|
5 |
+
* new releases and work product, if any (collectively, the �Software�), in both object code and source code formats.
|
6 |
+
*
|
7 |
+
* By making use of the Software, you agree
|
8 |
+
* (i) to reproduce the copyright, trademark and other proprietary notices contained on or in the Software as delivered to you (including this Notice)
|
9 |
+
* on any reproductions you cause to be made of the Software and further agree not to remove any such notices (including this Notice) from the Software or any copies thereof;
|
10 |
+
* (ii) the Software shall not be further licensed, sold or otherwise transferred by you, except if otherwise approved in writing by an authorized Translations.com representative;
|
11 |
+
* (iii) not to release the results of any benchmark testing of the Software or use any trademark, logo or proprietary notice of Translations.com (except as required by this Notice or law) without Translations.com�s prior written approval; and
|
12 |
+
* (iv) you shall not modify, change nor create any derivative works of the Software.
|
13 |
+
* Any derivative works of the Software created by you, your employees, agents, or contractors, including any and all modifications or changes to the Software, in any format whatsoever, shall be the exclusive property of Translations.com.
|
14 |
+
*/
|
15 |
+
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Move this file in magento root folder and rename to transperfect_cron.php.
|
19 |
+
* Add a new cron job in the operating system cron and set the time interval as desired.
|
20 |
+
* In the cron tab, execute the URL - http://magento_site_url/transperfect_cron.php
|
21 |
+
* Also, for security add the following lines to the .htaccess file in your Magento install root folder.
|
22 |
+
* <Files "transperfect_cron.php">
|
23 |
+
* Order deny,allow
|
24 |
+
* Allow from xxx.xxx.xxx.xxx
|
25 |
+
* Deny from all
|
26 |
+
* </Files>
|
27 |
+
*/
|
28 |
+
require_once getcwd() . '/app/code/community/Transperfect/Globallink/Model/Observer.php';
|
29 |
+
|
30 |
+
$gl_cron_enabled = Mage::helper("globallink")->setting_enabled('gl_cron');
|
31 |
+
if ($gl_cron_enabled == 2) {
|
32 |
+
Transperfect_Globallink_Model_Observer::update_translated_contents_automatically('transperfec_cron.php');
|
33 |
+
}
|
app/design/adminhtml/default/default/layout/globallink.xml
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout>
|
3 |
+
<adminhtml_catalog_product_edit>
|
4 |
+
<reference name="product_tabs">
|
5 |
+
<action method="addTab">
|
6 |
+
<name>my_global_link_tab</name>
|
7 |
+
<block>globallink/adminhtml_catalog_product_adaptor</block>
|
8 |
+
</action>
|
9 |
+
</reference>
|
10 |
+
</adminhtml_catalog_product_edit>
|
11 |
+
<globallink_adminhtml_glproduct_index>
|
12 |
+
<reference name="content">
|
13 |
+
<block type="globallink/adminhtml_glproduct" name="glproduct"/>
|
14 |
+
</reference>
|
15 |
+
</globallink_adminhtml_glproduct_index>
|
16 |
+
<globallink_adminhtml_glcategory_index>
|
17 |
+
<reference name="content">
|
18 |
+
<block type="globallink/adminhtml_glcategory" name="glcategory"/>
|
19 |
+
</reference>
|
20 |
+
</globallink_adminhtml_glcategory_index>
|
21 |
+
<globallink_adminhtml_glcmspage_index>
|
22 |
+
<reference name="content">
|
23 |
+
<block type="globallink/adminhtml_glcmspage" name="glcmspage"/>
|
24 |
+
</reference>
|
25 |
+
</globallink_adminhtml_glcmspage_index>
|
26 |
+
<globallink_adminhtml_glcmsblock_index>
|
27 |
+
<reference name="content">
|
28 |
+
<block type="globallink/adminhtml_glcmsblock" name="glcmsblock"/>
|
29 |
+
</reference>
|
30 |
+
</globallink_adminhtml_glcmsblock_index>
|
31 |
+
<globallink_adminhtml_glemailtemplate_index>
|
32 |
+
<reference name="content">
|
33 |
+
<block type="globallink/adminhtml_glemailtemplate" name="glemailtemplate"/>
|
34 |
+
</reference>
|
35 |
+
</globallink_adminhtml_glemailtemplate_index>
|
36 |
+
<globallink_adminhtml_glnewslettertemplate_index>
|
37 |
+
<reference name="content">
|
38 |
+
<block type="globallink/adminhtml_glnewslettertemplate" name="glnewslettertemplate"/>
|
39 |
+
</reference>
|
40 |
+
</globallink_adminhtml_glnewslettertemplate_index>
|
41 |
+
<globallink_adminhtml_glactivesubmissions_index>
|
42 |
+
<reference name="content">
|
43 |
+
<block type="globallink/adminhtml_glactivesubmissions" name="glactivesubmissions"/>
|
44 |
+
</reference>
|
45 |
+
</globallink_adminhtml_glactivesubmissions_index>
|
46 |
+
<globallink_adminhtml_glreceivetranslations_index>
|
47 |
+
<reference name="content">
|
48 |
+
<block type="globallink/adminhtml_glreceivetranslations" name="glreceivetranslations"/>
|
49 |
+
</reference>
|
50 |
+
</globallink_adminhtml_glreceivetranslations_index>
|
51 |
+
<globallink_adminhtml_glfield_index>
|
52 |
+
<reference name="content">
|
53 |
+
<block type="globallink/adminhtml_glfield" name="glfield"/>
|
54 |
+
</reference>
|
55 |
+
</globallink_adminhtml_glfield_index>
|
56 |
+
<globallink_adminhtml_glproductattributes_index>
|
57 |
+
<reference name="content">
|
58 |
+
<block type="globallink/adminhtml_glproductattributes" name="glproductattributes"/>
|
59 |
+
</reference>
|
60 |
+
</globallink_adminhtml_glproductattributes_index>
|
61 |
+
</layout>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/attributesets.phtml
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<?php
|
3 |
+
try {
|
4 |
+
$attr_set_selected = $this->getRequest()->getParam('selected_attributeset_value');
|
5 |
+
$entityTypeId = Mage::getModel('eav/entity')
|
6 |
+
->setType('catalog_product')
|
7 |
+
->getTypeId();
|
8 |
+
|
9 |
+
$attributeSetCollection = Mage::getModel('eav/entity_attribute_set')
|
10 |
+
->getCollection()
|
11 |
+
->setEntityTypeFilter($entityTypeId);
|
12 |
+
$attribute_set_arr = array();
|
13 |
+
|
14 |
+
foreach ($attributeSetCollection as $_attributeSet) {
|
15 |
+
$arr = $_attributeSet->getData();
|
16 |
+
$set_id = $arr['attribute_set_id'];
|
17 |
+
$attribute_set_arr[$arr['attribute_set_id']] = $arr['attribute_set_name'];
|
18 |
+
}
|
19 |
+
|
20 |
+
if ($attr_set_selected != '') {
|
21 |
+
$db_arr = Mage::helper("globallink")->get_attribute_set_config($attr_set_selected);
|
22 |
+
$attributes = Mage::getModel('catalog/product_attribute_api')->items($attr_set_selected);
|
23 |
+
$attr_arr = array();
|
24 |
+
foreach ($attributes as $attr) {
|
25 |
+
$attribute = Mage::getModel('eav/entity_attribute')->load($attr['attribute_id']);
|
26 |
+
if ($attribute->getIsVisible() && !$attribute->getIsGlobal()) {
|
27 |
+
if ($attribute->getFrontendInput() == 'text' || $attribute->getFrontendInput() == 'textarea') {
|
28 |
+
$attr_arr[$attr['attribute_id']] = array('attribute_set_id' => $set_id, 'attribute_id' => $attr['attribute_id'],
|
29 |
+
'attribute_code' => $attribute->getAttributeCode(), 'attribute_type' => $attribute->getFrontendInput(), 'attribute_name' => $attribute->getFrontendLabel());
|
30 |
+
}
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "][Attribute Array]", $attr_arr);
|
35 |
+
}
|
36 |
+
?>
|
37 |
+
<div class="content-header">
|
38 |
+
<table cellspacing="0" class="grid-header">
|
39 |
+
<tr>
|
40 |
+
<td><h3>GlobalLink - Configure Product Attributes For Translation</h3></td>
|
41 |
+
<?php
|
42 |
+
if ($attr_set_selected != '') {
|
43 |
+
?>
|
44 |
+
<td class="a-right">
|
45 |
+
<button onclick="postForm.submit()" class="scalable save" type="button"><span>Update Attribute Set</span></button>
|
46 |
+
</td>
|
47 |
+
<?php
|
48 |
+
}
|
49 |
+
?>
|
50 |
+
</tr>
|
51 |
+
</table>
|
52 |
+
</div>
|
53 |
+
<form id="load_form" name="load_form" method="post" action="<?php echo $this->getUrl('*/*/load') ?>">
|
54 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
55 |
+
<div id="staging_store_container">
|
56 |
+
<p class="switcher"><label for="selected_object_type"><b><?php echo $this->__('Attribute Set:') ?></b> </label>
|
57 |
+
<select id="attribute-set-dropdown" name="attribute-set-dropdown" onchange="loadForm.submit()">
|
58 |
+
<option value=""> --Select-- </option>
|
59 |
+
<?php
|
60 |
+
foreach ($attribute_set_arr as $attr_set_id => $attr_set_name) {
|
61 |
+
if ($attr_set_id == $attr_set_selected) {
|
62 |
+
?>
|
63 |
+
<option value="<?php echo $attr_set_id ?>" selected="true"><?php echo $attr_set_name ?></option>
|
64 |
+
<?php
|
65 |
+
}
|
66 |
+
else {
|
67 |
+
?>
|
68 |
+
<option value="<?php echo $attr_set_id ?>"><?php echo $attr_set_name ?></option>
|
69 |
+
<?php
|
70 |
+
}
|
71 |
+
}
|
72 |
+
?>
|
73 |
+
</select>
|
74 |
+
</p>
|
75 |
+
</div>
|
76 |
+
</form>
|
77 |
+
|
78 |
+
<div class="entry-edit">
|
79 |
+
<?php
|
80 |
+
if ($attr_set_selected != '') {
|
81 |
+
?>
|
82 |
+
<form id="post_form" name="post_form" method="post" action="<?php echo $this->getUrl('*/*/post') ?>">
|
83 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
84 |
+
<input type="hidden" name="attribute_set_id" value="<?php echo $attr_set_selected ?>"/>
|
85 |
+
<div class="grid">
|
86 |
+
<table cellspacing="0" class="data">
|
87 |
+
<thead>
|
88 |
+
<tr class="headings">
|
89 |
+
<th class="no-link" style="width:10%"><input type='checkbox' id='selectAllCheckBox' onclick="javascript:selectAll(this);" > Translate? </th>
|
90 |
+
<th class="no-link" style="width:25%">Attribute Code</th>
|
91 |
+
<th class="no-link" style="width:50%">Attribute Label</th>
|
92 |
+
<th class="no-link" style="width:25%">Attribute Set</th>
|
93 |
+
</tr>
|
94 |
+
</thead>
|
95 |
+
<tbody>
|
96 |
+
<?php
|
97 |
+
foreach ($attr_arr as $_attr_id => $_attribute) {
|
98 |
+
$checked = "";
|
99 |
+
if ($db_arr[$attr_set_selected][$_attr_id] == 1) {
|
100 |
+
$checked = "checked=\"true\"";
|
101 |
+
}
|
102 |
+
$attribute_code = $_attribute['attribute_code'];
|
103 |
+
$attribute_name = $_attribute['attribute_name'];
|
104 |
+
?>
|
105 |
+
<tr>
|
106 |
+
<td>
|
107 |
+
<input type="checkbox" name="attribute_ids[]" value="<?php echo $_attr_id ?>" <?php echo $checked ?>/>
|
108 |
+
</td>
|
109 |
+
<td>
|
110 |
+
<?php echo $attribute_code ?>
|
111 |
+
</td>
|
112 |
+
<td>
|
113 |
+
<?php echo $attribute_name ?>
|
114 |
+
</td>
|
115 |
+
<td>
|
116 |
+
<?php echo $attribute_set_arr[$attr_set_selected] ?>
|
117 |
+
</td>
|
118 |
+
</tr>
|
119 |
+
<?php
|
120 |
+
}
|
121 |
+
?>
|
122 |
+
</tbody>
|
123 |
+
</table>
|
124 |
+
</div>
|
125 |
+
</form>
|
126 |
+
<?php
|
127 |
+
}
|
128 |
+
?>
|
129 |
+
</div>
|
130 |
+
<script language='Javascript'>
|
131 |
+
function selectAll(obj) {
|
132 |
+
var checked = false;
|
133 |
+
if(obj.checked == true) {
|
134 |
+
checked = true;
|
135 |
+
}
|
136 |
+
$arr = document.getElementsByName("attribute_ids[]");
|
137 |
+
for (i=0;i<$arr.length;i++) {
|
138 |
+
$arr[i].checked = checked;
|
139 |
+
}
|
140 |
+
}F
|
141 |
+
</script>
|
142 |
+
<script type="text/javascript">
|
143 |
+
var loadForm = new varienForm('load_form');
|
144 |
+
var postForm = new varienForm('post_form');
|
145 |
+
</script>
|
146 |
+
<?php
|
147 |
+
}
|
148 |
+
catch (Exception $ex) {
|
149 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
150 |
+
$error_msg = 'Globallink WebService Error - ' . $ex->getMessage();
|
151 |
+
}
|
152 |
+
if (isset($error_msg) && $error_msg != '') {
|
153 |
+
?>
|
154 |
+
<div class="entry-edit">
|
155 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
156 |
+
</div>
|
157 |
+
<?php
|
158 |
+
}
|
159 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/configuration.phtml
ADDED
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
4 |
+
|
5 |
+
$globallink_user_id = 0;
|
6 |
+
$globallink_project_id = 0;
|
7 |
+
$globallink_url = "";
|
8 |
+
$project_short_code = "";
|
9 |
+
$classifier = "";
|
10 |
+
$mime_type = "text/xml";
|
11 |
+
$files_per_submission = 9999;
|
12 |
+
$max_target_count = 9999;
|
13 |
+
$globallink_user_name = "";
|
14 |
+
$globallink_user_password = "";
|
15 |
+
|
16 |
+
foreach ($gl_config_arr as $gl_config) {
|
17 |
+
$globallink_project_id = isset($gl_config['globallink_project_id']) ? $gl_config['globallink_project_id'] : 0;
|
18 |
+
$globallink_user_id = isset($gl_config['globallink_user_id']) ? $gl_config['globallink_user_id'] : 0;
|
19 |
+
$globallink_url = isset($gl_config['globallink_url']) ? $gl_config['globallink_url'] : "";
|
20 |
+
$project_short_code = isset($gl_config['project_short_code']) ? $gl_config['project_short_code'] : "";
|
21 |
+
$classifier = isset($gl_config['classifier']) ? $gl_config['classifier'] : "";
|
22 |
+
$mime_type = isset($gl_config['mime_type']) ? $gl_config['mime_type'] : "text/xml";
|
23 |
+
$files_per_submission = isset($gl_config['files_per_submission']) ? $gl_config['files_per_submission'] : 9999;
|
24 |
+
$max_target_count = isset($gl_config['max_target_count']) ? $gl_config['max_target_count'] : 9999;
|
25 |
+
$globallink_user_name = isset($gl_config['globallink_user_name']) ? $gl_config['globallink_user_name'] : "";
|
26 |
+
$globallink_user_password = isset($gl_config['globallink_user_password']) ? $gl_config['globallink_user_password'] : "";
|
27 |
+
}
|
28 |
+
?>
|
29 |
+
|
30 |
+
<div class="content-header">
|
31 |
+
<table cellspacing="0" class="grid-header">
|
32 |
+
<tr>
|
33 |
+
<td><h3>Settings</h3></td>
|
34 |
+
</tr>
|
35 |
+
</table>
|
36 |
+
</div>
|
37 |
+
|
38 |
+
<form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post') ?>">
|
39 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
40 |
+
<input name="globallink_project_id" type="hidden" value="<?php echo $globallink_project_id ?>" />
|
41 |
+
<input name="globallink_user_id" type="hidden" value="<?php echo $globallink_user_id ?>" />
|
42 |
+
<div class="entry-edit">
|
43 |
+
<div class="entry-edit-head">
|
44 |
+
<h4 class="icon-head head-edit-form fieldset-legend"> GlobalLink Settings </h4>
|
45 |
+
</div>
|
46 |
+
<fieldset id="grop_fields">
|
47 |
+
<table class="form-list" >
|
48 |
+
<tr>
|
49 |
+
<td class="label">
|
50 |
+
<label for="globallink_user_name">User Name <span class="required">*</span> </label>
|
51 |
+
</td>
|
52 |
+
<td class="value">
|
53 |
+
<input type="text" size="70" class="input-text required-entry" name="globallink_user_name" id="globallink_user_name" value='<?php echo $globallink_user_name ?>'/>
|
54 |
+
</td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<td class="label">
|
58 |
+
<label for="globallink_user_password">Password <span class="required">*</span> </label>
|
59 |
+
</td>
|
60 |
+
<td class="value">
|
61 |
+
<input type="password" size="70" class="input-text required-entry" name="globallink_user_password" id="globallink_user_password" value='<?php echo $globallink_user_password ?>' />
|
62 |
+
</td>
|
63 |
+
</tr>
|
64 |
+
|
65 |
+
<tr>
|
66 |
+
<td class="label">
|
67 |
+
<label for="url_field">GlobalLink URL <span class="required">*</span> </label>
|
68 |
+
</td>
|
69 |
+
<td class="value">
|
70 |
+
<input type="text" size="70" class="input-text required-entry" name="globallink_url" id="globallink_url" value='<?php echo $globallink_url ?>'/>
|
71 |
+
</td>
|
72 |
+
</tr>
|
73 |
+
<tr>
|
74 |
+
<td class="label">
|
75 |
+
<label for="project_short_code">GlobalLink Short Code <span class="required">*</span> </label>
|
76 |
+
<span style="font-size: 11px; font-style: italic;">Enter comma separated codes for multiple projects.</span>
|
77 |
+
</td>
|
78 |
+
<td class="value">
|
79 |
+
<input type="text" size="70" class="input-text required-entry" name="project_short_code" id="project_short_code" value='<?php echo $project_short_code ?>'/>
|
80 |
+
</td>
|
81 |
+
</tr>
|
82 |
+
<tr>
|
83 |
+
<td class="label">
|
84 |
+
<label for="classifier">Classifier <span class="required">*</span> </label>
|
85 |
+
</td>
|
86 |
+
<td class="value">
|
87 |
+
<input type="text" size="70" class="input-text required-entry" name="classifier" id="classifier" value='<?php echo $classifier ?>'/>
|
88 |
+
</td>
|
89 |
+
</tr>
|
90 |
+
<!-- <tr>
|
91 |
+
<td class="label">
|
92 |
+
<label for="mime_type">Mime Type <span class="required">*</span> </label>
|
93 |
+
</td>
|
94 |
+
<td class="value">
|
95 |
+
<input type="text" size="70" class="input-text required-entry" name="mime_type" id="mime_type" value='<?php echo $mime_type ?>'/>
|
96 |
+
</td>
|
97 |
+
</tr>-->
|
98 |
+
<!-- <tr>
|
99 |
+
<td class="label">
|
100 |
+
<label for="files_per_submission">Max Files Per Submission <span class="required">*</span> </label>
|
101 |
+
</td>
|
102 |
+
<td class="value">
|
103 |
+
<input type="text" size="70" class="input-text required-entry" name="files_per_submission" id="files_per_submission" value='<?php echo $files_per_submission ?>'/>
|
104 |
+
</td>
|
105 |
+
</tr>-->
|
106 |
+
<tr>
|
107 |
+
<td class="label">
|
108 |
+
<label for="max_target_count">Max Target Count <span class="required">*</span> </label>
|
109 |
+
</td>
|
110 |
+
<td class="value">
|
111 |
+
<input type="text" size="70" class="input-text required-entry validate-number" name="max_target_count" id="max_target_count" value='<?php echo $max_target_count ?>'/>
|
112 |
+
</td>
|
113 |
+
</tr>
|
114 |
+
<tr>
|
115 |
+
<td class="label">
|
116 |
+
</td>
|
117 |
+
<td class="value">
|
118 |
+
<button onclick="if(validate()){editForm.submit()}" class="scalable save" type="button"><span>Save And Test GlobalLink Settings</span></button>
|
119 |
+
</td>
|
120 |
+
</tr>
|
121 |
+
</table>
|
122 |
+
</fieldset>
|
123 |
+
</div>
|
124 |
+
|
125 |
+
</form>
|
126 |
+
|
127 |
+
<script type="text/javascript">
|
128 |
+
var editForm = new varienForm('edit_form');
|
129 |
+
</script>
|
130 |
+
<script type="text/javascript">
|
131 |
+
function validateTargetCount(val){
|
132 |
+
if(val < 1 || isNaN(val)) {
|
133 |
+
document.getElementById("max_target_count").value = "";
|
134 |
+
alert("Max Target Count invalid.");
|
135 |
+
return false;
|
136 |
+
}
|
137 |
+
return true;
|
138 |
+
}
|
139 |
+
function validate(){
|
140 |
+
var shortCodeVal = document.getElementsByName("project_short_code")[0].value;
|
141 |
+
var targetCountVal = document.getElementsByName("max_target_count")[0].value;
|
142 |
+
var userNameVal = document.getElementsByName("globallink_user_name")[0].value;
|
143 |
+
var shortCodeArr = shortCodeVal.split("");
|
144 |
+
for (var i = 0, l = shortCodeArr.length; i < l; i++){
|
145 |
+
if (shortCodeArr[i] === shortCodeArr[i].toLowerCase() && isNaN(shortCodeArr[i])
|
146 |
+
&& shortCodeArr[i] != " " && shortCodeArr[i] != ",") {
|
147 |
+
document.getElementById("project_short_code").value = "";
|
148 |
+
alert("Error: Enter only uppercase and comma separated Short Codes.");
|
149 |
+
return false;
|
150 |
+
} else if (shortCodeArr[0] == "," || shortCodeArr[shortCodeArr.length-1] == ",") {
|
151 |
+
document.getElementById("project_short_code").value = "";
|
152 |
+
alert("Error: Short Codes contain invalid commas.");
|
153 |
+
return false;
|
154 |
+
} else if (shortCodeArr[i] == ",") {
|
155 |
+
if (shortCodeArr[i] == shortCodeArr[i-1]) {
|
156 |
+
document.getElementById("project_short_code").value = "";
|
157 |
+
alert("Error: Short Codes contain invalid commas.");
|
158 |
+
return false;
|
159 |
+
}
|
160 |
+
}
|
161 |
+
}
|
162 |
+
var shortCodeVal = shortCodeVal.replace(/\s+/g, '');
|
163 |
+
document.getElementById("project_short_code").value = shortCodeVal;
|
164 |
+
if(!shortCodeVal.split(",").unique() || !validateTargetCount(targetCountVal)) return false;
|
165 |
+
var userNameArr = userNameVal.split("");
|
166 |
+
var regExp = /[^a-zA-Z0-9@._-]/;
|
167 |
+
for (var i = 0, l = userNameArr.length; i < l; i++){
|
168 |
+
if (regExp.test(userNameArr[i])) {
|
169 |
+
document.getElementById("globallink_user_name").value = "";
|
170 |
+
alert("Error: User Name contains invalid characters.");
|
171 |
+
return false;
|
172 |
+
}
|
173 |
+
}
|
174 |
+
return true;
|
175 |
+
}
|
176 |
+
Array.prototype.contains = function(v) {
|
177 |
+
for(var i = 0; i < this.length; i++) {
|
178 |
+
if(this[i] === v) return true;
|
179 |
+
}
|
180 |
+
return false;
|
181 |
+
};
|
182 |
+
Array.prototype.unique = function() {
|
183 |
+
var arr = [];
|
184 |
+
for(var i = 0; i < this.length; i++) {
|
185 |
+
if(!arr.contains(this[i])) {
|
186 |
+
arr.push(this[i]);
|
187 |
+
} else {
|
188 |
+
document.getElementById("project_short_code").value = "";
|
189 |
+
alert("Error: Duplicate Short Code.");
|
190 |
+
return false;
|
191 |
+
}
|
192 |
+
}
|
193 |
+
return true;
|
194 |
+
}
|
195 |
+
</script>
|
196 |
+
|
197 |
+
<?php
|
198 |
+
}
|
199 |
+
catch (Exception $ex) {
|
200 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
201 |
+
$error_msg = 'Globallink WebService Error - ' . $ex->getMessage();
|
202 |
+
}
|
203 |
+
if (isset($error_msg) && $error_msg != '') {
|
204 |
+
?>
|
205 |
+
<div class="entry-edit">
|
206 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
207 |
+
</div>
|
208 |
+
<?php
|
209 |
+
}
|
210 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/glactivesubmissions.phtml
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
4 |
+
$config_set = FALSE;
|
5 |
+
if (isset($gl_config_arr) && count($gl_config_arr) > 0) {
|
6 |
+
$config_set = TRUE;
|
7 |
+
}
|
8 |
+
if (!$config_set) {
|
9 |
+
?>
|
10 |
+
<div class="entry-edit">
|
11 |
+
<span style="color:red;text-align: center">GlobalLink Configurations Not Found.</span>
|
12 |
+
</div>
|
13 |
+
<?php
|
14 |
+
}
|
15 |
+
else {
|
16 |
+
$selected_submission_name = urldecode($this->getRequest()->getParam('selected_submission_name', ''));
|
17 |
+
$_submissions = Mage::helper("globallink")->getActiveSubmissionNames();
|
18 |
+
Mage::helper("globallink")->gl_debug("glactivesubmissions phtml", $selected_submission_name);
|
19 |
+
?>
|
20 |
+
<div class="content-header">
|
21 |
+
<table cellspacing="0">
|
22 |
+
<tr>
|
23 |
+
<td style="width:50%;"><h3>GlobalLink - Active Submissions</h3></td>
|
24 |
+
<td class="a-right">
|
25 |
+
<?php if (count($_submissions) > 0): ?>
|
26 |
+
<button onclick="if(checkSelectedRows()){selectForm.submit()}" class="scalable save" type="button"><span> Cancel Selected Records </span></button>
|
27 |
+
<?php endif; ?>
|
28 |
+
</td>
|
29 |
+
</tr>
|
30 |
+
</table>
|
31 |
+
</div>
|
32 |
+
<?php if (count($_submissions) > 0): ?>
|
33 |
+
<div id="staging_store_container">
|
34 |
+
<p class="switcher"><label for="selected_submission_name"><b><?php echo $this->__('Choose Submission:') ?></b> </label>
|
35 |
+
<select name="selected_submission_name" id="selected_submission_name" class="left-col-block" onchange="return switchStore(this);">
|
36 |
+
<option value=""> -- Select -- </option>
|
37 |
+
<?php foreach ($_submissions as $_submission): ?>
|
38 |
+
<option value="<?php echo urlencode($_submission); ?>" <?php if ($selected_submission_name == $_submission): ?> selected="selected"<?php endif; ?>><?php echo $this->escapeHtml($_submission) ?></option>
|
39 |
+
<?php endforeach; ?>
|
40 |
+
</select>
|
41 |
+
<?php if ($selected_submission_name != ''): ?>
|
42 |
+
<button onclick="submissionForm.submit()" class="scalable save" type="button"><span> Cancel Submission </span></button>
|
43 |
+
<?php endif; ?>
|
44 |
+
</p>
|
45 |
+
</div>
|
46 |
+
<?php endif; ?>
|
47 |
+
<?php if (count($_submissions) == 0): ?>
|
48 |
+
<div id="staging_store_container">
|
49 |
+
<p class="switcher"><span style="color:red;text-align: center">Currently there are no active submissions.</span></p>
|
50 |
+
</div>
|
51 |
+
<?php endif; ?>
|
52 |
+
<?php if ($selected_submission_name != ''): ?>
|
53 |
+
<form id="submission_form" name="submission_form" method="post" action="<?php echo $this->getUrl('*/*/cancel') ?>">
|
54 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
55 |
+
<input type="hidden" name="selected_submission_name" value="<?php echo $selected_submission_name ?>"/>
|
56 |
+
</form>
|
57 |
+
<?php endif; ?>
|
58 |
+
<?php if (count($_submissions) > 0): ?>
|
59 |
+
<form id="select_form" name="select_form" method="post" action="<?php echo $this->getUrl('*/*/select') ?>">
|
60 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
61 |
+
<input type="hidden" name="selected_submission_name" value="<?php echo $selected_submission_name ?>"/>
|
62 |
+
<div>
|
63 |
+
<?php echo $this->getGridHtml() ?>
|
64 |
+
</div>
|
65 |
+
</form>
|
66 |
+
<script type="text/javascript">
|
67 |
+
function switchStore(obj) {
|
68 |
+
var storeParam = obj.value ? 'selected_submission_name/' + obj.value + '/' : '';
|
69 |
+
setLocation('<?php echo $this->getUrl('*/*') ?>' + storeParam);
|
70 |
+
return true;
|
71 |
+
}
|
72 |
+
function checkSelectedRows() {
|
73 |
+
$success = false;
|
74 |
+
$arr = document.getElementsByName("gl_status_ids[]");
|
75 |
+
if($arr != null && $arr != undefined) {
|
76 |
+
for (i=0;i<$arr.length;i++) {
|
77 |
+
if($arr[i].checked == true) {
|
78 |
+
$success = true;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
if(!$success) {
|
82 |
+
alert('Please select items.');
|
83 |
+
return false;
|
84 |
+
}
|
85 |
+
} else {
|
86 |
+
return false;
|
87 |
+
}
|
88 |
+
return true;
|
89 |
+
}
|
90 |
+
</script>
|
91 |
+
<script type="text/javascript">
|
92 |
+
var selectForm = new varienForm('select_form');
|
93 |
+
var submissionForm = new varienForm('submission_form');
|
94 |
+
</script>
|
95 |
+
<?php endif; ?>
|
96 |
+
<?php
|
97 |
+
}
|
98 |
+
}
|
99 |
+
catch (Exception $ex) {
|
100 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
101 |
+
$error_msg = 'Globallink WebService Error - ' . $ex->getMessage();
|
102 |
+
}
|
103 |
+
if (isset($error_msg) && $error_msg != '') {
|
104 |
+
?>
|
105 |
+
<div class="entry-edit">
|
106 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
107 |
+
</div>
|
108 |
+
<?php
|
109 |
+
}
|
110 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/glcategory.phtml
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
4 |
+
$config_set = FALSE;
|
5 |
+
if (isset($gl_config_arr) && count($gl_config_arr) > 0) {
|
6 |
+
$config_set = TRUE;
|
7 |
+
}
|
8 |
+
if (!$config_set) {
|
9 |
+
?>
|
10 |
+
<div class="entry-edit">
|
11 |
+
<span style="color:red;text-align: center">GlobalLink Configurations Not Found.</span>
|
12 |
+
</div>
|
13 |
+
<?php
|
14 |
+
}
|
15 |
+
else {
|
16 |
+
$gl_category_filter = Mage::getSingleton('core/session')->getCategoryFilter();
|
17 |
+
$_mapped_stores = $this->getMappedStores();
|
18 |
+
?>
|
19 |
+
<div class="content-header">
|
20 |
+
<table cellspacing="0">
|
21 |
+
<tr>
|
22 |
+
<td style="width:50%;"><h3>GlobalLink - Translate Categories</h3></td>
|
23 |
+
<td class="a-right">
|
24 |
+
<button onclick="submitMassForm()" class="scalable add" type="button"><span> Create Submission </span></button>
|
25 |
+
</td>
|
26 |
+
</tr>
|
27 |
+
</table>
|
28 |
+
</div>
|
29 |
+
<?php if (count($_mapped_stores) == 0) { ?>
|
30 |
+
<div id="staging_store_container">
|
31 |
+
<p class="switcher"><span style="color:red;text-align: center">GlobalLink Locale Mapping Not Found.</span></p>
|
32 |
+
</div>
|
33 |
+
<?php
|
34 |
+
}
|
35 |
+
else {
|
36 |
+
$selected_store_id = $this->getRequest()->getParam('store', '');
|
37 |
+
if ($selected_store_id == '') {
|
38 |
+
$selected_store_id = Mage::helper("globallink")->get_default_gl_store_id();
|
39 |
+
}
|
40 |
+
?>
|
41 |
+
|
42 |
+
<?php if (!$this->isSingleStoreMode()): ?>
|
43 |
+
<?php
|
44 |
+
$source_store = array();
|
45 |
+
$_mapped_stores = $this->getMappedStores();
|
46 |
+
Mage::helper("globallink")->gl_debug("gl_category phtml", $_mapped_stores);
|
47 |
+
?>
|
48 |
+
<?php if (count($_mapped_stores) > 0): ?>
|
49 |
+
<div class="switcher">
|
50 |
+
<label for="source_lang_store"><b><?php echo $this->__('Choose Store View:') ?></b> </label>
|
51 |
+
<select name="source_lang_store" id="source_lang_store" class="left-col-block" onchange="return switchStore(this);">
|
52 |
+
<option value=""> -- Select --</option>
|
53 |
+
<?php foreach ($_mapped_stores as $_store): ?>
|
54 |
+
<?php
|
55 |
+
if ($selected_store_id == $_store['store_id']) {
|
56 |
+
$source_store = $_store;
|
57 |
+
}
|
58 |
+
?>
|
59 |
+
<option value="<?php echo $_store['store_id'] ?>" <?php if ($selected_store_id == $_store['store_id']): ?> selected="selected"<?php endif; ?>><?php echo $this->escapeHtml($_store['store_name']) ?></option>
|
60 |
+
<?php endforeach; ?>
|
61 |
+
</select>
|
62 |
+
</div>
|
63 |
+
<div class="switcher">
|
64 |
+
<form id="filter_form" name="filter_form" method="post" action="<?php echo $this->getUrl('*/*/filter') ?>">
|
65 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
66 |
+
<input name="store_id" type="hidden" value="<?php echo $selected_store_id ?>" />
|
67 |
+
<label for="globallink_modified"><b><?php echo $this->__('Show: ') ?></b> </label>
|
68 |
+
<input type="radio" name="globallink_category_filter" value="0" <?php if (!$gl_category_filter || $gl_category_filter == 0): echo 'checked="checked"'; endif; ?> /><label class="option" for="globallink_category_filter"> Modified Content </label>
|
69 |
+
<input type="radio" name="globallink_category_filter" value="1" <?php if ($gl_category_filter == 1) : echo 'checked="checked"'; endif; ?> /><label class="option" for="globallink_category_filter" style="padding-right:15px;"> Everything </label>
|
70 |
+
<button onclick="filterForm.submit()" class="scalable" type="button"><span> Filter</span></button>
|
71 |
+
</form>
|
72 |
+
</div>
|
73 |
+
<?php endif; ?>
|
74 |
+
<?php endif; ?>
|
75 |
+
<div>
|
76 |
+
<?php echo $this->getGridHtml() ?>
|
77 |
+
</div>
|
78 |
+
<script type="text/javascript">
|
79 |
+
var filterForm = new varienForm('filter_form');
|
80 |
+
</script>
|
81 |
+
<script type="text/javascript">
|
82 |
+
//<![CDATA[
|
83 |
+
if(document.getElementById("glcategoryGrid_massaction-select") != null
|
84 |
+
&& document.getElementById("glcategoryGrid_massaction-select") != undefined) {
|
85 |
+
document.getElementById("glcategoryGrid_massaction-select").value = "add";
|
86 |
+
var form = $('glcategoryGrid_massaction-form');
|
87 |
+
$('glcategoryGrid_massaction-form').addClassName('no-display');
|
88 |
+
$('glcategoryGrid_category_filter_massaction').addClassName('no-display');
|
89 |
+
}
|
90 |
+
function submitMassForm() {
|
91 |
+
var input = document.createElement("input");
|
92 |
+
input.setAttribute("type", "hidden");
|
93 |
+
input.setAttribute("name", "store");
|
94 |
+
input.setAttribute("value", <?php echo $selected_store_id ?>);
|
95 |
+
document.getElementById("glcategoryGrid_massaction-form").appendChild(input);
|
96 |
+
glcategoryGrid_massactionJsObject.apply();
|
97 |
+
}
|
98 |
+
function switchStore(obj) {
|
99 |
+
var storeParam = obj.value ? 'store/' + obj.value + '/' : '';
|
100 |
+
setLocation('<?php echo $this->getUrl('*/*') ?>' + storeParam);
|
101 |
+
return true;
|
102 |
+
}
|
103 |
+
//]]>
|
104 |
+
</script>
|
105 |
+
<?php
|
106 |
+
}
|
107 |
+
}
|
108 |
+
}
|
109 |
+
catch (Exception $ex) {
|
110 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
111 |
+
$error_msg = 'Globallink Error - ' . $ex->getMessage();
|
112 |
+
}
|
113 |
+
if (isset($error_msg) && $error_msg != '') {
|
114 |
+
?>
|
115 |
+
<div class="entry-edit">
|
116 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
117 |
+
</div>
|
118 |
+
<?php
|
119 |
+
}
|
120 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/glcmsblock.phtml
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
4 |
+
$config_set = FALSE;
|
5 |
+
if (isset($gl_config_arr) && count($gl_config_arr) > 0) {
|
6 |
+
$config_set = TRUE;
|
7 |
+
}
|
8 |
+
if (!$config_set) {
|
9 |
+
?>
|
10 |
+
<div class="entry-edit">
|
11 |
+
<span style="color:red;text-align: center">GlobalLink Configurations Not Found.</span>
|
12 |
+
</div>
|
13 |
+
<?php
|
14 |
+
}
|
15 |
+
else {
|
16 |
+
$_mapped_stores = $this->getMappedStores();
|
17 |
+
?>
|
18 |
+
<div class="content-header">
|
19 |
+
<table cellspacing="0">
|
20 |
+
<tr>
|
21 |
+
<td style="width:50%;"><h3>GlobalLink - Translate CMS Blocks</h3></td>
|
22 |
+
<td class="a-right">
|
23 |
+
<button onclick="submitMassForm()" class="scalable add" type="button"><span> Create Submission </span></button>
|
24 |
+
</td>
|
25 |
+
</tr>
|
26 |
+
</table>
|
27 |
+
</div>
|
28 |
+
<?php if (count($_mapped_stores) == 0) { ?>
|
29 |
+
<div id="staging_store_container">
|
30 |
+
<p class="switcher"><span style="color:red;text-align: center">GlobalLink Locale Mapping Not Found.</span></p>
|
31 |
+
</div>
|
32 |
+
<?php
|
33 |
+
}
|
34 |
+
else {
|
35 |
+
$selected_store_id = $this->getRequest()->getParam('store', '');
|
36 |
+
if ($selected_store_id == '') {
|
37 |
+
$selected_store_id = Mage::helper("globallink")->get_default_gl_store_id();
|
38 |
+
}
|
39 |
+
?>
|
40 |
+
<?php if (!$this->isSingleStoreMode()): ?>
|
41 |
+
<?php
|
42 |
+
$source_store = array();
|
43 |
+
$_mapped_stores = $this->getMappedStores();
|
44 |
+
Mage::helper("globallink")->gl_debug("gl_category phtml", $_mapped_stores);
|
45 |
+
?>
|
46 |
+
<?php if (count($_mapped_stores) > 0): ?>
|
47 |
+
<div id="staging_store_container">
|
48 |
+
<div class="switcher">
|
49 |
+
<p><label for="source_lang_store"><b><?php echo $this->__('Choose Store View:') ?></b> </label>
|
50 |
+
<select name="source_lang_store" id="source_lang_store" class="left-col-block" onchange="return switchStore(this);">
|
51 |
+
<option value=""> -- Select --</option>
|
52 |
+
<?php foreach ($_mapped_stores as $_store): ?>
|
53 |
+
<?php
|
54 |
+
if ($selected_store_id == $_store['store_id']) {
|
55 |
+
$source_store = $_store;
|
56 |
+
}
|
57 |
+
?>
|
58 |
+
<option value="<?php echo $_store['store_id'] ?>" <?php if ($selected_store_id == $_store['store_id']): ?> selected="selected"<?php endif; ?>><?php echo $this->escapeHtml($_store['store_name']) ?></option>
|
59 |
+
<?php endforeach; ?>
|
60 |
+
</select>
|
61 |
+
</p>
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
<?php endif; ?>
|
65 |
+
<?php endif; ?>
|
66 |
+
<div>
|
67 |
+
<?php echo $this->getGridHtml() ?>
|
68 |
+
</div>
|
69 |
+
<script type="text/javascript">
|
70 |
+
//<![CDATA[
|
71 |
+
if(document.getElementById("glcmsblockGrid_massaction-select") != null
|
72 |
+
&& document.getElementById("glcmsblockGrid_massaction-select") != undefined) {
|
73 |
+
document.getElementById("glcmsblockGrid_massaction-select").value = "add";
|
74 |
+
var form = $('glcmsblockGrid_massaction-form');
|
75 |
+
$('glcmsblockGrid_massaction-form').addClassName('no-display');
|
76 |
+
$('glcmsblockGrid_product_filter_massaction').addClassName('no-display');
|
77 |
+
}
|
78 |
+
function submitMassForm() {
|
79 |
+
var input = document.createElement("input");
|
80 |
+
input.setAttribute("type", "hidden");
|
81 |
+
input.setAttribute("name", "store");
|
82 |
+
input.setAttribute("value", <?php echo $selected_store_id ?>);
|
83 |
+
document.getElementById("glcmsblockGrid_massaction-form").appendChild(input);
|
84 |
+
glcmsblockGrid_massactionJsObject.apply();
|
85 |
+
}
|
86 |
+
function switchStore(obj) {
|
87 |
+
var storeParam = obj.value ? 'store/' + obj.value + '/' : '';
|
88 |
+
setLocation('<?php echo $this->getUrl('*/*') ?>' + storeParam);
|
89 |
+
return true;
|
90 |
+
}
|
91 |
+
//]]>
|
92 |
+
</script>
|
93 |
+
<?php
|
94 |
+
}
|
95 |
+
}
|
96 |
+
}
|
97 |
+
catch (Exception $ex) {
|
98 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
99 |
+
$error_msg = 'Globallink Error - ' . $ex->getMessage();
|
100 |
+
}
|
101 |
+
if (isset($error_msg) && $error_msg != '') {
|
102 |
+
?>
|
103 |
+
<div class="entry-edit">
|
104 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
105 |
+
</div>
|
106 |
+
<?php
|
107 |
+
}
|
108 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/glcmspage.phtml
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
4 |
+
$config_set = FALSE;
|
5 |
+
if (isset($gl_config_arr) && count($gl_config_arr) > 0) {
|
6 |
+
$config_set = TRUE;
|
7 |
+
}
|
8 |
+
if (!$config_set) {
|
9 |
+
?>
|
10 |
+
<div class="entry-edit">
|
11 |
+
<span style="color:red;text-align: center">GlobalLink Configurations Not Found.</span>
|
12 |
+
</div>
|
13 |
+
<?php
|
14 |
+
}
|
15 |
+
else {
|
16 |
+
$_mapped_stores = $this->getMappedStores();
|
17 |
+
?>
|
18 |
+
<div class="content-header">
|
19 |
+
<table cellspacing="0">
|
20 |
+
<tr>
|
21 |
+
<td style="width:50%;"><h3>GlobalLink - Translate CMS Pages</h3></td>
|
22 |
+
<td class="a-right">
|
23 |
+
<button onclick="submitMassForm()" class="scalable add" type="button"><span> Create Submission </span></button>
|
24 |
+
</td>
|
25 |
+
</tr>
|
26 |
+
</table>
|
27 |
+
</div>
|
28 |
+
<?php if (count($_mapped_stores) == 0) { ?>
|
29 |
+
<div id="staging_store_container">
|
30 |
+
<p class="switcher"><span style="color:red;text-align: center">GlobalLink Locale Mapping Not Found.</span></p>
|
31 |
+
</div>
|
32 |
+
<?php
|
33 |
+
}
|
34 |
+
else {
|
35 |
+
$selected_store_id = $this->getRequest()->getParam('store', '');
|
36 |
+
if ($selected_store_id == '') {
|
37 |
+
$selected_store_id = Mage::helper("globallink")->get_default_gl_store_id();
|
38 |
+
}
|
39 |
+
?>
|
40 |
+
<?php if (!$this->isSingleStoreMode()): ?>
|
41 |
+
<?php
|
42 |
+
$source_store = array();
|
43 |
+
$_mapped_stores = $this->getMappedStores();
|
44 |
+
Mage::helper("globallink")->gl_debug("gl_category phtml", $_mapped_stores);
|
45 |
+
?>
|
46 |
+
<?php if (count($_mapped_stores) > 0): ?>
|
47 |
+
<div id="staging_store_container">
|
48 |
+
<div class="switcher">
|
49 |
+
<p><label for="source_lang_store"><b><?php echo $this->__('Choose Store View:') ?></b> </label>
|
50 |
+
<select name="source_lang_store" id="source_lang_store" class="left-col-block" onchange="return switchStore(this);">
|
51 |
+
<option value=""> -- Select --</option>
|
52 |
+
<?php foreach ($_mapped_stores as $_store): ?>
|
53 |
+
<?php
|
54 |
+
if ($selected_store_id == $_store['store_id']) {
|
55 |
+
$source_store = $_store;
|
56 |
+
}
|
57 |
+
?>
|
58 |
+
<option value="<?php echo $_store['store_id'] ?>" <?php if ($selected_store_id == $_store['store_id']): ?> selected="selected"<?php endif; ?>><?php echo $this->escapeHtml($_store['store_name']) ?></option>
|
59 |
+
<?php endforeach; ?>
|
60 |
+
</select>
|
61 |
+
</p>
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
<?php endif; ?>
|
65 |
+
<?php endif; ?>
|
66 |
+
<div>
|
67 |
+
<?php echo $this->getGridHtml() ?>
|
68 |
+
</div>
|
69 |
+
<script type="text/javascript">
|
70 |
+
//<![CDATA[
|
71 |
+
if(document.getElementById("glcmspageGrid_massaction-select") != null
|
72 |
+
&& document.getElementById("glcmspageGrid_massaction-select") != undefined) {
|
73 |
+
document.getElementById("glcmspageGrid_massaction-select").value = "add";
|
74 |
+
var form = $('glcmspageGrid_massaction-form');
|
75 |
+
$('glcmspageGrid_massaction-form').addClassName('no-display');
|
76 |
+
$('glcmspageGrid_product_filter_massaction').addClassName('no-display');
|
77 |
+
}
|
78 |
+
function submitMassForm() {
|
79 |
+
var input = document.createElement("input");
|
80 |
+
input.setAttribute("type", "hidden");
|
81 |
+
input.setAttribute("name", "store");
|
82 |
+
input.setAttribute("value", <?php echo $selected_store_id ?>);
|
83 |
+
document.getElementById("glcmspageGrid_massaction-form").appendChild(input);
|
84 |
+
glcmspageGrid_massactionJsObject.apply();
|
85 |
+
}
|
86 |
+
function switchStore(obj) {
|
87 |
+
var storeParam = obj.value ? 'store/' + obj.value + '/' : '';
|
88 |
+
setLocation('<?php echo $this->getUrl('*/*') ?>' + storeParam);
|
89 |
+
return true;
|
90 |
+
}
|
91 |
+
//]]>
|
92 |
+
</script>
|
93 |
+
<?php
|
94 |
+
}
|
95 |
+
}
|
96 |
+
}
|
97 |
+
catch (Exception $ex) {
|
98 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
99 |
+
$error_msg = 'Globallink Error - ' . $ex->getMessage();
|
100 |
+
}
|
101 |
+
if (isset($error_msg) && $error_msg != '') {
|
102 |
+
?>
|
103 |
+
<div class="entry-edit">
|
104 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
105 |
+
</div>
|
106 |
+
<?php
|
107 |
+
}
|
108 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/glcreatesubmission.phtml
ADDED
@@ -0,0 +1,299 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
4 |
+
$config_set = FALSE;
|
5 |
+
if (isset($gl_config_arr) && count($gl_config_arr) > 0) {
|
6 |
+
$config_set = TRUE;
|
7 |
+
}
|
8 |
+
$object_type = $this->getRequest()->getParam('gl_object_type', '');
|
9 |
+
$is_store_object = TRUE;
|
10 |
+
if ($object_type == Mage::helper("globallink")->_get_object_type_email()
|
11 |
+
|| $object_type == Mage::helper("globallink")->_get_object_type_newsletter()) {
|
12 |
+
$is_store_object = FALSE;
|
13 |
+
}
|
14 |
+
|
15 |
+
if (!$config_set) {
|
16 |
+
?>
|
17 |
+
<div class="entry-edit">
|
18 |
+
<span style="color:red;text-align: center">GlobalLink Configurations Not Found.</span>
|
19 |
+
</div>
|
20 |
+
<?php
|
21 |
+
}
|
22 |
+
else {
|
23 |
+
$selected_store_id = $this->getRequest()->getParam('store', '');
|
24 |
+
Mage::helper("globallink")->gl_debug('Selected store id', $selected_store_id);
|
25 |
+
$source_store = array();
|
26 |
+
$_mapped_stores = Mage::helper("globallink")->get_mapped_locales();
|
27 |
+
foreach ($_mapped_stores as $_store) {
|
28 |
+
if ($selected_store_id == $_store['store_id']) {
|
29 |
+
$source_store = $_store;
|
30 |
+
break;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
?>
|
34 |
+
<div class="content-header">
|
35 |
+
<table cellspacing="0">
|
36 |
+
<tr>
|
37 |
+
<td style="width:50%;"><h3>GlobalLink - Create Submission</h3></td>
|
38 |
+
<td class="a-right">
|
39 |
+
<button onclick="cancelForm.submit()" class="scalable back" type="button"><span> Back </span></button>
|
40 |
+
<?php if (count($_mapped_stores) != 0): ?>
|
41 |
+
<?php if (!$is_store_object): ?>
|
42 |
+
<button onclick="if(validateDate(null)&&validateTargetLocales()){submissionForm.submit()}" class="scalable save" type="button"><span> Send for Translation </span></button>
|
43 |
+
<?php endif; ?>
|
44 |
+
<?php if ($is_store_object): ?>
|
45 |
+
<button onclick="if(validateDate(null)){submissionForm.submit()}" class="scalable save" type="button"><span> Send for Translation </span></button>
|
46 |
+
<?php endif; ?>
|
47 |
+
<?php endif; ?>
|
48 |
+
</td>
|
49 |
+
</tr>
|
50 |
+
</table>
|
51 |
+
</div>
|
52 |
+
<?php if (count($_mapped_stores) == 0) { ?>
|
53 |
+
<div id="staging_store_container">
|
54 |
+
<p class="switcher"><span style="color:red;text-align: center">GlobalLink Locale Mapping Not Found.</span></p>
|
55 |
+
</div>
|
56 |
+
<?php
|
57 |
+
}
|
58 |
+
else {
|
59 |
+
?>
|
60 |
+
<form id="submission_form" name="submission_form" method="post" action="<?php echo $this->getUrl('*/*/send') ?>">
|
61 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
62 |
+
<?php
|
63 |
+
if ($is_store_object) {
|
64 |
+
?>
|
65 |
+
<input type="hidden" name="gl_source_locale" value="<?php echo $source_store['gl_locale_code'] ?>"/>
|
66 |
+
<?php
|
67 |
+
}
|
68 |
+
?>
|
69 |
+
<input type="hidden" name="object_type" value="<?php echo $object_type ?>"/>
|
70 |
+
<div class="entry-edit">
|
71 |
+
<div class="entry-edit-head">
|
72 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Enter GlobalLink Submission Details</h4>
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
<br/>
|
76 |
+
<fieldset id="group_fields">
|
77 |
+
<table class="form-list" >
|
78 |
+
<tr>
|
79 |
+
<td class="label">
|
80 |
+
<label for="gl_submission_name">Submission Name <span class="required">*</span> </label>
|
81 |
+
</td>
|
82 |
+
<td class="value">
|
83 |
+
<input type="text" name="gl_submission_name" id="gl_submission_name" size="120" class="input-text required-entry" />
|
84 |
+
</td>
|
85 |
+
</tr>
|
86 |
+
<tr>
|
87 |
+
<td class="label">
|
88 |
+
<label for="gl_due_date">Due Date <span class="required">*</span> </label>
|
89 |
+
</td>
|
90 |
+
<td class="value">
|
91 |
+
<input type="text" class="input-text required-entry" name="gl_due_date" id="gl_due_date" value='<?php echo date("m/d/Y", strtotime('+2 week')); ?>' readonly/>
|
92 |
+
<img src="<?php echo $this->getSkinUrl('images/grid-cal.gif'); ?>" width="16" height="16" border="0" alt="Pick a date" id="gl_due_date_image" style="vertical-align: middle;">
|
93 |
+
</td>
|
94 |
+
</tr>
|
95 |
+
<tr>
|
96 |
+
<td class="label">
|
97 |
+
<label for="gl_project">Project Name <span class="required">*</span> </label>
|
98 |
+
</td>
|
99 |
+
<td class="value">
|
100 |
+
<select id="gl_project" name="gl_project" class="validate-select">
|
101 |
+
<?php
|
102 |
+
$proj_arr = Mage::helper("globallink")->get_pd_user_projects();
|
103 |
+
foreach ($proj_arr as $code => $name) {
|
104 |
+
?>
|
105 |
+
<option value="<?php echo $code ?>"><?php echo $name ?></option>
|
106 |
+
<?php
|
107 |
+
}
|
108 |
+
?>
|
109 |
+
</select>
|
110 |
+
</td>
|
111 |
+
</tr>
|
112 |
+
<tr>
|
113 |
+
<td class="label">
|
114 |
+
<label for="gl_priority">Priority <span class="required">*</span> </label>
|
115 |
+
</td>
|
116 |
+
<td class="value">
|
117 |
+
<select id="gl_priority" name="gl_priority" class="validate-select">
|
118 |
+
<option value="2">High </option>
|
119 |
+
<option value="1" selected>Normal </option>
|
120 |
+
<option value="0">Low </option>
|
121 |
+
</select>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
<?php
|
125 |
+
if (!$is_store_object) {
|
126 |
+
?>
|
127 |
+
<tr>
|
128 |
+
<td class="label">
|
129 |
+
<label for="gl_source_locale">Source Language <span class="required">*</span> </label>
|
130 |
+
</td>
|
131 |
+
<td class="value">
|
132 |
+
<select id="gl_source_locale" name="gl_source_locale" class="validate-select" onchange="javascript:changeSourceLocale(this);">
|
133 |
+
<option value=""> --Select-- </option>
|
134 |
+
<?php
|
135 |
+
foreach ($_mapped_stores as $locale) {
|
136 |
+
$locale_code = $locale['gl_locale_code'];
|
137 |
+
$locale_desc = $locale['gl_locale_desc'];
|
138 |
+
?>
|
139 |
+
<option value="<?php echo $locale_code ?>"><?php echo $locale_desc ?></option>
|
140 |
+
<?php
|
141 |
+
}
|
142 |
+
?>
|
143 |
+
</select>
|
144 |
+
</td>
|
145 |
+
</tr>
|
146 |
+
<tr>
|
147 |
+
<td class="label">
|
148 |
+
<label for="gl_target_locales">Target Language(s) <span class="required">*</span> </label>
|
149 |
+
</td>
|
150 |
+
<td class="value">
|
151 |
+
<?php
|
152 |
+
$_c = 0;
|
153 |
+
foreach ($_mapped_stores as $locale) {
|
154 |
+
$locale_code = $locale['gl_locale_code'];
|
155 |
+
$locale_desc = $locale['gl_locale_desc'];
|
156 |
+
?>
|
157 |
+
<div id="chk_<?php echo $locale_code ?>" >
|
158 |
+
<input type="checkbox" name="gl_target_locales[]" id="<?php echo $locale_code ?>" value="<?php echo $locale_code ?>" /><label id="label_<?php echo $locale_code ?>" for="<?php echo $locale_code ?>"> <?php echo $locale_desc ?> </label><br/>
|
159 |
+
</div>
|
160 |
+
<?php
|
161 |
+
}
|
162 |
+
?>
|
163 |
+
</td>
|
164 |
+
</tr>
|
165 |
+
<?php
|
166 |
+
}
|
167 |
+
else {
|
168 |
+
?>
|
169 |
+
<tr>
|
170 |
+
<td class="label">
|
171 |
+
<label for="gl_source_locale">Source Language <span class="required">*</span> </label>
|
172 |
+
</td>
|
173 |
+
<td class="value">
|
174 |
+
<?php echo $source_store['gl_locale_desc'] ?>
|
175 |
+
</td>
|
176 |
+
</tr>
|
177 |
+
<tr>
|
178 |
+
<td class="label">
|
179 |
+
<label for="gl_target_locales">Target Language(s) <span class="required">*</span> </label>
|
180 |
+
</td>
|
181 |
+
<td class="value">
|
182 |
+
<?php
|
183 |
+
$_c = 0;
|
184 |
+
foreach ($_mapped_stores as $locale) {
|
185 |
+
$locale_code = $locale['gl_locale_code'];
|
186 |
+
if ($locale_code != $source_store['gl_locale_code']) {
|
187 |
+
$_c++;
|
188 |
+
$locale_desc = $locale['gl_locale_desc'];
|
189 |
+
$val = "";
|
190 |
+
if ($_c == (count($_mapped_stores) - 1)) {
|
191 |
+
$val = "class=\"validate-one-required\"";
|
192 |
+
}
|
193 |
+
?>
|
194 |
+
<input type="checkbox" name="gl_target_locales[]" id="<?php echo $locale_code ?>" value="<?php echo $locale_code ?>" /><label id="label_<?php echo $locale_code ?>" for="<?php echo $locale_code ?>"> <?php echo $locale_desc ?> </label><br/>
|
195 |
+
<?php
|
196 |
+
}
|
197 |
+
}
|
198 |
+
?>
|
199 |
+
</td>
|
200 |
+
</tr>
|
201 |
+
<?php
|
202 |
+
}
|
203 |
+
?>
|
204 |
+
<tr>
|
205 |
+
<td class="label">
|
206 |
+
<label for="gl_submission_instructions">Submission Instructions</label>
|
207 |
+
</td>
|
208 |
+
<td class="value">
|
209 |
+
<textarea cols="20" rows="10" id="gl_submission_instructions" name="gl_submission_instructions" maxlength="1024" style="resize: none;height: 4em"></textarea>
|
210 |
+
</td>
|
211 |
+
</tr>
|
212 |
+
</table>
|
213 |
+
</fieldset>
|
214 |
+
</form>
|
215 |
+
<form id="cancel_form" name="cancel_form" method="post" action="<?php echo $this->getUrl('*/*/cancel') ?>">
|
216 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
217 |
+
<input type="hidden" name="object_type" value="<?php echo $object_type ?>"/>
|
218 |
+
<input type="hidden" name="store" value="<?php echo $selected_store_id ?>"/>
|
219 |
+
</form>
|
220 |
+
<script type="text/javascript">
|
221 |
+
var submissionForm = new varienForm('submission_form');
|
222 |
+
var cancelForm = new varienForm('cancel_form');
|
223 |
+
</script>
|
224 |
+
<script type="text/javascript">
|
225 |
+
//<![CDATA[
|
226 |
+
function validateDate(cal) {
|
227 |
+
if (cal != null) {
|
228 |
+
$date = cal.date;
|
229 |
+
} else {
|
230 |
+
$dateField = document.getElementsByName("gl_due_date")[0].value;
|
231 |
+
$date = new Date($dateField);
|
232 |
+
}
|
233 |
+
if(new Date()>$date) {
|
234 |
+
document.getElementById("gl_due_date").value = "";
|
235 |
+
alert('Please select a future date.');
|
236 |
+
return false;
|
237 |
+
}
|
238 |
+
return true;
|
239 |
+
}
|
240 |
+
Calendar.setup({
|
241 |
+
inputField : 'gl_due_date',
|
242 |
+
ifFormat : '%m/%e/%Y',
|
243 |
+
button : 'gl_due_date_image',
|
244 |
+
align : 'Bl',
|
245 |
+
singleClick : true,
|
246 |
+
onUpdate : validateDate
|
247 |
+
});
|
248 |
+
function changeSourceLocale(obj) {
|
249 |
+
$sourceLocale = obj.value;
|
250 |
+
$arr = document.getElementsByName("gl_target_locales[]");
|
251 |
+
if($arr != null && $arr != undefined) {
|
252 |
+
for (i=0;i<$arr.length;i++) {
|
253 |
+
if($arr[i].value == $sourceLocale) {
|
254 |
+
$arr[i].checked = false;
|
255 |
+
document.getElementById("chk_" + $sourceLocale).style.display = "none";
|
256 |
+
} else {
|
257 |
+
$arr[i].checked = false;
|
258 |
+
document.getElementById("chk_" + $arr[i].value).style.display = "block";
|
259 |
+
}
|
260 |
+
|
261 |
+
}
|
262 |
+
}
|
263 |
+
}
|
264 |
+
function validateTargetLocales() {
|
265 |
+
$arr = document.getElementsByName("gl_target_locales[]");
|
266 |
+
if($arr != null && $arr != undefined) {
|
267 |
+
$count = 0;
|
268 |
+
for (i=0;i<$arr.length;i++) {
|
269 |
+
if($arr[i].checked) {
|
270 |
+
$count++;
|
271 |
+
}
|
272 |
+
}
|
273 |
+
if($count == 0) {
|
274 |
+
alert('Please select at least one target language.');
|
275 |
+
return false;
|
276 |
+
}
|
277 |
+
} else {
|
278 |
+
return false;
|
279 |
+
}
|
280 |
+
return true;
|
281 |
+
}
|
282 |
+
//]]>
|
283 |
+
</script>
|
284 |
+
<?php
|
285 |
+
}
|
286 |
+
}
|
287 |
+
}
|
288 |
+
catch (Exception $ex) {
|
289 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
290 |
+
$error_msg = 'Globallink WebService Error - ' . $ex->getMessage();
|
291 |
+
}
|
292 |
+
if (isset($error_msg) && $error_msg != '') {
|
293 |
+
?>
|
294 |
+
<div class="entry-edit">
|
295 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
296 |
+
</div>
|
297 |
+
<?php
|
298 |
+
}
|
299 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/glemailtemplate.phtml
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
4 |
+
$config_set = FALSE;
|
5 |
+
if (isset($gl_config_arr) && count($gl_config_arr) > 0) {
|
6 |
+
$config_set = TRUE;
|
7 |
+
}
|
8 |
+
if (!$config_set) {
|
9 |
+
?>
|
10 |
+
<div class="entry-edit">
|
11 |
+
<span style="color:red;text-align: center">GlobalLink Configurations Not Found.</span>
|
12 |
+
</div>
|
13 |
+
<?php
|
14 |
+
}
|
15 |
+
else {
|
16 |
+
$_mapped_stores = $this->getMappedStores();
|
17 |
+
?>
|
18 |
+
<div class="content-header">
|
19 |
+
<table cellspacing="0">
|
20 |
+
<tr>
|
21 |
+
<td style="width:50%;"><h3>GlobalLink - Translate Email Templates</h3></td>
|
22 |
+
<td class="a-right">
|
23 |
+
<button onclick="submitMassForm()" class="scalable add" type="button"><span> Create Submission </span></button>
|
24 |
+
</td>
|
25 |
+
</tr>
|
26 |
+
</table>
|
27 |
+
</div>
|
28 |
+
<?php if (count($_mapped_stores) == 0) { ?>
|
29 |
+
<div id="staging_store_container">
|
30 |
+
<p class="switcher"><span style="color:red;text-align: center">GlobalLink Locale Mapping Not Found.</span></p>
|
31 |
+
</div>
|
32 |
+
<?php
|
33 |
+
}
|
34 |
+
else {
|
35 |
+
?>
|
36 |
+
<div>
|
37 |
+
<?php echo $this->getGridHtml() ?>
|
38 |
+
</div>
|
39 |
+
<script type="text/javascript">
|
40 |
+
//<![CDATA[
|
41 |
+
if(document.getElementById("glemailtemplateGrid_massaction-select") != null
|
42 |
+
&& document.getElementById("glemailtemplateGrid_massaction-select") != undefined) {
|
43 |
+
document.getElementById("glemailtemplateGrid_massaction-select").value = "add";
|
44 |
+
var form = $('glemailtemplateGrid_massaction-form');
|
45 |
+
$('glemailtemplateGrid_massaction-form').addClassName('no-display');
|
46 |
+
$('glemailtemplateGrid_product_filter_massaction').addClassName('no-display');
|
47 |
+
}
|
48 |
+
function submitMassForm() {
|
49 |
+
glemailtemplateGrid_massactionJsObject.apply();
|
50 |
+
}
|
51 |
+
//]]>
|
52 |
+
</script>
|
53 |
+
<?php
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
catch (Exception $ex) {
|
58 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
59 |
+
$error_msg = 'Globallink Error - ' . $ex->getMessage();
|
60 |
+
}
|
61 |
+
if (isset($error_msg) && $error_msg != '') {
|
62 |
+
?>
|
63 |
+
<div class="entry-edit">
|
64 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
65 |
+
</div>
|
66 |
+
<?php
|
67 |
+
}
|
68 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/glfield.phtml
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$selected_object_type = str_replace("-", "/", $this->getRequest()->getParam('selected_object_type', ''));
|
4 |
+
$_objectTypes = Mage::helper("globallink")->getObjectTypeOptions(array('catalog/product'));
|
5 |
+
Mage::helper("globallink")->gl_debug("glfieldconfig phtml", $selected_object_type);
|
6 |
+
?>
|
7 |
+
<div class="content-header">
|
8 |
+
<table cellspacing="0">
|
9 |
+
<tr>
|
10 |
+
<td style="width:50%;"><h3>GlobalLink - Configure Fields For Translation</h3></td>
|
11 |
+
<td class="a-right">
|
12 |
+
<?php if ($selected_object_type != ''): ?>
|
13 |
+
<button onclick="updateAction()" class="scalable save" type="button"><span> Update Configuration </span></button>
|
14 |
+
<?php endif; ?>
|
15 |
+
</td>
|
16 |
+
</tr>
|
17 |
+
</table>
|
18 |
+
</div>
|
19 |
+
<?php if (count($_objectTypes) > 0): ?>
|
20 |
+
<div id="staging_store_container">
|
21 |
+
<p class="switcher"><label for="selected_object_type"><b><?php echo $this->__('Choose Type:') ?></b> </label>
|
22 |
+
<select name="selected_object_type" id="selected_object_type" class="left-col-block" onchange="return switchObjectType(this);">
|
23 |
+
<option value=""> -- Select -- </option>
|
24 |
+
<?php foreach ($_objectTypes as $code => $_objectType): ?>
|
25 |
+
<option value="<?php echo $code ?>" <?php if ($selected_object_type == $code): ?> selected="selected"<?php endif; ?>><?php echo $this->escapeHtml($_objectType) ?></option>
|
26 |
+
<?php endforeach; ?>
|
27 |
+
</select>
|
28 |
+
</p>
|
29 |
+
</div>
|
30 |
+
<?php endif; ?>
|
31 |
+
<?php if ($selected_object_type != ''): ?>
|
32 |
+
<form id="update_form" name="update_form" method="post" action="">
|
33 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
34 |
+
<input type="hidden" name="selected_object_type" value="<?php echo $selected_object_type ?>"/>
|
35 |
+
<div>
|
36 |
+
<?php echo $this->getGridHtml() ?>
|
37 |
+
</div>
|
38 |
+
</form>
|
39 |
+
<form id="insert_form" name="insert_form" method="post" action="<?php echo $this->getUrl('*/*/insert') ?>">
|
40 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
41 |
+
<input type="hidden" name="selected_object_type" value="<?php echo $selected_object_type ?>"/>
|
42 |
+
<br/>
|
43 |
+
<div class="entry-edit">
|
44 |
+
<div class="entry-edit-head">
|
45 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Add New Field</h4>
|
46 |
+
</div>
|
47 |
+
<fieldset id="group_fields">
|
48 |
+
<table class="form-list" >
|
49 |
+
<tr>
|
50 |
+
<td class="label">
|
51 |
+
<label for="field_code">Code <span class="required">*</span> </label>
|
52 |
+
</td>
|
53 |
+
<td class="value">
|
54 |
+
<input type="text" name="field_code" id="field_code" size="120" class="input-text required-entry" />
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
+
<tr>
|
58 |
+
<td class="label">
|
59 |
+
<label for="field_name">Name <span class="required">*</span> </label>
|
60 |
+
</td>
|
61 |
+
<td class="value">
|
62 |
+
<input type="text" name="field_name" id="field_name" size="120" class="input-text required-entry" />
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
<tr>
|
66 |
+
<td class="label">
|
67 |
+
<label for="include_in_translation">Translate </label>
|
68 |
+
</td>
|
69 |
+
<td class="value">
|
70 |
+
<input type="checkbox" name="include_in_translation" id="include_in_translation" checked="true" value="1"/>
|
71 |
+
</td>
|
72 |
+
</tr>
|
73 |
+
</table>
|
74 |
+
<br/>
|
75 |
+
<div><button onclick="insertForm.submit()" class="scalable add" type="button"><span> Add New Field </span></button></div>
|
76 |
+
</fieldset>
|
77 |
+
</div>
|
78 |
+
</form>
|
79 |
+
<?php endif; ?>
|
80 |
+
<script type="text/javascript">
|
81 |
+
function switchObjectType(obj) {
|
82 |
+
var val = obj.value.replace("/","-");
|
83 |
+
var storeParam = obj.value ? 'selected_object_type/' + val + '/' : '';
|
84 |
+
setLocation('<?php echo $this->getUrl('*/*') ?>' + storeParam);
|
85 |
+
return true;
|
86 |
+
}
|
87 |
+
function updateAction() {
|
88 |
+
document.update_form.action ="<?php echo $this->getUrl('*/*/update') ?>";
|
89 |
+
updateForm.submit();
|
90 |
+
}
|
91 |
+
</script>
|
92 |
+
<script type="text/javascript">
|
93 |
+
var updateForm = new varienForm('update_form');
|
94 |
+
var insertForm = new varienForm('insert_form');
|
95 |
+
</script>
|
96 |
+
<?php
|
97 |
+
}
|
98 |
+
catch (Exception $ex) {
|
99 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
100 |
+
$error_msg = 'Globallink WebService Error - ' . $ex->getMessage();
|
101 |
+
}
|
102 |
+
if (isset($error_msg) && $error_msg != '') {
|
103 |
+
?>
|
104 |
+
<div class="entry-edit">
|
105 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
106 |
+
</div>
|
107 |
+
<?php
|
108 |
+
}
|
109 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/glnewslettertemplate.phtml
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
4 |
+
$config_set = FALSE;
|
5 |
+
if (isset($gl_config_arr) && count($gl_config_arr) > 0) {
|
6 |
+
$config_set = TRUE;
|
7 |
+
}
|
8 |
+
if (!$config_set) {
|
9 |
+
?>
|
10 |
+
<div class="entry-edit">
|
11 |
+
<span style="color:red;text-align: center">GlobalLink Configurations Not Found.</span>
|
12 |
+
</div>
|
13 |
+
<?php
|
14 |
+
}
|
15 |
+
else {
|
16 |
+
$_mapped_stores = $this->getMappedStores();
|
17 |
+
?>
|
18 |
+
<div class="content-header">
|
19 |
+
<table cellspacing="0">
|
20 |
+
<tr>
|
21 |
+
<td style="width:50%;"><h3>GlobalLink - Translate Newsletter Templates</h3></td>
|
22 |
+
<td class="a-right">
|
23 |
+
<button onclick="submitMassForm()" class="scalable add" type="button"><span> Create Submission </span></button>
|
24 |
+
</td>
|
25 |
+
</tr>
|
26 |
+
</table>
|
27 |
+
</div>
|
28 |
+
<?php if (count($_mapped_stores) == 0) { ?>
|
29 |
+
<div id="staging_store_container">
|
30 |
+
<p class="switcher"><span style="color:red;text-align: center">GlobalLink Locale Mapping Not Found.</span></p>
|
31 |
+
</div>
|
32 |
+
<?php
|
33 |
+
}
|
34 |
+
else {
|
35 |
+
?>
|
36 |
+
<div>
|
37 |
+
<?php echo $this->getGridHtml() ?>
|
38 |
+
</div>
|
39 |
+
<script type="text/javascript">
|
40 |
+
//<![CDATA[
|
41 |
+
if(document.getElementById("glnewslettertemplateGrid_massaction-select") != null
|
42 |
+
&& document.getElementById("glnewslettertemplateGrid_massaction-select") != undefined) {
|
43 |
+
document.getElementById("glnewslettertemplateGrid_massaction-select").value = "add";
|
44 |
+
var form = $('glnewslettertemplateGrid_massaction-form');
|
45 |
+
$('glnewslettertemplateGrid_massaction-form').addClassName('no-display');
|
46 |
+
$('glnewslettertemplateGrid_product_filter_massaction').addClassName('no-display');
|
47 |
+
}
|
48 |
+
function submitMassForm() {
|
49 |
+
glnewslettertemplateGrid_massactionJsObject.apply();
|
50 |
+
}
|
51 |
+
//]]>
|
52 |
+
</script>
|
53 |
+
<?php
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
catch (Exception $ex) {
|
58 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
59 |
+
$error_msg = 'Globallink Error - ' . $ex->getMessage();
|
60 |
+
}
|
61 |
+
if (isset($error_msg) && $error_msg != '') {
|
62 |
+
?>
|
63 |
+
<div class="entry-edit">
|
64 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
65 |
+
</div>
|
66 |
+
<?php
|
67 |
+
}
|
68 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/glproduct.phtml
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
4 |
+
$config_set = FALSE;
|
5 |
+
if (isset($gl_config_arr) && count($gl_config_arr) > 0) {
|
6 |
+
$config_set = TRUE;
|
7 |
+
}
|
8 |
+
if (!$config_set) {
|
9 |
+
?>
|
10 |
+
<div class="entry-edit">
|
11 |
+
<span style="color:red;text-align: center">GlobalLink Configurations Not Found.</span>
|
12 |
+
</div>
|
13 |
+
<?php
|
14 |
+
}
|
15 |
+
else {
|
16 |
+
$gl_product_filter = Mage::getSingleton('core/session')->getProductFilter();
|
17 |
+
$_mapped_stores = $this->getMappedStores();
|
18 |
+
?>
|
19 |
+
<div class="content-header">
|
20 |
+
<table cellspacing="0">
|
21 |
+
<tr>
|
22 |
+
<td style="width:50%;"><h3>GlobalLink - Translate Products</h3></td>
|
23 |
+
<td class="a-right">
|
24 |
+
<button onclick="submitMassForm()" class="scalable add" type="button"><span> Create Submission </span></button>
|
25 |
+
</td>
|
26 |
+
</tr>
|
27 |
+
</table>
|
28 |
+
</div>
|
29 |
+
<?php if (count($_mapped_stores) == 0) { ?>
|
30 |
+
<div id="staging_store_container">
|
31 |
+
<p class="switcher"><span style="color:red;text-align: center">GlobalLink Locale Mapping Not Found.</span></p>
|
32 |
+
</div>
|
33 |
+
<?php
|
34 |
+
}
|
35 |
+
else {
|
36 |
+
$selected_store_id = $this->getRequest()->getParam('store', '');
|
37 |
+
if ($selected_store_id == '') {
|
38 |
+
$selected_store_id = Mage::helper("globallink")->get_default_gl_store_id();
|
39 |
+
if ($selected_store_id == '') $selected_store_id = 0;
|
40 |
+
}
|
41 |
+
?>
|
42 |
+
<?php if (!$this->isSingleStoreMode()): ?>
|
43 |
+
<?php
|
44 |
+
$source_store = array();
|
45 |
+
$_mapped_stores = $this->getMappedStores();
|
46 |
+
Mage::helper("globallink")->gl_debug("gl_category phtml", $_mapped_stores);
|
47 |
+
?>
|
48 |
+
<?php if (count($_mapped_stores) > 0): ?>
|
49 |
+
<div class="switcher">
|
50 |
+
<label for="source_lang_store"><b><?php echo $this->__('Choose Store View:') ?></b> </label>
|
51 |
+
<select name="source_lang_store" id="source_lang_store" class="left-col-block" onchange="return switchStore(this);">
|
52 |
+
<option value=""> -- Select --</option>
|
53 |
+
<?php foreach ($_mapped_stores as $_store): ?>
|
54 |
+
<?php
|
55 |
+
if ($selected_store_id == $_store['store_id']) {
|
56 |
+
$source_store = $_store;
|
57 |
+
}
|
58 |
+
?>
|
59 |
+
<option value="<?php echo $_store['store_id'] ?>" <?php if ($selected_store_id == $_store['store_id']): ?> selected="selected"<?php endif; ?>><?php echo $this->escapeHtml($_store['store_name']) ?></option>
|
60 |
+
<?php endforeach; ?>
|
61 |
+
</select>
|
62 |
+
</div>
|
63 |
+
<div class="switcher">
|
64 |
+
<form id="filter_form" name="filter_form" method="post" action="<?php echo $this->getUrl('*/*/filter') ?>">
|
65 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
66 |
+
<input name="store_id" type="hidden" value="<?php echo $selected_store_id ?>" />
|
67 |
+
<label for="globallink_modified"><b><?php echo $this->__('Show: ') ?></b> </label>
|
68 |
+
<input type="radio" name="globallink_product_filter" value="0" <?php if (!$gl_product_filter || $gl_product_filter == 0): echo 'checked="checked"'; endif; ?> /><label class="option" for="globallink_product_filter"> Modified Content </label>
|
69 |
+
<input type="radio" name="globallink_product_filter" value="1" <?php if ($gl_product_filter == 1) : echo 'checked="checked"'; endif; ?> /><label class="option" for="globallink_product_filter" style="padding-right:15px;"> Everything </label>
|
70 |
+
<button onclick="filterForm.submit()" class="scalable" type="button"><span> Filter</span></button>
|
71 |
+
</form>
|
72 |
+
</div>
|
73 |
+
<?php endif; ?>
|
74 |
+
<?php endif; ?>
|
75 |
+
<div>
|
76 |
+
<?php
|
77 |
+
if ($selected_store_id != 0) {
|
78 |
+
echo $this->getGridHtml();
|
79 |
+
}
|
80 |
+
?>
|
81 |
+
</div>
|
82 |
+
<script type="text/javascript">
|
83 |
+
var filterForm = new varienForm('filter_form');
|
84 |
+
</script>
|
85 |
+
<script type="text/javascript">
|
86 |
+
//<![CDATA[
|
87 |
+
if(document.getElementById("glproductGrid_massaction-select") != null
|
88 |
+
&& document.getElementById("glproductGrid_massaction-select") != undefined) {
|
89 |
+
document.getElementById("glproductGrid_massaction-select").value = "add";
|
90 |
+
var form = $('glproductGrid_massaction-form');
|
91 |
+
$('glproductGrid_massaction-form').addClassName('no-display');
|
92 |
+
$('glproductGrid_product_filter_massaction').addClassName('no-display');
|
93 |
+
}
|
94 |
+
function submitMassForm() {
|
95 |
+
var input = document.createElement("input");
|
96 |
+
input.setAttribute("type", "hidden");
|
97 |
+
input.setAttribute("name", "store");
|
98 |
+
input.setAttribute("value", <?php echo $selected_store_id ?>);
|
99 |
+
document.getElementById("glproductGrid_massaction-form").appendChild(input);
|
100 |
+
glproductGrid_massactionJsObject.apply();
|
101 |
+
}
|
102 |
+
function switchStore(obj) {
|
103 |
+
var storeParam = obj.value ? 'store/' + obj.value + '/' : '';
|
104 |
+
setLocation('<?php echo $this->getUrl('*/*') ?>' + storeParam);
|
105 |
+
return true;
|
106 |
+
}
|
107 |
+
//]]>
|
108 |
+
</script>
|
109 |
+
<?php
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
catch (Exception $ex) {
|
114 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
115 |
+
$error_msg = 'Globallink Error - ' . $ex->getMessage();
|
116 |
+
}
|
117 |
+
if (isset($error_msg) && $error_msg != '') {
|
118 |
+
?>
|
119 |
+
<div class="entry-edit">
|
120 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
121 |
+
</div>
|
122 |
+
<?php
|
123 |
+
}
|
124 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/glreceivetranslations.phtml
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
4 |
+
$config_set = FALSE;
|
5 |
+
if (isset($gl_config_arr) && count($gl_config_arr) > 0) {
|
6 |
+
$config_set = TRUE;
|
7 |
+
}
|
8 |
+
if (!$config_set) {
|
9 |
+
?>
|
10 |
+
<div class="entry-edit">
|
11 |
+
<span style="color:red;text-align: center">GlobalLink Configurations Not Found.</span>
|
12 |
+
</div>
|
13 |
+
<?php
|
14 |
+
}
|
15 |
+
else {
|
16 |
+
Mage::unregister('gl_target_arr');
|
17 |
+
$gl_arr = Mage::helper("globallink")->gl_get_all_completed_targets();
|
18 |
+
$count = is_array($gl_arr) ? count($gl_arr) : 0;
|
19 |
+
Mage::register('gl_target_arr', $gl_arr);
|
20 |
+
Mage::helper("globallink")->gl_debug("[" . __FILE__ . "][" . __LINE__ . "][" . __METHOD__ . "]", $count);
|
21 |
+
?>
|
22 |
+
<div class="content-header">
|
23 |
+
<table cellspacing="0">
|
24 |
+
<tr>
|
25 |
+
<td style="width:50%;"><h3>GlobalLink - Receive Translations</h3></td>
|
26 |
+
<td class="a-right">
|
27 |
+
<button onclick="this.disabled=true;this.setAttribute('class', 'disabled');refreshForm.submit();" class="scalable" type="button"><span> Refresh </span></button>
|
28 |
+
<?php if ($count > 0): ?>
|
29 |
+
<button onclick="if(checkSelectedRows()){selectForm.submit()}" class="scalable save" type="button"><span> Update Selected Records </span></button>
|
30 |
+
<button onclick="updateForm.submit()" class="scalable save" type="button"><span> Update All Completed Records </span></button>
|
31 |
+
<button onclick="clearForm.submit()" class="scalable save" type="button"><span> Clear Deleted Records </span></button>
|
32 |
+
<?php endif; ?>
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
</table>
|
36 |
+
</div>
|
37 |
+
<?php if ($count == 0): ?>
|
38 |
+
<div id="staging_store_container">
|
39 |
+
<p class="switcher"><span style="color:red;text-align: center">No Completed Translations Found.</span></p>
|
40 |
+
</div>
|
41 |
+
<?php endif; ?>
|
42 |
+
<?php if ($count > 0): ?>
|
43 |
+
<form id="clear_form" name="clear_form" method="post" action="<?php echo $this->getUrl('*/*/clear') ?>">
|
44 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
45 |
+
</form>
|
46 |
+
<form id="update_form" name="update_form" method="post" action="<?php echo $this->getUrl('*/*/update') ?>">
|
47 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
48 |
+
</form>
|
49 |
+
<form id="select_form" name="select_form" method="post" action="<?php echo $this->getUrl('*/*/select') ?>">
|
50 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
51 |
+
<div>
|
52 |
+
<?php echo $this->getGridHtml() ?>
|
53 |
+
</div>
|
54 |
+
</form>
|
55 |
+
<?php endif; ?>
|
56 |
+
<form id="refresh_form" name="refresh_form" method="post" action="<?php echo $this->getUrl('*/*/refresh') ?>">
|
57 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
58 |
+
</form>
|
59 |
+
<script type="text/javascript">
|
60 |
+
function checkSelectedRows() {
|
61 |
+
$success = false;
|
62 |
+
$arr = document.getElementsByName("gl_status_ids[]");
|
63 |
+
if($arr != null && $arr != undefined) {
|
64 |
+
for (i=0;i<$arr.length;i++) {
|
65 |
+
if($arr[i].checked == true) {
|
66 |
+
$success = true;
|
67 |
+
}
|
68 |
+
}
|
69 |
+
if(!$success) {
|
70 |
+
alert('Please select items.');
|
71 |
+
return false;
|
72 |
+
}
|
73 |
+
} else {
|
74 |
+
return false;
|
75 |
+
}
|
76 |
+
return true;
|
77 |
+
}
|
78 |
+
</script>
|
79 |
+
<script type="text/javascript">
|
80 |
+
var selectForm = new varienForm('select_form');
|
81 |
+
var updateForm = new varienForm('update_form');
|
82 |
+
var refreshForm = new varienForm('refresh_form');
|
83 |
+
var clearForm = new varienForm('clear_form');
|
84 |
+
</script>
|
85 |
+
<?php
|
86 |
+
}
|
87 |
+
}
|
88 |
+
catch (Exception $ex) {
|
89 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
90 |
+
$error_msg = 'Globallink WebService Error - ' . $ex->getMessage();
|
91 |
+
}
|
92 |
+
if (isset($error_msg) && $error_msg != '') {
|
93 |
+
?>
|
94 |
+
<div class="entry-edit">
|
95 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
96 |
+
</div>
|
97 |
+
<?php
|
98 |
+
}
|
99 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/adminhtml/localeconfig.phtml
ADDED
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
|
4 |
+
$admin_store = Mage::app()->getStore();
|
5 |
+
$gl_locales = Mage::helper("globallink")->get_all_gl_locales(TRUE);
|
6 |
+
$mapped_locales = Mage::helper("globallink")->get_mapped_locales();
|
7 |
+
|
8 |
+
$default_store = "";
|
9 |
+
$stores = Mage::app()->getStores();
|
10 |
+
$store_arr = array();
|
11 |
+
$unmapped_store_arr = array();
|
12 |
+
$mapped_store_arr = array();
|
13 |
+
foreach ($stores as $store) {
|
14 |
+
if ($store->getIsActive()) {
|
15 |
+
$store_arr[$store->getStoreId()] = $store->getName();
|
16 |
+
$unmapped_store_arr[$store->getStoreId()] = $store->getName();
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
if (!isset($store_arr[Mage_Core_Model_App::ADMIN_STORE_ID])) {
|
21 |
+
$store_arr[Mage_Core_Model_App::ADMIN_STORE_ID] = $admin_store->getName();
|
22 |
+
}
|
23 |
+
|
24 |
+
if (!isset($unmapped_store_arr[Mage_Core_Model_App::ADMIN_STORE_ID])) {
|
25 |
+
$unmapped_store_arr[Mage_Core_Model_App::ADMIN_STORE_ID] = $admin_store->getName();
|
26 |
+
}
|
27 |
+
?>
|
28 |
+
|
29 |
+
<div class="content-header">
|
30 |
+
<table cellspacing="0" class="grid-header">
|
31 |
+
<tr>
|
32 |
+
<td><h3>GlobalLink - Locale Mapping</h3></td>
|
33 |
+
<td class="a-right">
|
34 |
+
<button onclick="if(checkSelectedRows()){deleteForm.submit()}" class="scalable delete" type="button"><span>Delete Locale Mapping</span></button>
|
35 |
+
</td>
|
36 |
+
</tr>
|
37 |
+
</table>
|
38 |
+
</div>
|
39 |
+
<form id="delete_form" name="delete_form" method="post" action="<?php echo $this->getUrl('*/*/edit') ?>">
|
40 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
41 |
+
<div class="entry-edit">
|
42 |
+
<div class="entry-edit-head">
|
43 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Locale Mapping</h4>
|
44 |
+
</div>
|
45 |
+
<div class="grid">
|
46 |
+
<table cellspacing="0" class="data">
|
47 |
+
<thead>
|
48 |
+
<tr class="headings">
|
49 |
+
<th class="no-link" style="width:5%">
|
50 |
+
<?php
|
51 |
+
if (isset($mapped_locales) && count($mapped_locales) > 0) {
|
52 |
+
?>
|
53 |
+
<input type='checkbox' id='selectAllCheckBox' onclick="javascript:selectAll(this);" >
|
54 |
+
<?php
|
55 |
+
}
|
56 |
+
?>
|
57 |
+
</th>
|
58 |
+
<th class="no-link" style="width:45%">GlobalLink Locale</th>
|
59 |
+
<th class="no-link" style="width:45%">Store</th>
|
60 |
+
<th class="no-link" style="width:5%">Default Source locale</th>
|
61 |
+
</tr>
|
62 |
+
</thead>
|
63 |
+
<tbody>
|
64 |
+
<?php
|
65 |
+
if (isset($mapped_locales) && count($mapped_locales) > 0) {
|
66 |
+
foreach ($mapped_locales as $locale) {
|
67 |
+
$locale_code = $locale['gl_locale_code'];
|
68 |
+
$locale_desc = $locale['gl_locale_desc'];
|
69 |
+
$store_id = $locale['store_id'];
|
70 |
+
$default = $locale['default'] == 1 ? "Yes" : "";
|
71 |
+
if ($locale['default'] == 1) {
|
72 |
+
$default_store = $store_id;
|
73 |
+
}
|
74 |
+
$store_name = '';
|
75 |
+
if (isset($store_arr[$store_id])) {
|
76 |
+
$store_name = $store_arr[$store_id];
|
77 |
+
$mapped_store_arr[$store_id] = $unmapped_store_arr[$store_id];
|
78 |
+
unset($unmapped_store_arr[$store_id]);
|
79 |
+
}
|
80 |
+
?>
|
81 |
+
<tr>
|
82 |
+
<td><input type="checkbox" name="mapped_locale_code[]" value="<?php echo $locale_code ?>"/></td>
|
83 |
+
<td><?php echo $locale_desc ?></td>
|
84 |
+
<td><?php echo $store_name ?></td>
|
85 |
+
<td><?php echo $default ?></td>
|
86 |
+
</tr>
|
87 |
+
<?php
|
88 |
+
}
|
89 |
+
}
|
90 |
+
else {
|
91 |
+
?>
|
92 |
+
<tr>
|
93 |
+
<td colspan="4">No items found.</td>
|
94 |
+
</tr>
|
95 |
+
<?php
|
96 |
+
}
|
97 |
+
?>
|
98 |
+
</tbody>
|
99 |
+
</table>
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
</form>
|
103 |
+
<br>
|
104 |
+
<form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/post') ?>">
|
105 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
106 |
+
<div class="entry-edit">
|
107 |
+
<div class="entry-edit-head">
|
108 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Add New Mapping</h4>
|
109 |
+
</div>
|
110 |
+
<fieldset id="grop_fields">
|
111 |
+
<table class="form-list">
|
112 |
+
<tr>
|
113 |
+
<td class="label">
|
114 |
+
<label for="gl_store">Store <span class="required">*</span> </label>
|
115 |
+
</td>
|
116 |
+
<td class="value">
|
117 |
+
<select class="input-text validate-select" name="gl_store" id="gl_store">
|
118 |
+
<option value=""> --Select-- </option>
|
119 |
+
<?php
|
120 |
+
foreach ($unmapped_store_arr as $key => $unmapped_store) {
|
121 |
+
?>
|
122 |
+
<option value="<?php echo $key ?>"><?php echo $unmapped_store ?></option>
|
123 |
+
<?php
|
124 |
+
}
|
125 |
+
?>
|
126 |
+
</select>
|
127 |
+
</td>
|
128 |
+
</tr>
|
129 |
+
<tr>
|
130 |
+
<td class="label">
|
131 |
+
<label for="gl_locale_code">GlobalLink Locale <span class="required">*</span> </label>
|
132 |
+
</td>
|
133 |
+
<td class="value">
|
134 |
+
<select class="input-text validate-select" name="gl_locale_code" id="gl_locale_code">
|
135 |
+
<option value=""> --Select-- </option>
|
136 |
+
<?php
|
137 |
+
foreach ($gl_locales as $gl_locale) {
|
138 |
+
?>
|
139 |
+
<option value="<?php echo $gl_locale['gl_locale_code'] ?>"><?php echo $gl_locale['gl_locale_desc'] ?></option>
|
140 |
+
<?php
|
141 |
+
}
|
142 |
+
?>
|
143 |
+
</select>
|
144 |
+
</td>
|
145 |
+
</tr>
|
146 |
+
<tr>
|
147 |
+
<td class="label">
|
148 |
+
<label for="gl_store">Default Source locale </label>
|
149 |
+
</td>
|
150 |
+
<td class="value">
|
151 |
+
<input type="checkbox" name="gl_default" id="gl_default" value="1"/>
|
152 |
+
</td>
|
153 |
+
</tr>
|
154 |
+
</table>
|
155 |
+
<br/>
|
156 |
+
<div><button onclick="editForm.submit()" class="scalable add" type="button"><span>Add Locale Mapping</span></button></div>
|
157 |
+
</fieldset>
|
158 |
+
</div>
|
159 |
+
</form>
|
160 |
+
<br>
|
161 |
+
<?php if (isset($mapped_locales) && count($mapped_locales) > 0) { ?>
|
162 |
+
<form id="default_form" name="default_form" method="post" action="<?php echo $this->getUrl('*/*/default') ?>">
|
163 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
164 |
+
<div class="entry-edit">
|
165 |
+
<div class="entry-edit-head">
|
166 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Change Default Store</h4>
|
167 |
+
</div>
|
168 |
+
<fieldset id="grop_fields">
|
169 |
+
<table class="form-list">
|
170 |
+
<tr>
|
171 |
+
<td class="label">
|
172 |
+
<label for="gl_locale_code">Store <span class="required">*</span> </label>
|
173 |
+
</td>
|
174 |
+
<td class="value">
|
175 |
+
<select class="input-text validate-select" name="gl_store" id="gl_store">
|
176 |
+
<option value=""> --Select-- </option>
|
177 |
+
<?php
|
178 |
+
foreach ($mapped_store_arr as $key => $mapped_store) {
|
179 |
+
if ($key == $default_store) {
|
180 |
+
continue;
|
181 |
+
}
|
182 |
+
?>
|
183 |
+
<option value="<?php echo $key ?>"><?php echo $mapped_store ?></option>
|
184 |
+
<?php
|
185 |
+
}
|
186 |
+
?>
|
187 |
+
</select>
|
188 |
+
</td>
|
189 |
+
<td class="label"><button onclick="defaultForm.submit()" class="scalable save" type="button"><span>Change Default Store</span></button></td>
|
190 |
+
</tr>
|
191 |
+
</table>
|
192 |
+
</fieldset>
|
193 |
+
</div>
|
194 |
+
</form>
|
195 |
+
<?php } ?>
|
196 |
+
<script language='Javascript'>
|
197 |
+
function selectAll(obj) {
|
198 |
+
var checked = false;
|
199 |
+
if(obj.checked == true) {
|
200 |
+
checked = true;
|
201 |
+
}
|
202 |
+
$arr = document.getElementsByName("mapped_locale_code[]");
|
203 |
+
for (i=0;i<$arr.length;i++) {
|
204 |
+
$arr[i].checked = checked;
|
205 |
+
}
|
206 |
+
}
|
207 |
+
function checkSelectedRows() {
|
208 |
+
$arr = document.getElementsByName("mapped_locale_code[]");
|
209 |
+
if($arr != null && $arr != undefined) {
|
210 |
+
for (i=0;i<$arr.length;i++) {
|
211 |
+
if($arr[i].checked == true) {
|
212 |
+
return true;
|
213 |
+
}
|
214 |
+
}
|
215 |
+
}
|
216 |
+
alert('Please select items.');
|
217 |
+
return false;
|
218 |
+
}
|
219 |
+
</script>
|
220 |
+
<script type="text/javascript">
|
221 |
+
var editForm = new varienForm('edit_form');
|
222 |
+
var deleteForm = new varienForm('delete_form');
|
223 |
+
var defaultForm = new varienForm('default_form');
|
224 |
+
</script>
|
225 |
+
<?php
|
226 |
+
}
|
227 |
+
catch (Exception $ex) {
|
228 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
229 |
+
$error_msg = 'Globallink WebService Error - ' . $ex->getMessage();
|
230 |
+
}
|
231 |
+
if (isset($error_msg) && $error_msg != '') {
|
232 |
+
?>
|
233 |
+
<div class="entry-edit">
|
234 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
235 |
+
</div>
|
236 |
+
<?php
|
237 |
+
}
|
238 |
+
?>
|
app/design/adminhtml/default/default/template/globallink/catalog/product/adaptor.phtml
ADDED
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
try {
|
3 |
+
$gl_config_arr = Mage::helper("globallink")->get_gl_configurations();
|
4 |
+
$config_set = FALSE;
|
5 |
+
if (isset($gl_config_arr) && count($gl_config_arr) > 0) {
|
6 |
+
$config_set = TRUE;
|
7 |
+
}
|
8 |
+
?>
|
9 |
+
|
10 |
+
<?php
|
11 |
+
if (!$config_set) {
|
12 |
+
?>
|
13 |
+
<div class="entry-edit">
|
14 |
+
<span style="color:red;text-align: center">GlobalLink Configurations Not Found.</span>
|
15 |
+
</div>
|
16 |
+
<?php
|
17 |
+
}
|
18 |
+
else {
|
19 |
+
$current_url = $this->helper('core/url')->getCurrentUrl();
|
20 |
+
$params = $this->getRequest()->getParams();
|
21 |
+
$current_store = isset($params['store']) ? $params['store'] : 0;
|
22 |
+
$gl_target_arr = Mage::helper("globallink")->get_mapped_locales();
|
23 |
+
$source_locale_code = '';
|
24 |
+
$source_locale_desc = '';
|
25 |
+
foreach ($gl_target_arr as $locale) {
|
26 |
+
if ($locale['store_id'] == $current_store) {
|
27 |
+
$source_locale_code = $locale['gl_locale_code'];
|
28 |
+
$source_locale_desc = $locale['gl_locale_desc'];
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
if ($source_locale_code == '') {
|
33 |
+
?>
|
34 |
+
<div class="entry-edit">
|
35 |
+
<span style="color:red;text-align: center">No GlobalLink locale mapping found for the current store view.</span>
|
36 |
+
</div>
|
37 |
+
<?php
|
38 |
+
}
|
39 |
+
else {
|
40 |
+
$_productId = $this->getProductId();
|
41 |
+
$model = Mage::getModel('catalog/product');
|
42 |
+
$_product = $model->setStoreId($current_store)->load($_productId);
|
43 |
+
$_productName = $_product->getName();
|
44 |
+
$attributes = $_product->getAttributes();
|
45 |
+
?>
|
46 |
+
<div class="content-header">
|
47 |
+
<table cellspacing="0" class="grid-header">
|
48 |
+
<tr>
|
49 |
+
<td><h3>GlobalLink</h3></td>
|
50 |
+
<td class="a-right">
|
51 |
+
<button onclick="if(checkSelectedRows()){adaptorForm.submit()}" class="scalable save" type="button"><span>Submit to GlobalLink</span></button>
|
52 |
+
</td>
|
53 |
+
</tr>
|
54 |
+
</table>
|
55 |
+
</div>
|
56 |
+
<form id="adaptor_form" name="adaptor_form" method="post" action="<?php echo $this->getUrl('globallink/adminhtml_adaptor/post') ?>">
|
57 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
58 |
+
<input name="product_id" type="hidden" value="<?php echo $_productId ?>" />
|
59 |
+
<input name="current_url" type="hidden" value="<?php echo $current_url ?>" />
|
60 |
+
<div class="entry-edit">
|
61 |
+
<div class="entry-edit-head">
|
62 |
+
<h4 class="icon-head head-edit-form fieldset-legend">GlobalLink Submission Details</h4>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<br/>
|
66 |
+
<fieldset id="group_fields">
|
67 |
+
<table class="form-list" >
|
68 |
+
<tr>
|
69 |
+
<td class="label">
|
70 |
+
<label for="gl_submission_name">Submission Name <span class="required">*</span> </label>
|
71 |
+
</td>
|
72 |
+
<td class="value">
|
73 |
+
<input type="text" class="input-text required-entry" name="gl_submission_name" id="gl_submission_name" size="120"
|
74 |
+
value="<?php echo "Magento-" . $_productName . "-" . time() ?>" />
|
75 |
+
</td>
|
76 |
+
</tr>
|
77 |
+
<tr>
|
78 |
+
<td class="label">
|
79 |
+
<label for="gl_due_date">Due Date <span class="required">*</span> </label>
|
80 |
+
</td>
|
81 |
+
<td class="value">
|
82 |
+
<input type="text" class="input-text required-entry" name="gl_due_date" id="gl_due_date" value='<?php echo date("m/d/Y", strtotime('+2 week')); ?>'/>
|
83 |
+
<img src="<?php echo $this->getSkinUrl('images/grid-cal.gif'); ?>" width="16" height="16" border="0" alt="Pick a date" id="gl_due_date_image" style="vertical-align: middle;">
|
84 |
+
</td>
|
85 |
+
</tr>
|
86 |
+
<tr>
|
87 |
+
<td class="label">
|
88 |
+
<label for="gl_project">Project Name <span class="required">*</span> </label>
|
89 |
+
</td>
|
90 |
+
<td class="value">
|
91 |
+
<select id="gl_project" name="gl_project" class="validate-select">
|
92 |
+
<?php
|
93 |
+
$proj_arr = Mage::helper("globallink")->get_pd_user_projects();
|
94 |
+
foreach ($proj_arr as $code => $name) {
|
95 |
+
?>
|
96 |
+
<option value="<?php echo $code ?>"><?php echo $name ?></option>
|
97 |
+
<?php
|
98 |
+
}
|
99 |
+
?>
|
100 |
+
</select>
|
101 |
+
</td>
|
102 |
+
</tr>
|
103 |
+
<tr>
|
104 |
+
<td class="label">
|
105 |
+
<label for="gl_priority">Priority <span class="required">*</span> </label>
|
106 |
+
</td>
|
107 |
+
<td class="value">
|
108 |
+
<select id="gl_priority" name="gl_priority" class="validate-select">
|
109 |
+
<option value="2">High </option>
|
110 |
+
<option value="1" selected>Normal </option>
|
111 |
+
<option value="0">Low </option>
|
112 |
+
</select>
|
113 |
+
</td>
|
114 |
+
</tr>
|
115 |
+
<tr>
|
116 |
+
<td class="label">
|
117 |
+
<label for="gl_source_locale">Source Language </label>
|
118 |
+
</td>
|
119 |
+
<td class="value">
|
120 |
+
<input type="hidden" name="gl_source_locale" value="<?php echo $source_locale_code ?>"/>
|
121 |
+
<?php echo $source_locale_desc ?>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
<tr>
|
125 |
+
<td class="label">
|
126 |
+
<label for="gl_target_locale">Target Language(s) <span class="required">*</span> </label>
|
127 |
+
</td>
|
128 |
+
<td class="value">
|
129 |
+
<?php
|
130 |
+
foreach ($gl_target_arr as $locale) {
|
131 |
+
if ($locale['store_id'] != $current_store) {
|
132 |
+
$locale_code = $locale['gl_locale_code'];
|
133 |
+
$locale_desc = $locale['gl_locale_desc'];
|
134 |
+
?>
|
135 |
+
<input type="checkbox" name="gl_target_locales[]" value='<?php echo $locale_code ?>'/> <?php echo $locale_desc ?> <br/>
|
136 |
+
<?php
|
137 |
+
}
|
138 |
+
}
|
139 |
+
?>
|
140 |
+
</td>
|
141 |
+
</tr>
|
142 |
+
</table>
|
143 |
+
</fieldset>
|
144 |
+
<br/>
|
145 |
+
<div class="entry-edit">
|
146 |
+
<div class="entry-edit-head">
|
147 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Product Details</h4>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
<div class="grid">
|
151 |
+
<table cellspacing="2" cellpadding="10" class="data">
|
152 |
+
<thead>
|
153 |
+
<tr class="headings">
|
154 |
+
<th class="no-link" style="width:5%;"><input type='checkbox' id='selectAllCheckBox' onclick="javascript:selectAll(this);" checked/> Translate? </th>
|
155 |
+
<th class="no-link" style="width:35%">Attribute Type</th>
|
156 |
+
<th class="no-link" style="width:60%">Text</th>
|
157 |
+
</tr>
|
158 |
+
</thead>
|
159 |
+
<tbody>
|
160 |
+
<?php
|
161 |
+
foreach ($attributes as $attribute) {
|
162 |
+
if ($attribute->getIsVisible() && !$attribute->getIsGlobal()) {
|
163 |
+
if ($attribute->getFrontendInput() == 'text' || $attribute->getFrontendInput() == 'textarea') {
|
164 |
+
$value = $attribute->getFrontend()->getValue($_product);
|
165 |
+
if (isset($value) && !is_array($value) && $value != '') {
|
166 |
+
$name = $attribute->getFrontend()->getLabel($_product);
|
167 |
+
$attributeId = $attribute->getId();
|
168 |
+
?>
|
169 |
+
<tr>
|
170 |
+
<td>
|
171 |
+
<input type="checkbox" name="gl_product_attribute_ids[]" value="<?php echo $attributeId; ?>" checked />
|
172 |
+
</td>
|
173 |
+
<td class="label">
|
174 |
+
<label for="description_label"><?php echo $name ?> </label>
|
175 |
+
</td>
|
176 |
+
<td class="value"><?php echo $value; ?></td>
|
177 |
+
</tr>
|
178 |
+
|
179 |
+
<?php
|
180 |
+
}
|
181 |
+
}
|
182 |
+
}
|
183 |
+
}
|
184 |
+
?>
|
185 |
+
</tbody>
|
186 |
+
</table>
|
187 |
+
</div>
|
188 |
+
</form>
|
189 |
+
<script language='Javascript'>
|
190 |
+
function selectAll(obj) {
|
191 |
+
var checked = false;
|
192 |
+
if(obj.checked == true) {
|
193 |
+
checked = true;
|
194 |
+
}
|
195 |
+
$arr = document.getElementsByName("gl_product_attribute_ids[]");
|
196 |
+
for (i=0;i<$arr.length;i++) {
|
197 |
+
$arr[i].checked = checked;
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
function checkSelectedRows() {
|
202 |
+
$success = false;
|
203 |
+
$arr = document.getElementsByName("gl_product_attribute_ids[]");
|
204 |
+
if($arr != null && $arr != undefined) {
|
205 |
+
for (i=0;i<$arr.length;i++) {
|
206 |
+
if($arr[i].checked == true) {
|
207 |
+
$success = true;
|
208 |
+
}
|
209 |
+
}
|
210 |
+
if(!$success) {
|
211 |
+
alert('Please select at least one attribute to translate.');
|
212 |
+
return false;
|
213 |
+
}
|
214 |
+
} else {
|
215 |
+
return false;
|
216 |
+
}
|
217 |
+
|
218 |
+
$arr = document.getElementsByName("gl_target_locales[]");
|
219 |
+
if($arr != null && $arr != undefined) {
|
220 |
+
$count = 0;
|
221 |
+
for (i=0;i<$arr.length;i++) {
|
222 |
+
if($arr[i].checked) {
|
223 |
+
$count++;
|
224 |
+
}
|
225 |
+
}
|
226 |
+
if($count == 0) {
|
227 |
+
alert('Please select at least one target language.');
|
228 |
+
return false;
|
229 |
+
}
|
230 |
+
} else {
|
231 |
+
return false;
|
232 |
+
}
|
233 |
+
|
234 |
+
return true;
|
235 |
+
}
|
236 |
+
|
237 |
+
function changeSourceLocale(obj) {
|
238 |
+
$sourceLocale = obj.value;
|
239 |
+
$arr = document.getElementsByName("gl_target_locales[]");
|
240 |
+
if($arr != null && $arr != undefined) {
|
241 |
+
for (i=0;i<$arr.length;i++) {
|
242 |
+
if($arr[i].value == $sourceLocale) {
|
243 |
+
$arr[i].checked = false;
|
244 |
+
document.getElementById("div_" + $sourceLocale).style.display = "none";
|
245 |
+
} else {
|
246 |
+
$arr[i].checked = true;
|
247 |
+
document.getElementById("div_" + $arr[i].value).style.display = "block";
|
248 |
+
}
|
249 |
+
}
|
250 |
+
}
|
251 |
+
}
|
252 |
+
</script>
|
253 |
+
<script type="text/javascript">
|
254 |
+
Calendar.setup({
|
255 |
+
inputField : 'gl_due_date',
|
256 |
+
ifFormat : '%m/%e/%y',
|
257 |
+
button : 'gl_due_date_image',
|
258 |
+
align : 'Bl',
|
259 |
+
singleClick : true
|
260 |
+
});
|
261 |
+
</script>
|
262 |
+
<script type="text/javascript">
|
263 |
+
var adaptorForm = new varienForm('adaptor_form');
|
264 |
+
</script>
|
265 |
+
|
266 |
+
<?php
|
267 |
+
}
|
268 |
+
}
|
269 |
+
}
|
270 |
+
catch (Exception $ex) {
|
271 |
+
Mage::helper("globallink")->gl_debug($ex->getFile() . ' - Line ' . $ex->getLine() . ': Globallink PHTML Generic Error = ', $ex->getMessage());
|
272 |
+
$error_msg = 'Globallink WebService Error - ' . $ex->getMessage();
|
273 |
+
}
|
274 |
+
if (isset($error_msg) && $error_msg != '') {
|
275 |
+
?>
|
276 |
+
<div class="entry-edit">
|
277 |
+
<span style="color:red;text-align: center"><?php echo $error_msg ?></span>
|
278 |
+
</div>
|
279 |
+
<?php
|
280 |
+
}
|
281 |
+
?>
|
app/etc/modules/Transperfect_Globallink.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Transperfect_Globallink>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Transperfect_Globallink>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>GlobalLink</name>
|
4 |
+
<version>2.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>Commercial License</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Translation extension from Translations.com</summary>
|
10 |
+
<description>GlobalLink extension that enables administrator to translate products, categories, CMS blocks, CMS pages, email and newsletter templates. This adaptor connects to GlobalLink Project Director, the complete localization workflow and automation tool from Translations.com, and exports and imports content in multiple languages.</description>
|
11 |
+
<notes>NA</notes>
|
12 |
+
<authors><author><name>Translations.com</name><user>translationscom</user><email>magento@translations.com</email></author></authors>
|
13 |
+
<date>2013-08-20</date>
|
14 |
+
<time>19:33:11</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Transperfect"><dir name="Globallink"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><file name="Adaptor.php" hash="6555d7668a001a0d731197978e7b5d2d"/></dir></dir><dir name="Glactivesubmissions"><file name="Grid.php" hash="cd73747356eaac3d451578fc8860198b"/></dir><file name="Glactivesubmissions.php" hash="57345884318deba8aaa3122f3c2f021b"/><dir name="Glcategory"><file name="Grid.php" hash="034e59e0202cb749a47f3572fb4db2ab"/></dir><file name="Glcategory.php" hash="2bce00d36700377d90206f42d9dd44eb"/><dir name="Glcmsblock"><file name="Grid.php" hash="3719f1cfabfcc58c296efdbacfe30c1b"/></dir><file name="Glcmsblock.php" hash="f0108caa2304fb725df9e5acbd1aa78e"/><dir name="Glcmspage"><file name="Grid.php" hash="cf59a66a9b9bc35363889be39f81566c"/></dir><file name="Glcmspage.php" hash="208b088c2ae52170bc48d17fdfcf14a0"/><dir name="Glemailtemplate"><file name="Grid.php" hash="5c5f48d78a00e57abd6a9757456060e3"/></dir><file name="Glemailtemplate.php" hash="8da91385ce206bbef12e19007dc7fd62"/><dir name="Glfield"><file name="Grid.php" hash="30e3d9f47b5a4b16e110555f7da62dbd"/></dir><file name="Glfield.php" hash="59c030327dc3429c16f9908aef394712"/><dir name="Glnewslettertemplate"><file name="Grid.php" hash="8f97ff775d57ca133af59756223d2309"/></dir><file name="Glnewslettertemplate.php" hash="baadde41ddf83f1774a8c50ea6e61ccb"/><dir name="Glproduct"><file name="Grid.php" hash="7155ffa84ef1a0c433c47831f6efa5ba"/></dir><file name="Glproduct.php" hash="76dc64283895d994feacffb1213961bf"/><dir name="Glreceivetranslations"><file name="Grid.php" hash="9bf1e58ffdfc48881e74c708c2ce8f71"/></dir><file name="Glreceivetranslations.php" hash="29be3e2b6265cd89bee8b9abc615c185"/><dir name="Renderer"><file name="Action.php" hash="6069ffdd4b04f76e0815430a68a323b4"/><file name="Delete.php" hash="8ed8095073cba7e7b43fd6ed27b0ea8b"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="64c598d7c37a5a772fd482af96295001"/></dir><dir name="Model"><file name="Glfield.php" hash="8429d112d68e7958c15318caff81ad60"/><file name="Glstatus.php" hash="471327b520290c6918312b5109f31401"/><file name="Gltranslatecsv.php" hash="dfa8df1ce637e04dfa215e7160bb589b"/><dir name="Mysql4"><dir name="Glfield"><file name="Collection.php" hash="23e3dff120ee04c06c35f6d25c20780b"/></dir><file name="Glfield.php" hash="207407c5340b52eaa2b4e90c6a74975e"/><dir name="Glstatus"><file name="Collection.php" hash="547fff63aacdc966f0581694d85611d9"/></dir><file name="Glstatus.php" hash="e1fda7634feaab67393a08a46c87f04a"/></dir><file name="Observer.php" hash="cc39b398cf92c2556653a458ea6ca2b5"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="7a1c2cabf8861479c8e29fbe2b7ebe7f"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AdaptorController.php" hash="692e3edf9205b56164d4d875fc16a30b"/><file name="AttributesetsController.php" hash="c7e8110e1413d6bb6858f9417d875cce"/><file name="ConfigurationController.php" hash="b37dae322b3edefbc1410f2837ddc0a2"/><file name="GlactivesubmissionsController.php" hash="a26c6635be23f0a853963895985ebe52"/><file name="GlcategoryController.php" hash="bcb9c72c45d4308fd5f644419cab889e"/><file name="GlcmsblockController.php" hash="135933258732eb007688eeacc75db1b4"/><file name="GlcmspageController.php" hash="fe601425e6894c6c43a8017ce301d8f6"/><file name="GlcreatesubmissionController.php" hash="59a27d4d25e63d943220b68ec77e6bfb"/><file name="GlemailtemplateController.php" hash="5205510ecd8c2e16115401e003618f90"/><file name="GlfieldController.php" hash="bfb7e525028f515c4ac43dc5adb0021c"/><file name="GlnewslettertemplateController.php" hash="a8fa023ae973ba48ff626726be3baa9c"/><file name="GlproductController.php" hash="1aadfbd9d8ee1bd373db31b83e942da2"/><file name="GlreceivetranslationsController.php" hash="e873c010ff0d73566743083fe172edc1"/><file name="LocaleconfigController.php" hash="1aab9c2027436b697904d7665a9f5535"/><dir name="gl_ws"><file name="GlobalLink.php" hash="586edae5915423c2215faedb51b68f0a"/><file name="ProjectDirector.php" hash="32514d766245931a31d3316600b66620"/><dir name="client"><file name="DocumentService2.php" hash="51d544d15a43e6d51ac739c347090798"/><file name="ProjectService2.php" hash="50a8439c82faf3abed33576cb3fe3149"/><file name="SessionService2.php" hash="8bcd9530aab946923a149e97009157e1"/><file name="SubmissionService2.php" hash="d0d5b90d91cf76b65d963ca0bb2460cc"/><file name="TargetService2.php" hash="43a0f89cb2ada57f78af21570ea7332b"/></dir><file name="gl_ws_common.php" hash="14ea1b2a845eb2888f44be98923d730a"/><file name="gl_ws_receive_translations.php" hash="d2fda36cb0a4c34d954e5e1a4d7cb3f0"/><file name="gl_ws_send_translations.php" hash="978b1c30219c39c0e8c7b3d67c6683ea"/><dir name="wsdl"><file name="DocumentService2.wsdl" hash="2882171313f45fb152d3159b24663e22"/><file name="ProjectService2.wsdl" hash="cdef77f0200785aba59d7b59fa008cd7"/><file name="SessionService2.wsdl" hash="0821fa774d4ef7a543259032425ead2c"/><file name="SubmissionService2.wsdl" hash="0c2432bcf019308633ead34146fa72be"/><file name="TargetService2.wsdl" hash="86503bc3fe6ba65980b23737c81abf4a"/><file name="types.xsd" hash="ae16a299d3b88e5bfa40f5563a459128"/><file name="typesInternal.xsd" hash="6e4a9cb6542d582fc806ebf019f5a088"/><file name="xmime.xsd" hash="fca5410de7d7205b0b44f1d088155404"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="bebf6510dec6e32445cfaa70ecb72baf"/></dir><dir name="sql"><dir name="globallink_setup"><file name="mysql4-install-1.0.0.php" hash="5cf3267828d71553443db6209a48bab4"/></dir></dir><file name="transperfect_cron_sample.php" hash="0d97411b7be565bfc0c7566d165e5a1c"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="globallink"><dir name="adminhtml"><file name="attributesets.phtml" hash="ed4a85b87b68dd19c2031c77f33dfa3a"/><file name="configuration.phtml" hash="76e6c5e9733ef492003d43387438125c"/><file name="glactivesubmissions.phtml" hash="0a502fe71b17b020011f2badc83fcded"/><file name="glcategory.phtml" hash="c7adc7cfb1b31f18df98762a4f7f6d72"/><file name="glcmsblock.phtml" hash="de40199cafd8abd0d3d3f050f9715483"/><file name="glcmspage.phtml" hash="d44e5d05a7eda74c0879d672b2627c78"/><file name="glcreatesubmission.phtml" hash="2d6c0f92c80207b0d0b007188ae50da4"/><file name="glemailtemplate.phtml" hash="94d98f7892f9b0306edc9af7fec46c81"/><file name="glfield.phtml" hash="66c0ba578a4b4649d6eb0c8fb6822af8"/><file name="glnewslettertemplate.phtml" hash="08a76bb52c4416d0c0d79ccb0c134728"/><file name="glproduct.phtml" hash="af898e6a193f06a50cbb3626f025fb5f"/><file name="glreceivetranslations.phtml" hash="ea72e507d01d049e99340f57821a1623"/><file name="localeconfig.phtml" hash="ac8606089727b3bf2b1db200325c7a0e"/></dir><dir name="catalog"><dir name="product"><file name="adaptor.phtml" hash="ee9a96591c5d0cf48d39ac5c685fefc8"/></dir></dir></dir></dir><dir name="layout"><file name="globallink.xml" hash="22cfe6e8b991bce6b8830220c73d35f6"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Transperfect_Globallink.xml" hash="aeca3599e1908b317fb17da77e2d6d2d"/></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|