Version Notes
First version of the plugin
Download this release
Release Info
Developer | Marketplace |
Extension | GroupDocsAssembly |
Version | 1.0.1 |
Comparing to | |
See all releases |
Version 1.0.1
- app/code/local/Gdass/Groupdocsassembly/Block/Adminhtml/Cms/Page/Edit.php +50 -0
- app/code/local/Gdass/Groupdocsassembly/Block/Adminhtml/Groupdocsassembly.php +7 -0
- app/code/local/Gdass/Groupdocsassembly/Helper/Data.php +5 -0
- app/code/local/Gdass/Groupdocsassembly/Model/Mysql4/Groupdocsassembly/Collection.php +9 -0
- app/code/local/Gdass/Groupdocsassembly/Model/Mysql4/groupdocsassembly.php +8 -0
- app/code/local/Gdass/Groupdocsassembly/Model/groupdocsassembly.php +9 -0
- app/code/local/Gdass/Groupdocsassembly/controllers/Adminhtml/AssemblyController.php +45 -0
- app/code/local/Gdass/Groupdocsassembly/etc/config.xml +119 -0
- app/code/local/Gdass/Groupdocsassembly/sql/Groupdocsassembly_setup/mysql4-install-0.1.0 +27 -0
- app/etc/modules/Gdass_Groupdocsassembly.xml +9 -0
- package.xml +32 -0
app/code/local/Gdass/Groupdocsassembly/Block/Adminhtml/Cms/Page/Edit.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script>
|
2 |
+
// Insert GroupDocs File ID at cms edit page
|
3 |
+
function gdfileid(){
|
4 |
+
var anchor = document.getElementsByTagName("a");
|
5 |
+
// Switch the right tab
|
6 |
+
for (var i = 0; i < anchor.length; i++){
|
7 |
+
if (anchor[i].className.match(/tab-item-link/) || anchor[i].className.match(/tab-item-link active/)){
|
8 |
+
if (anchor[i].title!="Content"){
|
9 |
+
anchor[i].className ="tab-item-link";
|
10 |
+
var tab1 = document.getElementById('page_tabs_main_section_content');
|
11 |
+
var tab3 = document.getElementById('page_tabs_design_section_content');
|
12 |
+
var tab4 = document.getElementById('page_tabs_meta_section_content');
|
13 |
+
tab1.style.display = 'none';
|
14 |
+
tab3.style.display = 'none';
|
15 |
+
tab4.style.display = 'none';
|
16 |
+
} else {
|
17 |
+
anchor[i].className ="tab-item-link active";
|
18 |
+
var tab2 = document.getElementById('page_tabs_content_section_content');
|
19 |
+
tab2.style.display = 'block';
|
20 |
+
}
|
21 |
+
}
|
22 |
+
}
|
23 |
+
// Enter GroupDocs File ID
|
24 |
+
var ans=prompt('Enter GroupDocs File ID:','');
|
25 |
+
if(ans.length<30) { alert('Sorry, but this File ID is too short'); return false; }
|
26 |
+
if(ans.length>70) { alert('Sorry, but this File ID is too big'); return false; }
|
27 |
+
// all good continue
|
28 |
+
var cmsName = 'Magento'
|
29 |
+
var cmsVersion = '1.7'
|
30 |
+
var iframe = '<iframe src="https://apps.groupdocs.com/assembly2/questionnaire-assembly/'+ans+'?&referer='+cmsName+'/'+cmsVersion+'" frameborder="0" width="600" height="400"></iframe>';
|
31 |
+
var tinyMceContent = tinyMCE.activeEditor.getContent();
|
32 |
+
// set content
|
33 |
+
tinyMCE.activeEditor.setContent(tinyMceContent+iframe);
|
34 |
+
|
35 |
+
|
36 |
+
}
|
37 |
+
</script>
|
38 |
+
<?php
|
39 |
+
class Gdass_Groupdocsassembly_Block_Adminhtml_Cms_Page_Edit extends Mage_Adminhtml_Block_Cms_Page_Edit {
|
40 |
+
public function __construct() {
|
41 |
+
|
42 |
+
parent::__construct();
|
43 |
+
|
44 |
+
$this->_addButton('button_id', array(
|
45 |
+
'label' => Mage::helper('cms')->__('GroupDocs Assembly File ID'),
|
46 |
+
'onclick' => 'gdfileid()',
|
47 |
+
'class' => 'go'
|
48 |
+
), 0, 100, 'footer', 'header');
|
49 |
+
}
|
50 |
+
}
|
app/code/local/Gdass/Groupdocsassembly/Block/Adminhtml/Groupdocsassembly.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdass_Groupdocsassembly_Block_Adminhtml_Groupdocsassembly extends Mage_Adminhtml_Block_Template {
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
}
|
app/code/local/Gdass/Groupdocsassembly/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdass_Groupdocsassembly_Helper_Data extends Mage_Core_Helper_Abstract {
|
4 |
+
|
5 |
+
}
|
app/code/local/Gdass/Groupdocsassembly/Model/Mysql4/Groupdocsassembly/Collection.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdass_Groupdocsassembly_Model_Mysql4_Groupdocsassembly_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('groupdocsassembly/groupdocsassembly');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Gdass/Groupdocsassembly/Model/Mysql4/groupdocsassembly.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gdass_Groupdocsassembly_Model_Mysql4_Groupdocsassembly extends Mage_Core_Model_Mysql4_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('groupdocsassembly/groupdocsassembly', 'id');
|
7 |
+
}
|
8 |
+
}
|
app/code/local/Gdass/Groupdocsassembly/Model/groupdocsassembly.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gdass_Groupdocsassembly_Model_Groupdocsassembly extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('groupdocsassembly/groupdocsassembly');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Gdass/Groupdocsassembly/controllers/Adminhtml/AssemblyController.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdass_Groupdocsassembly_Adminhtml_AssemblyController extends Mage_Adminhtml_Controller_Action
|
4 |
+
{
|
5 |
+
public $jj;
|
6 |
+
|
7 |
+
public function indexAction()
|
8 |
+
{
|
9 |
+
$this->loadLayout();
|
10 |
+
|
11 |
+
// gether data
|
12 |
+
$block = $this->getLayout()->getBlock('viewer');
|
13 |
+
// //on initialize la variable
|
14 |
+
// $retour = '';
|
15 |
+
// /* we are doing the query to select all elements of the pfay_test table (thanks to our model test/test and we sort them by id_pfay_test */
|
16 |
+
// $collection = Mage::getModel('groupdocsassembly/groupdocsassembly')->getCollection()
|
17 |
+
// ->setOrder('id');
|
18 |
+
//
|
19 |
+
// /* then, we check the result of the query and with the function getData() */
|
20 |
+
// foreach ($collection as $data) {
|
21 |
+
// $retour.= $data->getData('id') .' => '. $data->getData('file_id') . '<br />';
|
22 |
+
// }
|
23 |
+
// $block->setData('doc',$retour);
|
24 |
+
|
25 |
+
$this->renderLayout();
|
26 |
+
}
|
27 |
+
|
28 |
+
public function postAction()
|
29 |
+
{
|
30 |
+
$post = $this->getRequest()->getPost();
|
31 |
+
try {
|
32 |
+
if (empty($post)) {
|
33 |
+
Mage::throwException($this->__('Invalid form data.'));
|
34 |
+
}
|
35 |
+
|
36 |
+
/* here's your form processing */
|
37 |
+
|
38 |
+
$message = $this->__('Your form has been submitted successfully.');
|
39 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
40 |
+
} catch (Exception $e) {
|
41 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
42 |
+
}
|
43 |
+
$this->_redirect('*/*');
|
44 |
+
}
|
45 |
+
}
|
app/code/local/Gdass/Groupdocsassembly/etc/config.xml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Gdass_Groupdocsassembly>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Gdass_Groupdocsassembly>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<global>
|
10 |
+
|
11 |
+
<blocks>
|
12 |
+
<adminhtml>
|
13 |
+
<rewrite>
|
14 |
+
<cms_page_edit>Gdass_Groupdocsassembly_Block_Adminhtml_Cms_Page_Edit</cms_page_edit>
|
15 |
+
</rewrite>
|
16 |
+
</adminhtml>
|
17 |
+
</blocks>
|
18 |
+
|
19 |
+
|
20 |
+
<models>
|
21 |
+
<groupdocsassembly>
|
22 |
+
<class>Gdass_Groupdocsassembly_Model</class>
|
23 |
+
<resourceModel>groupdocsassembly_mysql4</resourceModel>
|
24 |
+
</groupdocsassembly>
|
25 |
+
<groupdocsassembly_mysql4>
|
26 |
+
<class>Gdass_Groupdocsassembly_Model_Mysql4</class>
|
27 |
+
<entities>
|
28 |
+
<groupdocsassembly>
|
29 |
+
<table>groupdocsass</table>
|
30 |
+
</groupdocsassembly>
|
31 |
+
</entities>
|
32 |
+
</groupdocsassembly_mysql4>
|
33 |
+
</models>
|
34 |
+
<resources>
|
35 |
+
<groupdocsassembly_write>
|
36 |
+
<connection>
|
37 |
+
<use>core_write</use>
|
38 |
+
</connection>
|
39 |
+
</groupdocsassembly_write>
|
40 |
+
|
41 |
+
<groupdocsassembly_read>
|
42 |
+
<connection>
|
43 |
+
<use>core_read</use>
|
44 |
+
</connection>
|
45 |
+
</groupdocsassembly_read>
|
46 |
+
|
47 |
+
<groupdocsassembly_delete>
|
48 |
+
<connection>
|
49 |
+
<use>core_delete</use>
|
50 |
+
</connection>
|
51 |
+
</groupdocsassembly_delete>
|
52 |
+
</resources>
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
<blocks>
|
59 |
+
<groupdocsviewer>
|
60 |
+
<class>Gdass_Groupdocsassembly_Block</class>
|
61 |
+
</groupdocsviewer>
|
62 |
+
</blocks>
|
63 |
+
<helpers>
|
64 |
+
<groupdocsviewer>
|
65 |
+
<class>Gdass_Groupdocsassembly_Helper</class>
|
66 |
+
</groupdocsviewer>
|
67 |
+
</helpers>
|
68 |
+
</global>
|
69 |
+
|
70 |
+
<admin>
|
71 |
+
<routers>
|
72 |
+
<groupdocsviewer>
|
73 |
+
<use>admin</use>
|
74 |
+
<args>
|
75 |
+
<module>Gdass_Groupdocsassembly</module>
|
76 |
+
<frontName>groupdocsviewer</frontName>
|
77 |
+
</args>
|
78 |
+
</groupdocsviewer>
|
79 |
+
</routers>
|
80 |
+
</admin>
|
81 |
+
|
82 |
+
<adminhtml>
|
83 |
+
|
84 |
+
<menu>
|
85 |
+
<catalog>
|
86 |
+
<children>
|
87 |
+
<groupdocsviewer_adminform translate="title" module="groupdocsviewer">
|
88 |
+
<title>Groupdocs Viewer</title>
|
89 |
+
<action>groupdocsviewer/adminhtml_viewer</action>
|
90 |
+
</groupdocsviewer_adminform>
|
91 |
+
</children>
|
92 |
+
</catalog>
|
93 |
+
</menu>
|
94 |
+
|
95 |
+
<acl>
|
96 |
+
<resources>
|
97 |
+
<admin>
|
98 |
+
<children>
|
99 |
+
<catalog>
|
100 |
+
<children>
|
101 |
+
<groupdocsviewer_adminform>
|
102 |
+
<title>Groupdocs Viewer</title>
|
103 |
+
</groupdocsviewer_adminform>
|
104 |
+
</children>
|
105 |
+
</catalog>
|
106 |
+
</children>
|
107 |
+
</admin>
|
108 |
+
</resources>
|
109 |
+
</acl>
|
110 |
+
|
111 |
+
<layout>
|
112 |
+
<updates>
|
113 |
+
<groupdocsviewer>
|
114 |
+
<file>groupdocsviewer.xml</file>
|
115 |
+
</groupdocsviewer>
|
116 |
+
</updates>
|
117 |
+
</layout>
|
118 |
+
</adminhtml>
|
119 |
+
</config>
|
app/code/local/Gdass/Groupdocsassembly/sql/Groupdocsassembly_setup/mysql4-install-0.1.0
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// draft - http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/custom_module_with_custom_database_table
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
|
9 |
+
-- DROP TABLE IF EXISTS {groupdocsass};
|
10 |
+
CREATE TABLE IF NOT EXISTS `groupdocsass` (
|
11 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
12 |
+
`date_entered` datetime DEFAULT NULL,
|
13 |
+
`date_modified` datetime DEFAULT NULL,
|
14 |
+
`modified_user_id` char(36) DEFAULT NULL,
|
15 |
+
`created_by` char(36) DEFAULT NULL,
|
16 |
+
`description` text,
|
17 |
+
`active` tinyint(1) DEFAULT '1',
|
18 |
+
`client_id` varchar(255) DEFAULT NULL,
|
19 |
+
`api_key` varchar(255) DEFAULT NULL,
|
20 |
+
`iframe` varchar(255) DEFAULT NULL,
|
21 |
+
`file_id` varchar(255) DEFAULT NULL,
|
22 |
+
PRIMARY KEY (`id`)
|
23 |
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
24 |
+
|
25 |
+
");
|
26 |
+
|
27 |
+
$installer->endSetup();
|
app/etc/modules/Gdass_Groupdocsassembly.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Gdass_Groupdocsassembly>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Gdass_Groupdocsassembly>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>GroupDocsAssembly</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Collect data and create new documents online by embedding GroupDocs Assembly questionnaires into your site.</summary>
|
10 |
+
<description>The GroupDocs Assembly Magento extension lets you collect data to automatically create new documents online by embedding GroupDocs Assembly questionnaires. 
|
11 |
+

|
12 |
+
GroupDocs Assembly is an online document automation and document assembly app. Document assembly is the process of collecting information and creating new documents. It is often used for letters, contracts and quotes: document where most of the information remains the same, but some details - name, address, date, start date or income, for example - varies from person to person. The process is simple:
|
13 |
+

|
14 |
+
First, prepare a template by adding fields to a document.
|
15 |
+
Then create a questionnaire that helps recipients enter data.
|
16 |
+
Finally, share the questionnaire.
|
17 |
+

|
18 |
+
Document assembly takes care of itself and for each person who completes the questionnaire, a new, unique document is created.
|
19 |
+
Features
|
20 |
+

|
21 |
+
Online document assembly.
|
22 |
+
Share GroupDocs Assembly questionnaires online.
|
23 |
+
Easy data gathering and document creation.
|
24 |
+
</description>
|
25 |
+
<notes>First version of the plugin</notes>
|
26 |
+
<authors><author><name>Marketplace</name><user>groupdocs</user><email>support@groupdocs.com</email></author></authors>
|
27 |
+
<date>2012-12-12</date>
|
28 |
+
<time>09:10:12</time>
|
29 |
+
<contents><target name="mageetc"><dir><dir name="modules"><file name="Gdass_Groupdocsassembly.xml" hash="c9c63ba08460419a3eaeb5e6c59bdf2d"/></dir></dir></target><target name="magelocal"><dir name="Gdass"><dir name="Groupdocsassembly"><dir name="Block"><dir name="Adminhtml"><dir name="Cms"><dir name="Page"><file name="Edit.php" hash="62fb701770cdcef0ca7c7037f2866092"/></dir></dir><file name="Groupdocsassembly.php" hash="8fc9545ed8b5ad70b2d6d07982a6a8de"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AssemblyController.php" hash="68beeae7f5a4bf8008acc1011f00dc56"/></dir></dir><dir name="etc"><file name="config.xml" hash="9f5e377983e8da994509e241b0c10c93"/></dir><dir name="Helper"><file name="Data.php" hash="f9d595cb26a0710aae670d6af2405f19"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Groupdocsassembly"><file name="Collection.php" hash="7d88ee7ea602b96c139cea20a2661665"/></dir><file name="groupdocsassembly.php" hash="8d5d023e0876235f8b825580a94c6c6f"/><file name="groupdocsassembly.php" hash="8d5d023e0876235f8b825580a94c6c6f"/></dir><file name="groupdocsassembly.php" hash="c5ce82a770f305267d2dd48321376cdd"/></dir><dir name="sql"><dir name="Groupdocsassembly_setup"><file name="mysql4-install-0.1.0" hash="0159ea1f2158d0ecc1d3f6b49f6279a9"/></dir></dir></dir></dir></target></contents>
|
30 |
+
<compatible/>
|
31 |
+
<dependencies><required><php><min>5.3.0</min><max>5.4.8</max></php></required></dependencies>
|
32 |
+
</package>
|