Kreativkonzentrat_Glossary - Version 0.5.5

Version Notes

*correct adminhtml URLs
*further improvements for image uploads

Download this release

Release Info

Developer Magento Core Team
Extension Kreativkonzentrat_Glossary
Version 0.5.5
Comparing to
See all releases


Code changes from version 0.5.4 to 0.5.5

Files changed (33) hide show
  1. app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary.php +16 -7
  2. app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary/Edit.php +28 -18
  3. app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary/Edit/Form.php +21 -9
  4. app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary/Edit/Tab/Form.php +38 -38
  5. app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary/Edit/Tabs.php +21 -7
  6. app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary/Grid.php +41 -14
  7. app/code/community/Kreativkonzentrat/Glossary/Block/Glossary.php +29 -12
  8. app/code/community/Kreativkonzentrat/Glossary/Block/Glossary/Navigation.php +35 -16
  9. app/code/community/Kreativkonzentrat/Glossary/Block/Glossary/Toolbar.php +9 -2
  10. app/code/community/Kreativkonzentrat/Glossary/Controller/Router.php +32 -25
  11. app/code/community/Kreativkonzentrat/Glossary/Helper/Data.php +11 -3
  12. app/code/community/Kreativkonzentrat/Glossary/Model/Adminhtml/Select.php +13 -3
  13. app/code/community/Kreativkonzentrat/Glossary/Model/Glossary.php +55 -18
  14. app/code/community/Kreativkonzentrat/Glossary/Model/Mysql4/Glossary.php +32 -10
  15. app/code/community/Kreativkonzentrat/Glossary/Model/Mysql4/Glossary/Collection.php +29 -16
  16. app/code/community/Kreativkonzentrat/Glossary/Model/Page.php +16 -19
  17. app/code/community/Kreativkonzentrat/Glossary/Model/Product.php +16 -5
  18. app/code/community/Kreativkonzentrat/Glossary/Model/Status.php +15 -8
  19. app/code/community/Kreativkonzentrat/Glossary/controllers/Adminhtml/GlossaryController.php +107 -107
  20. app/code/community/Kreativkonzentrat/Glossary/controllers/IndexController.php +19 -13
  21. app/code/community/Kreativkonzentrat/Glossary/controllers/ViewController.php +35 -26
  22. app/code/community/Kreativkonzentrat/Glossary/etc/config.xml +7 -7
  23. app/code/community/Kreativkonzentrat/Glossary/sql/glossary_setup/mysql4-install-0.5.1.php +0 -4
  24. app/code/community/Kreativkonzentrat/Glossary/sql/glossary_setup/mysql4-install-0.5.5.php +28 -0
  25. app/design/adminhtml/default/default/layout/glossary.xml +4 -4
  26. app/design/frontend/base/default/template/glossary/glossary.phtml +3 -4
  27. app/design/frontend/base/default/template/glossary/glossary_letter.phtml +2 -3
  28. app/design/frontend/base/default/template/glossary/glossary_popup.phtml +3 -6
  29. app/design/frontend/base/default/template/glossary/glossary_single.phtml +6 -9
  30. app/design/frontend/base/default/template/glossary/letter/view.phtml +2 -3
  31. app/design/frontend/base/default/template/glossary/pager.phtml +2 -10
  32. app/design/frontend/base/default/template/glossary/toolbar.phtml +2 -3
  33. package.xml +6 -7
app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary.php CHANGED
@@ -1,13 +1,22 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
- class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary extends Mage_Adminhtml_Block_Widget_Grid_Container {
4
-
5
- public function __construct() {
6
- $this->_controller = 'adminhtml_glossary';
7
- $this->_blockGroup = 'glossary';
8
- $this->_headerText = Mage::helper('glossary')->__('Item Manager');
 
9
  $this->_addButtonLabel = Mage::helper('glossary')->__('Add Item');
10
  parent::__construct();
11
  }
12
-
13
  }
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary extends Mage_Adminhtml_Block_Widget_Grid_Container
10
+ {
11
 
12
+ /**
13
+ *
14
+ */
15
+ public function __construct () {
16
+ $this->_controller = 'adminhtml_glossary';
17
+ $this->_blockGroup = 'glossary';
18
+ $this->_headerText = Mage::helper('glossary')->__('Item Manager');
19
  $this->_addButtonLabel = Mage::helper('glossary')->__('Add Item');
20
  parent::__construct();
21
  }
 
22
  }
app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary/Edit.php CHANGED
@@ -1,23 +1,28 @@
1
  <?php
2
-
 
 
 
 
 
 
3
  class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
4
 
5
- public function __construct() {
 
 
 
6
  parent::__construct();
7
-
8
- $this->_objectId = 'id';
9
- $this->_blockGroup = 'glossary';
10
- $this->_controller = 'adminhtml_glossary';
11
-
12
  $this->_updateButton('save', 'label', Mage::helper('catalog')->__('Save'));
13
  $this->_updateButton('delete', 'label', Mage::helper('catalog')->__('Delete'));
14
-
15
  $this->_addButton('saveandcontinue', array(
16
- 'label' => Mage::helper('catalog')->__('Save and Continue Edit'),
17
- 'onclick' => 'saveAndContinueEdit()',
18
- 'class' => 'save',
19
- ), -100);
20
-
21
  $this->_formScripts[] = "
22
  function toggleEditor() {
23
  if (tinyMCE.getInstanceById('glossary_content') == null) {
@@ -26,27 +31,32 @@ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit extends Mage_Admi
26
  tinyMCE.execCommand('mceRemoveControl', false, 'glossary_content');
27
  }
28
  }
29
-
30
  function saveAndContinueEdit(){
31
  editForm.submit($('edit_form').action+'back/edit/');
32
  }
33
  ";
34
  }
35
 
36
- protected function _prepareLayout() {
 
 
 
37
  $return = parent::_prepareLayout();
38
  if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
39
  $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
40
  }
 
41
  return $return;
42
  }
43
 
44
- public function getHeaderText() {
 
 
 
45
  if (Mage::registry('glossary_data') && Mage::registry('glossary_data')->getId()) {
46
  return Mage::helper('glossary')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('glossary_data')->getTitle()));
47
- } else {
48
- return Mage::helper('glossary')->__('Add Item');
49
  }
 
50
  }
51
 
52
  }
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
  class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
10
 
11
+ /**
12
+ *
13
+ */
14
+ public function __construct () {
15
  parent::__construct();
16
+ $this->_objectId = 'id';
17
+ $this->_blockGroup = 'glossary';
18
+ $this->_controller = 'adminhtml_glossary';
 
 
19
  $this->_updateButton('save', 'label', Mage::helper('catalog')->__('Save'));
20
  $this->_updateButton('delete', 'label', Mage::helper('catalog')->__('Delete'));
 
21
  $this->_addButton('saveandcontinue', array(
22
+ 'label' => Mage::helper('catalog')->__('Save and Continue Edit'),
23
+ 'onclick' => 'saveAndContinueEdit()',
24
+ 'class' => 'save',
25
+ ), -100);
 
26
  $this->_formScripts[] = "
27
  function toggleEditor() {
28
  if (tinyMCE.getInstanceById('glossary_content') == null) {
31
  tinyMCE.execCommand('mceRemoveControl', false, 'glossary_content');
32
  }
33
  }
 
34
  function saveAndContinueEdit(){
35
  editForm.submit($('edit_form').action+'back/edit/');
36
  }
37
  ";
38
  }
39
 
40
+ /**
41
+ * @return mixed
42
+ */
43
+ protected function _prepareLayout () {
44
  $return = parent::_prepareLayout();
45
  if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
46
  $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
47
  }
48
+
49
  return $return;
50
  }
51
 
52
+ /**
53
+ * @return mixed
54
+ */
55
+ public function getHeaderText () {
56
  if (Mage::registry('glossary_data') && Mage::registry('glossary_data')->getId()) {
57
  return Mage::helper('glossary')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('glossary_data')->getTitle()));
 
 
58
  }
59
+ return Mage::helper('glossary')->__('Add Item');
60
  }
61
 
62
  }
app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary/Edit/Form.php CHANGED
@@ -1,17 +1,29 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
- class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
4
-
5
- protected function _prepareForm() {
6
- $form = new Varien_Data_Form(array(
7
- 'id' => 'edit_form',
8
- 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
9
- 'method' => 'post',
10
- 'enctype' => 'multipart/form-data'
11
- )
 
 
12
  );
13
  $form->setUseContainer(true);
14
  $this->setForm($form);
 
15
  return parent::_prepareForm();
16
  }
17
 
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Form
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
10
+ {
11
 
12
+ /**
13
+ * @return mixed
14
+ */
15
+ protected function _prepareForm () {
16
+ $form = new Varien_Data_Form(
17
+ array(
18
+ 'id' => 'edit_form',
19
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
20
+ 'method' => 'post',
21
+ 'enctype' => 'multipart/form-data'
22
+ )
23
  );
24
  $form->setUseContainer(true);
25
  $this->setForm($form);
26
+
27
  return parent::_prepareForm();
28
  }
29
 
app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary/Edit/Tab/Form.php CHANGED
@@ -1,52 +1,52 @@
1
  <?php
2
-
 
 
 
 
 
 
3
  class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
4
 
5
- protected function _prepareForm() {
 
 
 
6
  $model = Mage::registry('glossary_data');
7
  $form = new Varien_Data_Form();
8
  $this->setForm($form);
9
  $fieldset = $form->addFieldset('glossary_form', array('legend' => Mage::helper('glossary')->__('Glossary Entry')));
10
-
11
  $fieldset->addField('title', 'text', array(
12
- 'label' => Mage::helper('cms')->__('Title'),
13
- 'class' => 'required-entry',
14
- 'required' => true,
15
- 'name' => 'title',
16
  ));
17
  if (!Mage::app()->isSingleStoreMode()) {
18
  $fieldset->addField('store_id', 'multiselect', array(
19
- 'name' => 'stores[]',
20
- 'label' => Mage::helper('cms')->__('Store View'),
21
- 'title' => Mage::helper('cms')->__('Store View'),
22
- 'required' => true,
23
- 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
24
  ));
25
  } else {
26
  $fieldset->addField('store_id', 'hidden', array(
27
- 'name' => 'stores[]',
28
  'value' => Mage::app()->getStore(true)->getId()
29
  ));
30
  $model->setStoreId(Mage::app()->getStore(true)->getId());
31
  }
32
  $fieldset->addField('metakeywords', 'text', array(
33
- 'label' => Mage::helper('glossary')->__('Meta Keywords'),
34
- 'required' => false,
35
- 'name' => 'metakeywords',
36
  ));
37
-
38
  $fieldset->addField('metadescription', 'text', array(
39
- 'label' => Mage::helper('glossary')->__('Meta Description'),
40
- 'required' => false,
41
- 'name' => 'metadescription',
42
- ));
43
-
44
- $fieldset->addField('filename', 'file', array(
45
- 'label' => Mage::helper('glossary')->__('File'),
46
- 'required' => false,
47
- 'name' => 'filename',
48
  ));
49
-
50
  $fieldset->addField('status', 'select', array(
51
  'label' => Mage::helper('cms')->__('Status'),
52
  'name' => 'status',
@@ -61,20 +61,19 @@ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Tab_Form extends
61
  ),
62
  ),
63
  ));
64
-
65
  $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig();
66
- $config['files_browser_window_url'] = $this->getBaseUrl() . 'admin/cms_wysiwyg_images/index/';
67
- $config->setData($config);
68
-
 
69
  $fieldset->addField('glossary_content', 'editor', array(
70
- 'name' => 'glossary_content',
71
- 'label' => Mage::helper('cms')->__('Content'),
72
- 'title' => Mage::helper('cms')->__('Content'),
73
- 'style' => 'width:700px; height:500px;',
74
- 'config' => $config,
75
- 'required' => true,
76
  ));
77
-
78
  if (Mage::getSingleton('adminhtml/session')->getGlossaryData()) {
79
  $form->setValues(Mage::getSingleton('adminhtml/session')->getGlossaryData());
80
  Mage::getSingleton('adminhtml/session')->setGlossaryData(null);
@@ -82,6 +81,7 @@ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Tab_Form extends
82
  $form->setValues(Mage::registry('glossary_data')->getData());
83
  $this->setForm($form);
84
  }
 
85
  return parent::_prepareForm();
86
  }
87
 
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Tab_Form
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
  class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
10
 
11
+ /**
12
+ * @return mixed
13
+ */
14
+ protected function _prepareForm () {
15
  $model = Mage::registry('glossary_data');
16
  $form = new Varien_Data_Form();
17
  $this->setForm($form);
18
  $fieldset = $form->addFieldset('glossary_form', array('legend' => Mage::helper('glossary')->__('Glossary Entry')));
 
19
  $fieldset->addField('title', 'text', array(
20
+ 'label' => Mage::helper('cms')->__('Title'),
21
+ 'class' => 'required-entry',
22
+ 'required' => true,
23
+ 'name' => 'title',
24
  ));
25
  if (!Mage::app()->isSingleStoreMode()) {
26
  $fieldset->addField('store_id', 'multiselect', array(
27
+ 'name' => 'stores[]',
28
+ 'label' => Mage::helper('cms')->__('Store View'),
29
+ 'title' => Mage::helper('cms')->__('Store View'),
30
+ 'required' => true,
31
+ 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
32
  ));
33
  } else {
34
  $fieldset->addField('store_id', 'hidden', array(
35
+ 'name' => 'stores[]',
36
  'value' => Mage::app()->getStore(true)->getId()
37
  ));
38
  $model->setStoreId(Mage::app()->getStore(true)->getId());
39
  }
40
  $fieldset->addField('metakeywords', 'text', array(
41
+ 'label' => Mage::helper('glossary')->__('Meta Keywords'),
42
+ 'required' => false,
43
+ 'name' => 'metakeywords',
44
  ));
 
45
  $fieldset->addField('metadescription', 'text', array(
46
+ 'label' => Mage::helper('glossary')->__('Meta Description'),
47
+ 'required' => false,
48
+ 'name' => 'metadescription',
 
 
 
 
 
 
49
  ));
 
50
  $fieldset->addField('status', 'select', array(
51
  'label' => Mage::helper('cms')->__('Status'),
52
  'name' => 'status',
61
  ),
62
  ),
63
  ));
 
64
  $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig();
65
+ $config->setData('files_browser_window_url', Mage::helper('adminhtml')->getUrl('adminhtml/cms_wysiwyg_images/index'))
66
+ ->setData('directives_url', Mage::helper('adminhtml')->getUrl('adminhtml/cms_wysiwyg/directive'))
67
+ ->setData('directives_url_quoted', preg_quote(Mage::helper('adminhtml')->getUrl('adminhtml/cms_wysiwyg/directive')))
68
+ ->setData('widget_window_url', Mage::helper('adminhtml')->getUrl('adminhtml/widget/index'));
69
  $fieldset->addField('glossary_content', 'editor', array(
70
+ 'name' => 'glossary_content',
71
+ 'label' => Mage::helper('cms')->__('Content'),
72
+ 'title' => Mage::helper('cms')->__('Content'),
73
+ 'style' => 'width:700px; height:500px;',
74
+ 'config' => $config,
75
+ 'required' => true,
76
  ));
 
77
  if (Mage::getSingleton('adminhtml/session')->getGlossaryData()) {
78
  $form->setValues(Mage::getSingleton('adminhtml/session')->getGlossaryData());
79
  Mage::getSingleton('adminhtml/session')->setGlossaryData(null);
81
  $form->setValues(Mage::registry('glossary_data')->getData());
82
  $this->setForm($form);
83
  }
84
+
85
  return parent::_prepareForm();
86
  }
87
 
app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary/Edit/Tabs.php CHANGED
@@ -1,7 +1,17 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
- class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
4
-
 
5
  public function __construct() {
6
  parent::__construct();
7
  $this->setId('glossary_tabs');
@@ -9,12 +19,16 @@ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Tabs extends Mage
9
  $this->setTitle(Mage::helper('glossary')->__('Glossary Entry'));
10
  }
11
 
 
 
 
12
  protected function _beforeToHtml() {
13
- $this->addTab('form_section', array(
14
- 'label' => Mage::helper('glossary')->__('Glossary Entry'),
15
- 'title' => Mage::helper('glossary')->__('Glossary Entry'),
16
- 'content' => $this->getLayout()->createBlock('glossary/adminhtml_glossary_edit_tab_form')->toHtml(),
17
- ));
 
18
 
19
  return parent::_beforeToHtml();
20
  }
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Tabs
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
10
+ {
11
 
12
+ /**
13
+ *
14
+ */
15
  public function __construct() {
16
  parent::__construct();
17
  $this->setId('glossary_tabs');
19
  $this->setTitle(Mage::helper('glossary')->__('Glossary Entry'));
20
  }
21
 
22
+ /**
23
+ * @return mixed
24
+ */
25
  protected function _beforeToHtml() {
26
+ $this->addTab('form_section',
27
+ array('label' => Mage::helper('glossary')->__('Glossary Entry'),
28
+ 'title' => Mage::helper('glossary')->__('Glossary Entry'),
29
+ 'content' => $this->getLayout()->createBlock('glossary/adminhtml_glossary_edit_tab_form')->toHtml()
30
+ )
31
+ );
32
 
33
  return parent::_beforeToHtml();
34
  }
app/code/community/Kreativkonzentrat/Glossary/Block/Adminhtml/Glossary/Grid.php CHANGED
@@ -1,8 +1,18 @@
1
  <?php
2
-
3
- class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Grid extends Mage_Adminhtml_Block_Widget_Grid {
4
-
5
- public function __construct() {
 
 
 
 
 
 
 
 
 
 
6
  parent::__construct();
7
  $this->setId('glossarGrid');
8
  $this->setDefaultSort('glossary_id');
@@ -10,20 +20,25 @@ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Grid extends Mage_Admi
10
  $this->setSaveParametersInSession(true);
11
  }
12
 
13
- protected function _prepareCollection() {
 
 
 
14
  $collection = Mage::getModel('glossary/glossary')->getCollection();
15
  $this->setCollection($collection);
16
  return parent::_prepareCollection();
17
  }
18
 
19
- protected function _prepareColumns() {
 
 
 
20
  $this->addColumn('glossary_id', array(
21
  'header' => Mage::helper('glossary')->__('ID'),
22
  'align' => 'right',
23
  'width' => '50px',
24
  'index' => 'glossary_id',
25
  ));
26
-
27
  $this->addColumn('title', array(
28
  'header' => Mage::helper('glossary')->__('Title'),
29
  'align' => 'left',
@@ -41,7 +56,6 @@ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Grid extends Mage_Admi
41
  => array($this, '_filterStoreCondition'),
42
  ));
43
  }
44
-
45
  $this->addColumn('status', array(
46
  'header' => Mage::helper('glossary')->__('Status'),
47
  'align' => 'left',
@@ -53,7 +67,6 @@ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Grid extends Mage_Admi
53
  0 => 'Disabled',
54
  ),
55
  ));
56
-
57
  $this->addColumn('action', array(
58
  'header' => Mage::helper('adminhtml')->__('Action'),
59
  'width' => '100',
@@ -71,14 +84,16 @@ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Grid extends Mage_Admi
71
  'index' => 'stores',
72
  'is_system' => true,
73
  ));
74
-
75
  $this->addExportType('*/*/exportCsv', Mage::helper('adminhtml')->__('CSV'));
76
  $this->addExportType('*/*/exportXml', Mage::helper('adminhtml')->__('XML'));
77
 
78
  return parent::_prepareColumns();
79
  }
80
 
81
- protected function _prepareMassaction() {
 
 
 
82
  $this->setMassactionIdField('glossary_id');
83
  $this->getMassactionBlock()->setFormFieldName('glossary');
84
 
@@ -107,16 +122,28 @@ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Grid extends Mage_Admi
107
  return $this;
108
  }
109
 
110
- protected function _afterLoadCollection() {
 
 
 
111
  $this->getCollection()->walk('afterLoad');
112
  parent::_afterLoadCollection();
113
  }
114
 
115
- public function getRowUrl($row) {
 
 
 
 
 
116
  return $this->getUrl('*/*/edit', array('id' => $row->getId()));
117
  }
118
 
119
- protected function _filterStoreCondition($collection, $column) {
 
 
 
 
120
  if (!$value = $column->getFilter()->getValue()) {
121
  return;
122
  }
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Grid
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Block_Adminhtml_Glossary_Grid extends Mage_Adminhtml_Block_Widget_Grid
10
+ {
11
+
12
+ /**
13
+ *
14
+ */
15
+ public function __construct () {
16
  parent::__construct();
17
  $this->setId('glossarGrid');
18
  $this->setDefaultSort('glossary_id');
20
  $this->setSaveParametersInSession(true);
21
  }
22
 
23
+ /**
24
+ * @return mixed
25
+ */
26
+ protected function _prepareCollection () {
27
  $collection = Mage::getModel('glossary/glossary')->getCollection();
28
  $this->setCollection($collection);
29
  return parent::_prepareCollection();
30
  }
31
 
32
+ /**
33
+ * @return mixed
34
+ */
35
+ protected function _prepareColumns () {
36
  $this->addColumn('glossary_id', array(
37
  'header' => Mage::helper('glossary')->__('ID'),
38
  'align' => 'right',
39
  'width' => '50px',
40
  'index' => 'glossary_id',
41
  ));
 
42
  $this->addColumn('title', array(
43
  'header' => Mage::helper('glossary')->__('Title'),
44
  'align' => 'left',
56
  => array($this, '_filterStoreCondition'),
57
  ));
58
  }
 
59
  $this->addColumn('status', array(
60
  'header' => Mage::helper('glossary')->__('Status'),
61
  'align' => 'left',
67
  0 => 'Disabled',
68
  ),
69
  ));
 
70
  $this->addColumn('action', array(
71
  'header' => Mage::helper('adminhtml')->__('Action'),
72
  'width' => '100',
84
  'index' => 'stores',
85
  'is_system' => true,
86
  ));
 
87
  $this->addExportType('*/*/exportCsv', Mage::helper('adminhtml')->__('CSV'));
88
  $this->addExportType('*/*/exportXml', Mage::helper('adminhtml')->__('XML'));
89
 
90
  return parent::_prepareColumns();
91
  }
92
 
93
+ /**
94
+ * @return $this
95
+ */
96
+ protected function _prepareMassaction () {
97
  $this->setMassactionIdField('glossary_id');
98
  $this->getMassactionBlock()->setFormFieldName('glossary');
99
 
122
  return $this;
123
  }
124
 
125
+ /**
126
+ *
127
+ */
128
+ protected function _afterLoadCollection () {
129
  $this->getCollection()->walk('afterLoad');
130
  parent::_afterLoadCollection();
131
  }
132
 
133
+ /**
134
+ * @param $row
135
+ *
136
+ * @return mixed
137
+ */
138
+ public function getRowUrl ($row) {
139
  return $this->getUrl('*/*/edit', array('id' => $row->getId()));
140
  }
141
 
142
+ /**
143
+ * @param $collection
144
+ * @param $column
145
+ */
146
+ protected function _filterStoreCondition ($collection, $column) {
147
  if (!$value = $column->getFilter()->getValue()) {
148
  return;
149
  }
app/code/community/Kreativkonzentrat/Glossary/Block/Glossary.php CHANGED
@@ -1,26 +1,37 @@
1
  <?php
2
-
 
 
 
 
 
 
3
  class Kreativkonzentrat_Glossary_Block_Glossary extends Mage_Core_Block_Template {
4
 
5
- public function _construct() {
6
- }
7
-
8
  public function getPagerHtml() {
9
  return $this->getChildHtml('pager');
10
  }
11
 
 
 
 
12
  public function getCacheKey() {
13
  return 'glossary' . Mage::app()->getStore()->getId() . $this->getRequest()->getRequestUri();
14
  }
15
 
 
 
 
16
  public function getCrumbTitle() {
17
-
18
  if ($this->getRequest()->getActionName() == 'letter') {
19
  $letter = array_keys($this->getRequest()->getParams());
20
- if ($letter != null)
21
  return $letter[0];
 
22
  }
23
-
24
  $glossary_id = $this->getRequest()->getParam('id');
25
  if ($glossary_id != null && $glossary_id != '') {
26
  return Mage::getModel('glossary/glossary')->load($glossary_id)->getTitle();
@@ -29,6 +40,9 @@ class Kreativkonzentrat_Glossary_Block_Glossary extends Mage_Core_Block_Template
29
  return null;
30
  }
31
 
 
 
 
32
  public function _prepareLayout() {
33
  // show breadcrumbs
34
  $kk_gloss = $this->getCrumbTitle();
@@ -39,22 +53,19 @@ class Kreativkonzentrat_Glossary_Block_Glossary extends Mage_Core_Block_Template
39
  'link' => Mage::getBaseUrl()
40
  )
41
  );
42
-
43
  //set linked glossary crumb and current entry crumb if this is a detail view
44
  if ($kk_gloss) {
45
  $breadcrumbs->addCrumb('glossary', array('label' => Mage::helper('glossary')->__('Glossary'), 'link' => Mage::getUrl('glossary/'),));
46
  $breadcrumbs->addCrumb('title', array('label' => $kk_gloss, 'title' => $kk_gloss));
47
  }
48
-
49
  //otherwise just add glossary entry without link
50
- else
51
  $breadcrumbs->addCrumb('glossary', array('label' => Mage::helper('glossary')->__('Glossary'),));
 
52
  }
53
-
54
  if ($root = $this->getLayout()->getBlock('root')) {
55
  $root->addBodyClass('glossary');
56
  }
57
-
58
  if ($head = $this->getLayout()->getBlock('head')) {
59
  if ($kk_gloss) {
60
  $head->setTitle(Mage::helper('glossary')->__('Glossary') . ' - ' . $kk_gloss);
@@ -69,6 +80,9 @@ class Kreativkonzentrat_Glossary_Block_Glossary extends Mage_Core_Block_Template
69
  return parent::_prepareLayout();
70
  }
71
 
 
 
 
72
  public function getGlossary() {
73
  if (!$this->hasData('glossary')) {
74
  $this->setData('glossary', Mage::registry('glossary'));
@@ -76,6 +90,9 @@ class Kreativkonzentrat_Glossary_Block_Glossary extends Mage_Core_Block_Template
76
  return $this->getData('glossary');
77
  }
78
 
 
 
 
79
  public function getCurrentPage() {
80
  $layer = Mage::getSingleton('catalog/layer');
81
  if ($layer) {
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Block_Glossary
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
  class Kreativkonzentrat_Glossary_Block_Glossary extends Mage_Core_Block_Template {
10
 
11
+ /**
12
+ * @return mixed
13
+ */
14
  public function getPagerHtml() {
15
  return $this->getChildHtml('pager');
16
  }
17
 
18
+ /**
19
+ * @return string
20
+ */
21
  public function getCacheKey() {
22
  return 'glossary' . Mage::app()->getStore()->getId() . $this->getRequest()->getRequestUri();
23
  }
24
 
25
+ /**
26
+ * @return string | null
27
+ */
28
  public function getCrumbTitle() {
 
29
  if ($this->getRequest()->getActionName() == 'letter') {
30
  $letter = array_keys($this->getRequest()->getParams());
31
+ if ($letter != null) {
32
  return $letter[0];
33
+ }
34
  }
 
35
  $glossary_id = $this->getRequest()->getParam('id');
36
  if ($glossary_id != null && $glossary_id != '') {
37
  return Mage::getModel('glossary/glossary')->load($glossary_id)->getTitle();
40
  return null;
41
  }
42
 
43
+ /**
44
+ * @return mixed
45
+ */
46
  public function _prepareLayout() {
47
  // show breadcrumbs
48
  $kk_gloss = $this->getCrumbTitle();
53
  'link' => Mage::getBaseUrl()
54
  )
55
  );
 
56
  //set linked glossary crumb and current entry crumb if this is a detail view
57
  if ($kk_gloss) {
58
  $breadcrumbs->addCrumb('glossary', array('label' => Mage::helper('glossary')->__('Glossary'), 'link' => Mage::getUrl('glossary/'),));
59
  $breadcrumbs->addCrumb('title', array('label' => $kk_gloss, 'title' => $kk_gloss));
60
  }
 
61
  //otherwise just add glossary entry without link
62
+ else {
63
  $breadcrumbs->addCrumb('glossary', array('label' => Mage::helper('glossary')->__('Glossary'),));
64
+ }
65
  }
 
66
  if ($root = $this->getLayout()->getBlock('root')) {
67
  $root->addBodyClass('glossary');
68
  }
 
69
  if ($head = $this->getLayout()->getBlock('head')) {
70
  if ($kk_gloss) {
71
  $head->setTitle(Mage::helper('glossary')->__('Glossary') . ' - ' . $kk_gloss);
80
  return parent::_prepareLayout();
81
  }
82
 
83
+ /**
84
+ * @return mixed
85
+ */
86
  public function getGlossary() {
87
  if (!$this->hasData('glossary')) {
88
  $this->setData('glossary', Mage::registry('glossary'));
90
  return $this->getData('glossary');
91
  }
92
 
93
+ /**
94
+ * @return bool
95
+ */
96
  public function getCurrentPage() {
97
  $layer = Mage::getSingleton('catalog/layer');
98
  if ($layer) {
app/code/community/Kreativkonzentrat/Glossary/Block/Glossary/Navigation.php CHANGED
@@ -1,40 +1,59 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
- class Kreativkonzentrat_Glossary_Block_Glossary_Navigation extends Mage_Core_Block_Template {
4
-
5
- public function _construct() {
 
6
  $this->setCacheLifetime(3600);
7
  $this->setCacheKey('glossary_letter_navigation_store_default');
8
  }
9
 
10
- public function getCacheKey() {
 
 
 
11
  return 'glossary_letter_navigation_' . Mage::app()->getStore()->getId();
12
  }
13
 
14
- public function _prepareLayout() {
 
 
 
15
  return parent::_prepareLayout();
16
  }
17
 
18
- public function buildNavigation() {
 
 
 
19
  $store = Mage :: app()->getStore();
20
  if ($store instanceof Mage_Core_Model_Store) {
21
  $store = array($store->getId());
22
  }
23
- $store2 = implode(",", $store);
24
- $resource = Mage::getSingleton('core/resource');
25
- $read = $resource->getConnection('core_read');
26
  $glossaryTable = $resource->getTableName('glossary');
27
- $storeTable = $resource->getTableName('glossary_store');
28
- $conn = Mage::getSingleton('core/resource')->getConnection('core_read');
29
- $results = array();
30
- foreach($conn->fetchAll("SELECT DISTINCT letter
31
- FROM `$glossaryTable`INNER JOIN `$storeTable`
32
  ON $glossaryTable.glossary_id = $storeTable.glossary_id
33
  WHERE ($storeTable.store_id IN (0, $store2))
34
  ORDER BY letter;
35
- ") as $letter){
36
  $results[] = $letter['letter'];
37
- };
 
38
  return $results;
39
  }
40
 
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Block_Glossary_Navigation
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Block_Glossary_Navigation extends Mage_Core_Block_Template
10
+ {
11
 
12
+ /**
13
+ *
14
+ */
15
+ public function _construct () {
16
  $this->setCacheLifetime(3600);
17
  $this->setCacheKey('glossary_letter_navigation_store_default');
18
  }
19
 
20
+ /**
21
+ * @return string
22
+ */
23
+ public function getCacheKey () {
24
  return 'glossary_letter_navigation_' . Mage::app()->getStore()->getId();
25
  }
26
 
27
+ /**
28
+ * @return mixed
29
+ */
30
+ public function _prepareLayout () {
31
  return parent::_prepareLayout();
32
  }
33
 
34
+ /**
35
+ * @return array
36
+ */
37
+ public function buildNavigation () {
38
  $store = Mage :: app()->getStore();
39
  if ($store instanceof Mage_Core_Model_Store) {
40
  $store = array($store->getId());
41
  }
42
+ $store2 = implode(',', $store);
43
+ $resource = Mage::getSingleton('core/resource');
 
44
  $glossaryTable = $resource->getTableName('glossary');
45
+ $storeTable = $resource->getTableName('glossary_store');
46
+ $conn = $resource->getConnection('core_read');
47
+ $results = array();
48
+ foreach ($conn->fetchAll("SELECT DISTINCT letter
49
+ FROM `$glossaryTable` INNER JOIN `$storeTable`
50
  ON $glossaryTable.glossary_id = $storeTable.glossary_id
51
  WHERE ($storeTable.store_id IN (0, $store2))
52
  ORDER BY letter;
53
+ ") as $letter) {
54
  $results[] = $letter['letter'];
55
+ }
56
+
57
  return $results;
58
  }
59
 
app/code/community/Kreativkonzentrat/Glossary/Block/Glossary/Toolbar.php CHANGED
@@ -1,17 +1,23 @@
1
  <?php
 
 
 
 
 
 
 
2
  class Kreativkonzentrat_Glossary_Block_Glossary_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar
3
  {
4
  /**
5
  * Set collection to pager
6
  *
7
  * @param Varien_Data_Collection $collection
 
8
  * @return Mage_Catalog_Block_Product_List_Toolbar
9
  */
10
  public function setCollection ($collection) {
11
  $this->_collection = $collection;
12
-
13
  $this->_collection->setCurPage($this->getCurrentPage());
14
-
15
  // we need to set pagination only if passed value integer and more that 0
16
  $limit = (int)$this->getLimit();
17
  if ($limit) {
@@ -20,6 +26,7 @@ class Kreativkonzentrat_Glossary_Block_Glossary_Toolbar extends Mage_Catalog_Blo
20
  if ($this->getCurrentOrder()) {
21
  $this->_collection->setOrder('title', $this->getCurrentDirection());
22
  }
 
23
  return $this;
24
  }
25
  }
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Block_Glossary_Toolbar
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
  class Kreativkonzentrat_Glossary_Block_Glossary_Toolbar extends Mage_Catalog_Block_Product_List_Toolbar
10
  {
11
  /**
12
  * Set collection to pager
13
  *
14
  * @param Varien_Data_Collection $collection
15
+ *
16
  * @return Mage_Catalog_Block_Product_List_Toolbar
17
  */
18
  public function setCollection ($collection) {
19
  $this->_collection = $collection;
 
20
  $this->_collection->setCurPage($this->getCurrentPage());
 
21
  // we need to set pagination only if passed value integer and more that 0
22
  $limit = (int)$this->getLimit();
23
  if ($limit) {
26
  if ($this->getCurrentOrder()) {
27
  $this->_collection->setOrder('title', $this->getCurrentDirection());
28
  }
29
+
30
  return $this;
31
  }
32
  }
app/code/community/Kreativkonzentrat/Glossary/Controller/Router.php CHANGED
@@ -1,47 +1,55 @@
1
  <?php
2
-
3
- class Kreativkonzentrat_Glossary_Controller_Router extends Mage_Core_Controller_Varien_Router_Abstract {
4
-
5
- public function initControllerRouters($observer) {
 
 
 
 
 
 
 
 
 
 
6
  $front = $observer->getEvent()->getFront();
7
  $front->addRouter('glossary/entry', $this);
8
-
9
  }
10
 
11
- public function match(Zend_Controller_Request_Http $request) {
 
 
 
 
 
12
  $kk_params = trim($request->getPathInfo(), '/');
13
  $kk_params = explode('/', $kk_params);
14
- if (isset($kk_params[0]))
15
  $kkg_param = $kk_params[0];
16
- if (isset($kk_params[1]))
 
17
  $kkg_param2 = $kk_params[1];
18
- if (isset($kk_params[2]))
 
19
  $kkg_param3 = $kk_params[2];
20
- if (isset($kk_params[3]))
 
21
  $kkg_param4 = $kk_params[3];
 
22
  if (isset($kkg_param2) && isset($kkg_param3) && isset($kkg_param4) && $kkg_param4 == 'popup') {
23
  $glossary = Mage::getModel('glossary/glossary');
24
- $itemId = $glossary->FindGlossaryEntry($kkg_param3);
25
-
26
- $request->setModuleName('glossary')
27
- ->setControllerName('view')
28
- ->setActionName('popup')
29
- ->setParam('id', $itemId);
30
 
31
  $request->setAlias(Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS, 'glossary/view/id?id=' . $itemId);
32
 
33
  return true;
34
  }
35
-
36
  if (isset($kkg_param) && $kkg_param == 'glossary' && isset($kkg_param2) && $kkg_param2 == 'entry') {
37
  $glossary = Mage::getModel('glossary/glossary');
38
- $itemId = $glossary->FindGlossaryEntry($kkg_param3);
39
-
40
- $request->setModuleName('glossary')
41
- ->setControllerName('view')
42
- ->setActionName('id')
43
- ->setParam('id', $itemId);
44
-
45
  $request->setAlias(Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS, 'glossary/view/id?id=' . $itemId);
46
 
47
  return true;
@@ -49,5 +57,4 @@ class Kreativkonzentrat_Glossary_Controller_Router extends Mage_Core_Controller_
49
  return false;
50
  }
51
  }
52
-
53
  }
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Controller_Router
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Controller_Router extends Mage_Core_Controller_Varien_Router_Abstract
10
+ {
11
+
12
+ /**
13
+ * @param $observer
14
+ */
15
+ public function initControllerRouters ($observer) {
16
  $front = $observer->getEvent()->getFront();
17
  $front->addRouter('glossary/entry', $this);
 
18
  }
19
 
20
+ /**
21
+ * @param Zend_Controller_Request_Http $request
22
+ *
23
+ * @return bool
24
+ */
25
+ public function match (Zend_Controller_Request_Http $request) {
26
  $kk_params = trim($request->getPathInfo(), '/');
27
  $kk_params = explode('/', $kk_params);
28
+ if (isset($kk_params[0])) {
29
  $kkg_param = $kk_params[0];
30
+ }
31
+ if (isset($kk_params[1])) {
32
  $kkg_param2 = $kk_params[1];
33
+ }
34
+ if (isset($kk_params[2])) {
35
  $kkg_param3 = $kk_params[2];
36
+ }
37
+ if (isset($kk_params[3])) {
38
  $kkg_param4 = $kk_params[3];
39
+ }
40
  if (isset($kkg_param2) && isset($kkg_param3) && isset($kkg_param4) && $kkg_param4 == 'popup') {
41
  $glossary = Mage::getModel('glossary/glossary');
42
+ $itemId = $glossary->FindGlossaryEntry($kkg_param3);
43
+ $request->setModuleName('glossary')->setControllerName('view')->setActionName('popup')->setParam('id', $itemId);
 
 
 
 
44
 
45
  $request->setAlias(Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS, 'glossary/view/id?id=' . $itemId);
46
 
47
  return true;
48
  }
 
49
  if (isset($kkg_param) && $kkg_param == 'glossary' && isset($kkg_param2) && $kkg_param2 == 'entry') {
50
  $glossary = Mage::getModel('glossary/glossary');
51
+ $itemId = $glossary->FindGlossaryEntry($kkg_param3);
52
+ $request->setModuleName('glossary')->setControllerName('view')->setActionName('id')->setParam('id', $itemId);
 
 
 
 
 
53
  $request->setAlias(Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS, 'glossary/view/id?id=' . $itemId);
54
 
55
  return true;
57
  return false;
58
  }
59
  }
 
60
  }
app/code/community/Kreativkonzentrat/Glossary/Helper/Data.php CHANGED
@@ -1,9 +1,17 @@
1
  <?php
2
-
 
 
 
 
 
 
3
  class Kreativkonzentrat_Glossary_Helper_Data extends Mage_Core_Helper_Abstract
4
  {
5
- public function getGlossaryIndexUrl()
6
- {
 
 
7
  return $this->_getUrl('glossary');
8
  }
9
  }
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Helper_Data
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
  class Kreativkonzentrat_Glossary_Helper_Data extends Mage_Core_Helper_Abstract
10
  {
11
+ /**
12
+ * @return mixed
13
+ */
14
+ public function getGlossaryIndexUrl () {
15
  return $this->_getUrl('glossary');
16
  }
17
  }
app/code/community/Kreativkonzentrat/Glossary/Model/Adminhtml/Select.php CHANGED
@@ -1,8 +1,18 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
- class Kreativkonzentrat_Glossary_Model_Adminhtml_Select {
4
-
5
- public function toOptionArray() {
 
6
  return array(
7
  array('value' => 1, 'label' => Mage::helper('core')->__('Yes')),
8
  array('value' => 0, 'label' => Mage::helper('core')->__('No')),
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Model_Adminhtml_Select
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Model_Adminhtml_Select
10
+ {
11
 
12
+ /**
13
+ * @return array
14
+ */
15
+ public function toOptionArray () {
16
  return array(
17
  array('value' => 1, 'label' => Mage::helper('core')->__('Yes')),
18
  array('value' => 0, 'label' => Mage::helper('core')->__('No')),
app/code/community/Kreativkonzentrat/Glossary/Model/Glossary.php CHANGED
@@ -1,43 +1,80 @@
1
  <?php
2
-
3
- class Kreativkonzentrat_Glossary_Model_Glossary extends Mage_Core_Model_Abstract {
 
 
 
 
 
 
 
4
 
5
  protected $_glossaryCollection;
6
 
7
- public function _construct() {
 
 
 
8
  parent::_construct();
9
  $this->_init('glossary/glossary');
10
  }
11
 
12
- public function FindGlossaryEntry($request) {
13
- $collection = Mage::getModel('glossary/glossary')->getCollection()
14
- ->addFilter('status', 1)
15
- ->addStoreFilter(Mage :: app()->getStore());
 
 
 
16
  foreach ($collection as $item) {
17
- if(strcasecmp(urlencode($item['title']), $request) == 0)
18
  return $item->getID();
19
  }
 
20
  return false;
21
  }
22
 
23
- public function getUrl(){
 
 
 
24
  return Mage::app()->getStore()->getUrl('glossary/entry') . urlencode($this->getTitle());
25
  }
26
 
27
- public function getTitles() {
28
- $collection = Mage::getModel('glossary/glossary')->getCollection()
29
- ->addStoreFilter(Mage :: app()->getStore());
30
- $titles = array();
 
 
31
  foreach ($collection as $item) {
32
- $titles[] = '/(?!(?:[^<]+>|[^>]+<\/a>))(' . htmlentities(str_replace("/", "", $item['title']), ENT_COMPAT, "UTF-8") . ')/i';
33
  }
 
34
  return $titles;
35
  }
36
 
37
- public function getFilteredCollection() {
38
- return Mage::getModel('glossary/glossary')->getCollection()
39
- ->addFilter('status', 1)
40
- ->addStoreFilter(Mage :: app()->getStore());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  }
42
 
43
  }
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Model_Glossary
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Model_Glossary extends Mage_Core_Model_Abstract
10
+ {
11
 
12
  protected $_glossaryCollection;
13
 
14
+ /**
15
+ *
16
+ */
17
+ public function _construct () {
18
  parent::_construct();
19
  $this->_init('glossary/glossary');
20
  }
21
 
22
+ /**
23
+ * @param $request
24
+ *
25
+ * @return bool
26
+ */
27
+ public function FindGlossaryEntry ($request) {
28
+ $collection = Mage::getModel('glossary/glossary')->getCollection()->addFilter('status', 1)->addStoreFilter(Mage :: app()->getStore());
29
  foreach ($collection as $item) {
30
+ if (strcasecmp(urlencode($item['title']), $request) == 0)
31
  return $item->getID();
32
  }
33
+
34
  return false;
35
  }
36
 
37
+ /**
38
+ * @return string
39
+ */
40
+ public function getUrl () {
41
  return Mage::app()->getStore()->getUrl('glossary/entry') . urlencode($this->getTitle());
42
  }
43
 
44
+ /**
45
+ * @return array
46
+ */
47
+ public function getTitles () {
48
+ $collection = Mage::getModel('glossary/glossary')->getCollection()->addStoreFilter(Mage :: app()->getStore());
49
+ $titles = array();
50
  foreach ($collection as $item) {
51
+ $titles[] = '/(?!(?:[^<]+>|[^>]+<\/a>))(' . htmlentities(str_replace('/', '', $item['title']), ENT_COMPAT, 'UTF-8') . ')/i';
52
  }
53
+
54
  return $titles;
55
  }
56
 
57
+ /**
58
+ * @return mixed
59
+ */
60
+ public function getFilteredCollection () {
61
+ return Mage::getModel('glossary/glossary')->getCollection()->addFilter('status', 1)->addStoreFilter(Mage :: app()->getStore());
62
+ }
63
+
64
+ /**
65
+ * @param $content
66
+ *
67
+ * @return mixed
68
+ */
69
+ public function toHtml ($content) {
70
+ return Mage::helper('cms')->getBlockTemplateProcessor()->filter($content);
71
+ }
72
+
73
+ /**
74
+ * @return mixed
75
+ */
76
+ public function getGlossaryContent () {
77
+ return $this->toHtml($this->getData('glossary_content'));
78
  }
79
 
80
  }
app/code/community/Kreativkonzentrat/Glossary/Model/Mysql4/Glossary.php CHANGED
@@ -1,27 +1,48 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
- class Kreativkonzentrat_Glossary_Model_Mysql4_Glossary extends Mage_Core_Model_Mysql4_Abstract {
4
-
5
- public function _construct() {
 
6
  $this->_init('glossary/glossary', 'glossary_id');
7
  }
8
 
9
- protected function _afterSave(Mage_Core_Model_Abstract $object) {
 
 
 
 
 
10
 
11
  $condition = $this->_getWriteAdapter()->quoteInto('glossary_id = ?', $object->getId());
12
- // process glossary entry to store relation
13
  $this->_getWriteAdapter()->delete($this->getTable('glossary_store'), $condition);
14
- foreach ((array) $object->getData('stores') as $store) {
15
- $storeArray = array();
16
  $storeArray['glossary_id'] = $object->getId();
17
- $storeArray['store_id'] = $store;
18
  $this->_getWriteAdapter()->insert($this->getTable('glossary_store'), $storeArray);
19
  }
 
20
  return parent::_afterSave($object);
21
  }
22
 
23
- protected function _afterLoad(Mage_Core_Model_Abstract $object) {
24
- // process glossary entry to store relation
 
 
 
 
 
25
  $select = $this->_getReadAdapter()->select()->from($this->getTable('glossary_store'))->where('glossary_id = ?', $object->getId());
26
  if ($data = $this->_getReadAdapter()->fetchAll($select)) {
27
  $storesArray = array();
@@ -30,6 +51,7 @@ class Kreativkonzentrat_Glossary_Model_Mysql4_Glossary extends Mage_Core_Model_M
30
  }
31
  $object->setData('store_id', $storesArray);
32
  }
 
33
  return parent::_afterLoad($object);
34
  }
35
 
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Model_Mysql4_Glossary
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Model_Mysql4_Glossary extends Mage_Core_Model_Mysql4_Abstract
10
+ {
11
 
12
+ /**
13
+ *
14
+ */
15
+ public function _construct () {
16
  $this->_init('glossary/glossary', 'glossary_id');
17
  }
18
 
19
+ /**
20
+ * @param Mage_Core_Model_Abstract $object
21
+ *
22
+ * @return mixed
23
+ */
24
+ protected function _afterSave (Mage_Core_Model_Abstract $object) {
25
 
26
  $condition = $this->_getWriteAdapter()->quoteInto('glossary_id = ?', $object->getId());
27
+ //process glossary entry to store relation
28
  $this->_getWriteAdapter()->delete($this->getTable('glossary_store'), $condition);
29
+ foreach ((array)$object->getData('stores') as $store) {
30
+ $storeArray = array();
31
  $storeArray['glossary_id'] = $object->getId();
32
+ $storeArray['store_id'] = $store;
33
  $this->_getWriteAdapter()->insert($this->getTable('glossary_store'), $storeArray);
34
  }
35
+
36
  return parent::_afterSave($object);
37
  }
38
 
39
+ /**
40
+ * @param Mage_Core_Model_Abstract $object
41
+ *
42
+ * @return mixed
43
+ */
44
+ protected function _afterLoad (Mage_Core_Model_Abstract $object) {
45
+ //process glossary entry to store relation
46
  $select = $this->_getReadAdapter()->select()->from($this->getTable('glossary_store'))->where('glossary_id = ?', $object->getId());
47
  if ($data = $this->_getReadAdapter()->fetchAll($select)) {
48
  $storesArray = array();
51
  }
52
  $object->setData('store_id', $storesArray);
53
  }
54
+
55
  return parent::_afterLoad($object);
56
  }
57
 
app/code/community/Kreativkonzentrat/Glossary/Model/Mysql4/Glossary/Collection.php CHANGED
@@ -1,45 +1,58 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
- class Kreativkonzentrat_Glossary_Model_Mysql4_Glossary_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
4
-
5
- public function _construct() {
6
  parent::_construct();
7
  $this->_init('glossary/glossary');
8
  }
9
 
10
- public function setAlphabeticalOrder() {
 
 
 
11
  $this->getSelect()->order('title ASC');
 
12
  return $this;
13
  }
14
 
15
- public function addStoreFilter($store) {
 
 
 
 
 
16
  if ($store instanceof Mage_Core_Model_Store) {
17
  $store = array($store->getId());
18
  }
19
- $test = $this->getSelect()->join(
20
- array('store_table' => $this->getTable('glossary_store')), 'main_table.glossary_id = store_table.glossary_id', array()
21
- )
22
- ->where('store_table.store_id in (?)', array(0, $store));
23
- //echo ($test->__toString());
24
  return $this;
25
  }
26
 
27
- protected function _afterLoad() {
28
  $items = $this->getColumnValues('glossary_id');
29
  if (count($items)) {
30
- $select = $this->getConnection()->select()->from($this->getTable('glossary_store'))
31
- ->where($this->getTable('glossary_store') . '.glossary_id IN (?)', $items);
32
  if ($result = $this->getConnection()->fetchPairs($select)) {
33
  foreach ($this as $item) {
34
  if (!isset($result[$item->getData('glossary_id')])) {
35
  continue;
36
  }
37
  if ($result[$item->getData('glossary_id')] == 0) {
38
- $stores = Mage::app()->getStores(false, true);
39
- $storeId = current($stores)->getId();
40
  $storeCode = key($stores);
41
  } else {
42
- $storeId = $result[$item->getData('glossary_id')];
43
  $storeCode = Mage::app()->getStore($storeId)->getCode();
44
  }
45
  $item->setData('_first_store_id', $storeId);
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Model_Mysql4_Glossary_Collection
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Model_Mysql4_Glossary_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
10
+ {
11
 
12
+ public function _construct () {
 
 
13
  parent::_construct();
14
  $this->_init('glossary/glossary');
15
  }
16
 
17
+ /**
18
+ * @return $this
19
+ */
20
+ public function setAlphabeticalOrder () {
21
  $this->getSelect()->order('title ASC');
22
+
23
  return $this;
24
  }
25
 
26
+ /**
27
+ * @param $store
28
+ *
29
+ * @return $this
30
+ */
31
+ public function addStoreFilter ($store) {
32
  if ($store instanceof Mage_Core_Model_Store) {
33
  $store = array($store->getId());
34
  }
35
+ $stores = $this->getSelect()->join(array('store_table' => $this->getTable('glossary_store')), 'main_table.glossary_id = store_table.glossary_id', array())->where('store_table.store_id in (?)', array(0, $store));
36
+
37
+ //echo ($stores->__toString());
 
 
38
  return $this;
39
  }
40
 
41
+ protected function _afterLoad () {
42
  $items = $this->getColumnValues('glossary_id');
43
  if (count($items)) {
44
+ $select = $this->getConnection()->select()->from($this->getTable('glossary_store'))->where($this->getTable('glossary_store') . '.glossary_id IN (?)', $items);
 
45
  if ($result = $this->getConnection()->fetchPairs($select)) {
46
  foreach ($this as $item) {
47
  if (!isset($result[$item->getData('glossary_id')])) {
48
  continue;
49
  }
50
  if ($result[$item->getData('glossary_id')] == 0) {
51
+ $stores = Mage::app()->getStores(false, true);
52
+ $storeId = current($stores)->getId();
53
  $storeCode = key($stores);
54
  } else {
55
+ $storeId = $result[$item->getData('glossary_id')];
56
  $storeCode = Mage::app()->getStore($storeId)->getCode();
57
  }
58
  $item->setData('_first_store_id', $storeId);
app/code/community/Kreativkonzentrat/Glossary/Model/Page.php CHANGED
@@ -1,34 +1,31 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
- class Kreativkonzentrat_Glossary_Model_Page extends Mage_Cms_Model_Page {
4
-
5
- public function getContent() {
 
6
  if (Mage::getStoreConfig('glossary/replacings/cms_replace') == 1) {
7
  $originalContent = parent::getContent();
8
  //get available glossary entries
9
  $titles = Mage::getModel('glossary/glossary')->getTitles();
10
-
11
- function kkg_callback($hit) {
12
- $result =
13
- '<a href="#" onclick="popWin(\' '
14
- . Mage::getUrl('glossary/entry')
15
- . urlencode(html_entity_decode($hit[0], ENT_COMPAT, "UTF-8"))
16
- . '/popup\',\'ge\',\'width=300,height=300,resizable=yes,scrollbars=yes\')">'
17
- . $hit[0]
18
- . '</a>';
19
  return $result;
20
  }
21
-
22
  //match entries with description and add link
23
  if (Mage::getStoreConfig('glossary/replacings/open_popup') == 1) {
24
  return preg_replace_callback($titles, 'kkg_callback', $originalContent);
25
  } else {
26
- return preg_replace_callback(
27
- $titles, create_function('$hit', 'return "<a href=\"'
28
- . Mage::getUrl()
29
- . 'glossary/entry/".urlencode(html_entity_decode($hit[0],ENT_COMPAT,"UTF-8"))
30
- ."\">".$hit[0]."</a>";'), $originalContent
31
- );
32
  }
33
  } else {
34
  return parent::getContent();
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Model_Page
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Model_Page extends Mage_Cms_Model_Page
10
+ {
11
 
12
+ /**
13
+ * @return mixed
14
+ */
15
+ public function getContent () {
16
  if (Mage::getStoreConfig('glossary/replacings/cms_replace') == 1) {
17
  $originalContent = parent::getContent();
18
  //get available glossary entries
19
  $titles = Mage::getModel('glossary/glossary')->getTitles();
20
+ function kkg_callback ($hit) {
21
+ $result = '<a href="#" onclick="popWin(\' ' . Mage::getUrl('glossary/entry') . urlencode(html_entity_decode($hit[0], ENT_COMPAT, 'UTF-8')) . '/popup\',\'ge\',\'width=300,height=300,resizable=yes,scrollbars=yes\')">' . $hit[0] . '</a>';
 
 
 
 
 
 
 
22
  return $result;
23
  }
 
24
  //match entries with description and add link
25
  if (Mage::getStoreConfig('glossary/replacings/open_popup') == 1) {
26
  return preg_replace_callback($titles, 'kkg_callback', $originalContent);
27
  } else {
28
+ return preg_replace_callback($titles, create_function('$hit', 'return "<a href=\"' . Mage::getUrl() . 'glossary/entry/".urlencode(html_entity_decode($hit[0],ENT_COMPAT,"UTF-8")) . "\">" . $hit[0] . "</a>";'), $originalContent);
 
 
 
 
 
29
  }
30
  } else {
31
  return parent::getContent();
app/code/community/Kreativkonzentrat/Glossary/Model/Product.php CHANGED
@@ -1,8 +1,17 @@
1
  <?php
 
 
 
 
 
 
 
2
  class Kreativkonzentrat_Glossary_Model_Product extends Mage_Catalog_Model_Product
3
  {
4
- public function getShortDescription()
5
- {
 
 
6
  if (Mage::getStoreConfig('glossary/replacings/sd_replace') == 1){
7
  //get original short description
8
  $originalShortDescription = parent::getShortDescription();
@@ -24,7 +33,7 @@ class Kreativkonzentrat_Glossary_Model_Product extends Mage_Catalog_Model_Produc
24
  } else {
25
  return preg_replace_callback(
26
  $titles,
27
- create_function('$hit','return "<a href=\"'.Mage::getBaseUrl().'glossary/entry/".urlencode($hit[0])."\">".$hit[0]."</a>";'),
28
  $originalShortDescription
29
  );
30
  }
@@ -34,8 +43,10 @@ class Kreativkonzentrat_Glossary_Model_Product extends Mage_Catalog_Model_Produc
34
  }
35
  }
36
 
37
- public function getDescription()
38
- {
 
 
39
  if (Mage::getStoreConfig('glossary/replacings/d_replace') == 1){
40
  //get original description
41
  $originalDescription = parent::getDescription();
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Model_Product
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
  class Kreativkonzentrat_Glossary_Model_Product extends Mage_Catalog_Model_Product
10
  {
11
+ /**
12
+ * @return mixed
13
+ */
14
+ public function getShortDescription () {
15
  if (Mage::getStoreConfig('glossary/replacings/sd_replace') == 1){
16
  //get original short description
17
  $originalShortDescription = parent::getShortDescription();
33
  } else {
34
  return preg_replace_callback(
35
  $titles,
36
+ create_function('$hit', 'return "<a href=\"' . Mage::getBaseUrl() . 'glossary/entry/" . urlencode($hit[0]) . "\">" . $hit[0] . "</a>";'),
37
  $originalShortDescription
38
  );
39
  }
43
  }
44
  }
45
 
46
+ /**
47
+ * @return mixed
48
+ */
49
+ public function getDescription () {
50
  if (Mage::getStoreConfig('glossary/replacings/d_replace') == 1){
51
  //get original description
52
  $originalDescription = parent::getDescription();
app/code/community/Kreativkonzentrat/Glossary/Model/Status.php CHANGED
@@ -1,14 +1,21 @@
1
  <?php
2
-
3
- class Kreativkonzentrat_Glossary_Model_Status extends Varien_Object {
4
- const STATUS_ENABLED = 1;
 
 
 
 
 
 
 
5
  const STATUS_DISABLED = 0;
6
 
7
- static public function getOptionArray() {
8
- return array(
9
- self::STATUS_ENABLED => Mage::helper('glossary')->__('Enabled'),
10
- self::STATUS_DISABLED => Mage::helper('glossary')->__('Disabled')
11
- );
12
  }
13
 
14
  }
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Model_Status
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Model_Status extends Varien_Object
10
+ {
11
+ const STATUS_ENABLED = 1;
12
  const STATUS_DISABLED = 0;
13
 
14
+ /**
15
+ * @return array
16
+ */
17
+ static public function getOptionArray () {
18
+ return array(self::STATUS_ENABLED => Mage::helper('glossary')->__('Enabled'), self::STATUS_DISABLED => Mage::helper('glossary')->__('Disabled'));
19
  }
20
 
21
  }
app/code/community/Kreativkonzentrat/Glossary/controllers/Adminhtml/GlossaryController.php CHANGED
@@ -1,21 +1,35 @@
1
  <?php
2
-
3
- class Kreativkonzentrat_Glossary_Adminhtml_GlossaryController extends Mage_Adminhtml_Controller_Action {
4
-
5
- protected function _initAction() {
6
- $this->loadLayout()
7
- ->_setActiveMenu('glossary/items')
8
- ->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
 
 
 
 
 
 
 
 
9
 
10
  return $this;
11
  }
12
 
13
- public function indexAction() {
 
 
 
14
  $this->_initAction()->renderLayout();
15
  }
16
 
17
- public function editAction() {
18
- $id = $this->getRequest()->getParam('id');
 
 
 
19
  $model = Mage::getModel('glossary/glossary')->load($id);
20
 
21
  if ($model->getId() || $id == 0) {
@@ -23,20 +37,13 @@ class Kreativkonzentrat_Glossary_Adminhtml_GlossaryController extends Mage_Admin
23
  if (!empty($data)) {
24
  $model->setData($data);
25
  }
26
-
27
  Mage::register('glossary_data', $model);
28
-
29
  $this->loadLayout();
30
  $this->_setActiveMenu('glossary/items');
31
-
32
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
33
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
34
-
35
  $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
36
-
37
- $this->_addContent($this->getLayout()->createBlock('glossary/adminhtml_glossary_edit'))
38
- ->_addLeft($this->getLayout()->createBlock('glossary/adminhtml_glossary_edit_tabs'));
39
-
40
  $this->renderLayout();
41
  } else {
42
  Mage::getSingleton('adminhtml/session')->addError(Mage::helper('glossary')->__('Item does not exist'));
@@ -44,94 +51,75 @@ class Kreativkonzentrat_Glossary_Adminhtml_GlossaryController extends Mage_Admin
44
  }
45
  }
46
 
47
- public function newAction() {
 
 
 
48
  $this->_forward('edit');
49
  }
50
 
51
- public function saveAction() {
52
- if ($data = $this->getRequest()->getPost()) {
53
-
54
- if (isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '') {
55
- try {
56
- /* Starting upload */
57
- $uploader = new Varien_File_Uploader('filename');
58
-
59
- // Any extension would work
60
- $uploader->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png'));
61
- $uploader->setAllowRenameFiles(false);
62
-
63
- // Set the file upload mode
64
- // false -> get the file directly in the specified folder
65
- // true -> get the file in the product like folders
66
- // (file.jpg will go in something like /media/f/i/file.jpg)
67
- $uploader->setFilesDispersion(false);
68
-
69
- // We set media as the upload dir
70
- $path = Mage::getBaseDir('media') . DS;
71
- $uploader->save($path, $_FILES['filename']['name']);
72
- } catch (Exception $e) {
73
-
74
- }
75
 
76
- //this way the name is saved in DB
77
- $data['filename'] = $_FILES['filename']['name'];
78
- }
79
- $stores = $this->getRequest()->getPost('stores', false);
 
 
80
  //fix for "all storeviews"
81
- $storeIds = array();
82
- if($stores[0] == '0'){
83
  $data['stores'] = array('0');
84
  }
85
-
86
  $model = Mage::getModel('glossary/glossary');
87
- $model->setData($data)
88
- ->setId($this->getRequest()->getParam('id'));
89
-
90
  try {
91
- if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
92
- $model->setCreatedTime(now())
93
- ->setUpdateTime(now());
94
  } else {
95
  $model->setUpdateTime(now());
96
  }
97
- $title = $data['title'];
98
- $title2 = utf8_decode($data['title']);
99
- $title = utf8_encode($title2[0]);
100
-
101
- function testF($title) {
102
- if (preg_match('/^[a-z]$/i', $title)) {
103
- return strtoupper($title);
104
- }
105
-
106
- switch ($title) {
107
- case 'ä': case 'Ä':
108
- return 'A';
109
- case 'ö': case 'Ö':
110
- return 'O';
111
- case 'ü': case 'Ü':
112
- return 'U';
113
- default:
114
- return '123';
115
- }
116
- }
117
-
118
- $model->setLetter(testF($title));
119
  $model->save();
120
- //TODO:
121
- //Mage::app()->cleanCache();
122
  Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('glossary')->__('Item was successfully saved'));
123
  Mage::getSingleton('adminhtml/session')->setFormData(false);
124
-
125
  if ($this->getRequest()->getParam('back')) {
126
  $this->_redirect('*/*/edit', array('id' => $model->getId()));
 
127
  return;
128
  }
129
  $this->_redirect('*/*/');
 
130
  return;
131
- } catch (Exception $e) {
 
132
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
133
  Mage::getSingleton('adminhtml/session')->setFormData($data);
134
  $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
 
135
  return;
136
  }
137
  }
@@ -139,17 +127,18 @@ class Kreativkonzentrat_Glossary_Adminhtml_GlossaryController extends Mage_Admin
139
  $this->_redirect('*/*/');
140
  }
141
 
142
- public function deleteAction() {
 
 
 
143
  if ($this->getRequest()->getParam('id') > 0) {
144
  try {
145
  $model = Mage::getModel('glossary/glossary');
146
-
147
- $model->setId($this->getRequest()->getParam('id'))
148
- ->delete();
149
-
150
  Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
151
  $this->_redirect('*/*/');
152
- } catch (Exception $e) {
 
153
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
154
  $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
155
  }
@@ -157,7 +146,10 @@ class Kreativkonzentrat_Glossary_Adminhtml_GlossaryController extends Mage_Admin
157
  $this->_redirect('*/*/');
158
  }
159
 
160
- public function massDeleteAction() {
 
 
 
161
  $glossaryIds = $this->getRequest()->getParam('glossary');
162
  if (!is_array($glossaryIds)) {
163
  Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
@@ -167,52 +159,60 @@ class Kreativkonzentrat_Glossary_Adminhtml_GlossaryController extends Mage_Admin
167
  $glossary = Mage::getModel('glossary/glossary')->load($glossaryId);
168
  $glossary->delete();
169
  }
170
- Mage::getSingleton('adminhtml/session')->addSuccess(
171
- Mage::helper('adminhtml')->__('Total of %d record(s) were successfully deleted', count($glossaryIds))
172
- );
173
- } catch (Exception $e) {
174
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
175
  }
176
  }
177
  $this->_redirect('*/*/index');
178
  }
179
 
180
- public function massStatusAction() {
 
 
 
181
  $glossaryIds = $this->getRequest()->getParam('glossary');
182
  if (!is_array($glossaryIds)) {
183
  Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
184
  } else {
185
  try {
186
  foreach ($glossaryIds as $glossaryId) {
187
- $glossary = Mage::getSingleton('glossary/glossary')
188
- ->load($glossaryId)
189
- ->setStatus($this->getRequest()->getParam('status'))
190
- ->setIsMassupdate(true)
191
- ->save();
192
  }
193
  $this->_getSession()->addSuccess($this->__('Total of %d record(s) were successfully updated', count($glossaryIds)));
194
- } catch (Exception $e) {
 
195
  $this->_getSession()->addError($e->getMessage());
196
  }
197
  }
198
  $this->_redirect('*/*/index');
199
  }
200
 
201
- public function exportCsvAction() {
 
 
 
202
  $fileName = 'glossary.csv';
203
- $content = $this->getLayout()->createBlock('glossary/adminhtml_glossary_grid')
204
- ->getCsv();
205
  $this->_sendUploadResponse($fileName, $content);
206
  }
207
 
208
- public function exportXmlAction() {
 
 
 
209
  $fileName = 'glossary.xml';
210
- $content = $this->getLayout()->createBlock('glossary/adminhtml_glossary_grid')
211
- ->getXml();
212
  $this->_sendUploadResponse($fileName, $content);
213
  }
214
 
215
- protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream') {
 
 
 
 
 
216
  $response = $this->getResponse();
217
  $response->setHeader('HTTP/1.1 200 OK', '');
218
  $response->setHeader('Pragma', 'public', true);
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_Adminhtml_GlossaryController
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_Adminhtml_GlossaryController extends Mage_Adminhtml_Controller_Action
10
+ {
11
+
12
+ /**
13
+ * @return $this
14
+ */
15
+ protected function _initAction () {
16
+ $this->loadLayout()->_setActiveMenu('glossary/items')->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
17
 
18
  return $this;
19
  }
20
 
21
+ /**
22
+ *
23
+ */
24
+ public function indexAction () {
25
  $this->_initAction()->renderLayout();
26
  }
27
 
28
+ /**
29
+ *
30
+ */
31
+ public function editAction () {
32
+ $id = $this->getRequest()->getParam('id');
33
  $model = Mage::getModel('glossary/glossary')->load($id);
34
 
35
  if ($model->getId() || $id == 0) {
37
  if (!empty($data)) {
38
  $model->setData($data);
39
  }
 
40
  Mage::register('glossary_data', $model);
 
41
  $this->loadLayout();
42
  $this->_setActiveMenu('glossary/items');
 
43
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
44
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
 
45
  $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
46
+ $this->_addContent($this->getLayout()->createBlock('glossary/adminhtml_glossary_edit'))->_addLeft($this->getLayout()->createBlock('glossary/adminhtml_glossary_edit_tabs'));
 
 
 
47
  $this->renderLayout();
48
  } else {
49
  Mage::getSingleton('adminhtml/session')->addError(Mage::helper('glossary')->__('Item does not exist'));
51
  }
52
  }
53
 
54
+ /**
55
+ *
56
+ */
57
+ public function newAction () {
58
  $this->_forward('edit');
59
  }
60
 
61
+ /**
62
+ * @param string $letter
63
+ *
64
+ * @return string
65
+ */
66
+ private function asciiLetter ($letter) {
67
+ if (preg_match('/^[a-z]$/i', $letter)) {
68
+ return strtoupper($letter);
69
+ }
70
+ switch ($letter) {
71
+ case 'ä':
72
+ case 'Ä':
73
+ return 'A';
74
+ case 'ö':
75
+ case 'Ö':
76
+ return 'O';
77
+ case 'ü':
78
+ case 'Ü':
79
+ return 'U';
80
+ default:
81
+ return '123';
82
+ }
83
+ }
 
84
 
85
+ /**
86
+ *
87
+ */
88
+ public function saveAction () {
89
+ if ($data = $this->getRequest()->getPost()) {
90
+ $stores = $this->getRequest()->getPost('stores', false);
91
  //fix for "all storeviews"
92
+ if ($stores[0] == '0') {
 
93
  $data['stores'] = array('0');
94
  }
 
95
  $model = Mage::getModel('glossary/glossary');
96
+ $model->setData($data)->setId($this->getRequest()->getParam('id'));
 
 
97
  try {
98
+ if ($model->getCreatedTime == null || $model->getUpdateTime() == null) {
99
+ $model->setCreatedTime(now())->setUpdateTime(now());
 
100
  } else {
101
  $model->setUpdateTime(now());
102
  }
103
+ $title = utf8_decode($data['title']);
104
+ $startingLetter = utf8_encode($title[0]);
105
+ $model->setLetter($this->asciiLetter($startingLetter));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  $model->save();
 
 
107
  Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('glossary')->__('Item was successfully saved'));
108
  Mage::getSingleton('adminhtml/session')->setFormData(false);
 
109
  if ($this->getRequest()->getParam('back')) {
110
  $this->_redirect('*/*/edit', array('id' => $model->getId()));
111
+
112
  return;
113
  }
114
  $this->_redirect('*/*/');
115
+
116
  return;
117
+ }
118
+ catch (Exception $e) {
119
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
120
  Mage::getSingleton('adminhtml/session')->setFormData($data);
121
  $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
122
+
123
  return;
124
  }
125
  }
127
  $this->_redirect('*/*/');
128
  }
129
 
130
+ /**
131
+ *
132
+ */
133
+ public function deleteAction () {
134
  if ($this->getRequest()->getParam('id') > 0) {
135
  try {
136
  $model = Mage::getModel('glossary/glossary');
137
+ $model->setId($this->getRequest()->getParam('id'))->delete();
 
 
 
138
  Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
139
  $this->_redirect('*/*/');
140
+ }
141
+ catch (Exception $e) {
142
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
143
  $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
144
  }
146
  $this->_redirect('*/*/');
147
  }
148
 
149
+ /**
150
+ *
151
+ */
152
+ public function massDeleteAction () {
153
  $glossaryIds = $this->getRequest()->getParam('glossary');
154
  if (!is_array($glossaryIds)) {
155
  Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
159
  $glossary = Mage::getModel('glossary/glossary')->load($glossaryId);
160
  $glossary->delete();
161
  }
162
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Total of %d record(s) were successfully deleted', count($glossaryIds)));
163
+ }
164
+ catch (Exception $e) {
 
165
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
166
  }
167
  }
168
  $this->_redirect('*/*/index');
169
  }
170
 
171
+ /**
172
+ *
173
+ */
174
+ public function massStatusAction () {
175
  $glossaryIds = $this->getRequest()->getParam('glossary');
176
  if (!is_array($glossaryIds)) {
177
  Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
178
  } else {
179
  try {
180
  foreach ($glossaryIds as $glossaryId) {
181
+ Mage::getSingleton('glossary/glossary')->load($glossaryId)->setStatus($this->getRequest()->getParam('status'))->setIsMassupdate(true)->save();
 
 
 
 
182
  }
183
  $this->_getSession()->addSuccess($this->__('Total of %d record(s) were successfully updated', count($glossaryIds)));
184
+ }
185
+ catch (Exception $e) {
186
  $this->_getSession()->addError($e->getMessage());
187
  }
188
  }
189
  $this->_redirect('*/*/index');
190
  }
191
 
192
+ /**
193
+ *
194
+ */
195
+ public function exportCsvAction () {
196
  $fileName = 'glossary.csv';
197
+ $content = $this->getLayout()->createBlock('glossary/adminhtml_glossary_grid')->getCsv();
 
198
  $this->_sendUploadResponse($fileName, $content);
199
  }
200
 
201
+ /**
202
+ *
203
+ */
204
+ public function exportXmlAction () {
205
  $fileName = 'glossary.xml';
206
+ $content = $this->getLayout()->createBlock('glossary/adminhtml_glossary_grid')->getXml();
 
207
  $this->_sendUploadResponse($fileName, $content);
208
  }
209
 
210
+ /**
211
+ * @param $fileName
212
+ * @param $content
213
+ * @param string $contentType
214
+ */
215
+ protected function _sendUploadResponse ($fileName, $content, $contentType = 'application/octet-stream') {
216
  $response = $this->getResponse();
217
  $response->setHeader('HTTP/1.1 200 OK', '');
218
  $response->setHeader('Pragma', 'public', true);
app/code/community/Kreativkonzentrat/Glossary/controllers/IndexController.php CHANGED
@@ -1,30 +1,36 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
- class Kreativkonzentrat_Glossary_IndexController extends Mage_Core_Controller_Front_Action {
4
-
5
- public function indexAction() {
 
6
  $this->loadLayout();
7
  $glossary_id = $this->getRequest()->getParam('id');
8
  if ($glossary_id != null && $glossary_id != '') {
9
  $glossary = Mage::getModel('glossary/glossary')->load($glossary_id)->getData();
10
  } else {
11
  $glossary = Mage::getModel('glossary/glossary')->getFilteredCollection();
12
- $this->getLayout()->getBlock('glossary_toolbar')
13
- ->addOrderToAvailableOrders('title','Title')
14
- ->setOrder('title')
15
- ->setDefaultOrder('title')
16
- ->setCollection($glossary);
17
- $this->getLayout()->getBlock('glossary_toolbar_pager')
18
- ->setCollection($glossary);
19
  }
20
-
21
  Mage::register('glossary', $glossary);
22
  $this->renderLayout();
23
  }
24
 
25
- public function viewAction() {
 
 
 
26
  $glossary_id = $this->getRequest()->getParam('id');
27
-
28
  if ($glossary_id != null) {
29
  $glossary = Mage::getModel('glossary/glossary');
30
  $glossary->load($glossary_id);
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_IndexController
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_IndexController extends Mage_Core_Controller_Front_Action
10
+ {
11
 
12
+ /**
13
+ *
14
+ */
15
+ public function indexAction () {
16
  $this->loadLayout();
17
  $glossary_id = $this->getRequest()->getParam('id');
18
  if ($glossary_id != null && $glossary_id != '') {
19
  $glossary = Mage::getModel('glossary/glossary')->load($glossary_id)->getData();
20
  } else {
21
  $glossary = Mage::getModel('glossary/glossary')->getFilteredCollection();
22
+ $this->getLayout()->getBlock('glossary_toolbar')->addOrderToAvailableOrders('title', 'Title')->setOrder('title')->setDefaultOrder('title')->setCollection($glossary);
23
+ $this->getLayout()->getBlock('glossary_toolbar_pager')->setCollection($glossary);
 
 
 
 
 
24
  }
 
25
  Mage::register('glossary', $glossary);
26
  $this->renderLayout();
27
  }
28
 
29
+ /**
30
+ *
31
+ */
32
+ public function viewAction () {
33
  $glossary_id = $this->getRequest()->getParam('id');
 
34
  if ($glossary_id != null) {
35
  $glossary = Mage::getModel('glossary/glossary');
36
  $glossary->load($glossary_id);
app/code/community/Kreativkonzentrat/Glossary/controllers/ViewController.php CHANGED
@@ -1,57 +1,66 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
- class Kreativkonzentrat_Glossary_ViewController extends Mage_Core_Controller_Front_Action {
4
-
5
- public function indexAction() {
 
6
  $this->loadLayout();
7
  $this->renderLayout();
8
  }
9
 
10
- public function IdAction() {
 
 
 
11
  $glossary_id = $this->getRequest()->getParam('id');
12
  if ($glossary_id != null && $glossary_id != '') {
13
  $glossary = Mage::getModel('glossary/glossary')->load($glossary_id);
14
  $glossary->getData();
15
  } else {
16
- $resource = Mage::getSingleton('core/resource');
17
- $read = $resource->getConnection('core_read');
18
  $glossaryTable = $resource->getTableName('glossary');
19
-
20
- $select = $read->select()
21
- ->from($glossaryTable, array('glossary_id', 'title', 'glossary_content', 'status'))
22
- ->where('status', 1)
23
- ->order('title DESC');
24
-
25
- $glossary = $read->fetchRow($select);
26
  }
27
  Mage::register('glossary', $glossary);
28
  $this->loadLayout();
29
  $this->renderLayout();
30
  }
31
 
32
- public function popupAction() {
 
 
 
33
  $glossary_id = $this->getRequest()->getParam('id');
34
  if ($glossary_id != null && $glossary_id != '') {
35
  $glossary = Mage::getModel('glossary/glossary')->load($glossary_id);
36
  $glossary->getData();
37
  } else {
38
- $resource = Mage::getSingleton('core/resource');
39
- $read = $resource->getConnection('core_read');
40
  $glossaryTable = $resource->getTableName('glossary');
41
-
42
- $select = $read->select()
43
- ->from($glossaryTable, array('glossary_id', 'title', 'glossary_content', 'status'))
44
- ->where('status', 1)
45
- ->order('title DESC');
46
-
47
- $glossary = $read->fetchRow($select);
48
  }
49
  Mage::register('glossary', $glossary);
50
  $this->loadLayout();
51
  $this->renderLayout();
52
  }
53
 
54
- public function letterAction() {
 
 
 
55
  //get letter param
56
  $params = array_keys($this->getRequest()->getParams());
57
  if ($params != null) {
@@ -68,9 +77,9 @@ class Kreativkonzentrat_Glossary_ViewController extends Mage_Core_Controller_Fro
68
 
69
  */
70
  //echo ($collection->getSelect()->__toString());
71
- }
72
- else
73
  $collection = Mage::getModel('glossary/glossary')->getFilteredCollection();
 
74
  Mage::register('glossary', $collection);
75
  $this->loadLayout();
76
  $this->renderLayout();
1
  <?php
2
+ /**
3
+ * Class Kreativkonzentrat_Glossary_ViewController
4
+ *
5
+ * @package Kreativkonzentrat_Glossary
6
+ * @author Felix Moche <felix@kreativkonzentratd.e>
7
+ * @copyright 2012-2013 Kreativkonzentrat GbR
8
+ */
9
+ class Kreativkonzentrat_Glossary_ViewController extends Mage_Core_Controller_Front_Action
10
+ {
11
 
12
+ /**
13
+ *
14
+ */
15
+ public function indexAction () {
16
  $this->loadLayout();
17
  $this->renderLayout();
18
  }
19
 
20
+ /**
21
+ *
22
+ */
23
+ public function IdAction () {
24
  $glossary_id = $this->getRequest()->getParam('id');
25
  if ($glossary_id != null && $glossary_id != '') {
26
  $glossary = Mage::getModel('glossary/glossary')->load($glossary_id);
27
  $glossary->getData();
28
  } else {
29
+ $resource = Mage::getSingleton('core/resource');
30
+ $read = $resource->getConnection('core_read');
31
  $glossaryTable = $resource->getTableName('glossary');
32
+ $select = $read->select()->from($glossaryTable, array('glossary_id', 'title', 'glossary_content', 'status'))->where('status', 1)->order('title DESC');
33
+ $glossary = $read->fetchRow($select);
 
 
 
 
 
34
  }
35
  Mage::register('glossary', $glossary);
36
  $this->loadLayout();
37
  $this->renderLayout();
38
  }
39
 
40
+ /**
41
+ *
42
+ */
43
+ public function popupAction () {
44
  $glossary_id = $this->getRequest()->getParam('id');
45
  if ($glossary_id != null && $glossary_id != '') {
46
  $glossary = Mage::getModel('glossary/glossary')->load($glossary_id);
47
  $glossary->getData();
48
  } else {
49
+ $resource = Mage::getSingleton('core/resource');
50
+ $read = $resource->getConnection('core_read');
51
  $glossaryTable = $resource->getTableName('glossary');
52
+ $select = $read->select()->from($glossaryTable, array('glossary_id', 'title', 'glossary_content', 'status'))->where('status', 1)->order('title DESC');
53
+ $glossary = $read->fetchRow($select);
 
 
 
 
 
54
  }
55
  Mage::register('glossary', $glossary);
56
  $this->loadLayout();
57
  $this->renderLayout();
58
  }
59
 
60
+ /**
61
+ *
62
+ */
63
+ public function letterAction () {
64
  //get letter param
65
  $params = array_keys($this->getRequest()->getParams());
66
  if ($params != null) {
77
 
78
  */
79
  //echo ($collection->getSelect()->__toString());
80
+ } else {
 
81
  $collection = Mage::getModel('glossary/glossary')->getFilteredCollection();
82
+ }
83
  Mage::register('glossary', $collection);
84
  $this->loadLayout();
85
  $this->renderLayout();
app/code/community/Kreativkonzentrat/Glossary/etc/config.xml CHANGED
@@ -19,7 +19,7 @@
19
  </default>
20
  <modules>
21
  <Kreativkonzentrat_Glossary>
22
- <version>0.5.4</version>
23
  </Kreativkonzentrat_Glossary>
24
  </modules>
25
  <frontend>
@@ -51,13 +51,13 @@
51
  </frontend>
52
  <admin>
53
  <routers>
54
- <glossary_admin>
55
- <use>admin</use>
56
  <args>
57
- <module>Kreativkonzentrat_Glossary</module>
58
- <frontName>glossary_admin</frontName>
 
59
  </args>
60
- </glossary_admin>
61
  </routers>
62
  </admin>
63
  <adminhtml>
@@ -78,7 +78,7 @@
78
  <items module="glossary">
79
  <title>Manage Items</title>
80
  <sort_order>0</sort_order>
81
- <action>glossary_admin/adminhtml_glossary</action>
82
  </items>
83
  </children>
84
  </glossary>
19
  </default>
20
  <modules>
21
  <Kreativkonzentrat_Glossary>
22
+ <version>0.5.5</version>
23
  </Kreativkonzentrat_Glossary>
24
  </modules>
25
  <frontend>
51
  </frontend>
52
  <admin>
53
  <routers>
54
+ <adminhtml>
 
55
  <args>
56
+ <modules>
57
+ <Kreativkonzentrat_Glossary before="Mage_Adminhtml">Kreativkonzentrat_Glossary_Adminhtml</Kreativkonzentrat_Glossary>
58
+ </modules>
59
  </args>
60
+ </adminhtml>
61
  </routers>
62
  </admin>
63
  <adminhtml>
78
  <items module="glossary">
79
  <title>Manage Items</title>
80
  <sort_order>0</sort_order>
81
+ <action>adminhtml/glossary</action>
82
  </items>
83
  </children>
84
  </glossary>
app/code/community/Kreativkonzentrat/Glossary/sql/glossary_setup/mysql4-install-0.5.1.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
 
3
  $installer = $this;
4
-
5
  $installer->startSetup();
6
-
7
  $installer->run("
8
  -- DROP TABLE IF EXISTS {$this->getTable('glossary')};
9
  CREATE TABLE {$this->getTable('glossary')} (
@@ -20,7 +18,6 @@ CREATE TABLE {$this->getTable('glossary')} (
20
  PRIMARY KEY (`glossary_id`)
21
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Glossary entries';
22
 
23
-
24
  -- DROP TABLE IF EXISTS {$this->getTable('glossary_store')};
25
  CREATE TABLE {$this->getTable('glossary_store')} (
26
  `glossary_id` int(11) unsigned NOT NULL,
@@ -30,5 +27,4 @@ CREATE TABLE {$this->getTable('glossary_store')} (
30
  CONSTRAINT `FK_GLOSSARY_STORE_TO_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
31
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Glossary entries to stores';
32
  ");
33
-
34
  $installer->endSetup();
1
  <?php
2
 
3
  $installer = $this;
 
4
  $installer->startSetup();
 
5
  $installer->run("
6
  -- DROP TABLE IF EXISTS {$this->getTable('glossary')};
7
  CREATE TABLE {$this->getTable('glossary')} (
18
  PRIMARY KEY (`glossary_id`)
19
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Glossary entries';
20
 
 
21
  -- DROP TABLE IF EXISTS {$this->getTable('glossary_store')};
22
  CREATE TABLE {$this->getTable('glossary_store')} (
23
  `glossary_id` int(11) unsigned NOT NULL,
27
  CONSTRAINT `FK_GLOSSARY_STORE_TO_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
28
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Glossary entries to stores';
29
  ");
 
30
  $installer->endSetup();
app/code/community/Kreativkonzentrat/Glossary/sql/glossary_setup/mysql4-install-0.5.5.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $installer->run("
5
+ -- DROP TABLE IF EXISTS {$this->getTable('glossary')};
6
+ CREATE TABLE {$this->getTable('glossary')} (
7
+ `glossary_id` int(11) unsigned NOT NULL auto_increment,
8
+ `title` varchar(255) NOT NULL default '',
9
+ `metadescription` varchar(255) NOT NULL default '',
10
+ `metakeywords` varchar(255) NOT NULL default '',
11
+ `letter` varchar(255) NOT NULL default '',
12
+ `glossary_content` text NOT NULL default '',
13
+ `status` smallint(6) NOT NULL default '0',
14
+ `created_time` datetime NULL,
15
+ `update_time` datetime NULL,
16
+ PRIMARY KEY (`glossary_id`)
17
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Glossary entries';
18
+
19
+ -- DROP TABLE IF EXISTS {$this->getTable('glossary_store')};
20
+ CREATE TABLE {$this->getTable('glossary_store')} (
21
+ `glossary_id` int(11) unsigned NOT NULL,
22
+ `store_id` smallint(5) unsigned NOT NULL,
23
+ PRIMARY KEY (`glossary_id`,`store_id`),
24
+ CONSTRAINT `FK_GLOSSARY_STORE_TO_GLOSSARY` FOREIGN KEY (`glossary_id`) REFERENCES `{$this->getTable('glossary')}` (`glossary_id`) ON UPDATE CASCADE ON DELETE CASCADE,
25
+ CONSTRAINT `FK_GLOSSARY_STORE_TO_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
26
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Glossary entries to stores';
27
+ ");
28
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/glossary.xml CHANGED
@@ -1,11 +1,11 @@
1
  <?xml version="1.0"?>
2
  <layout version="0.1.0">
3
- <glossary_admin_adminhtml_glossary_index>
4
  <reference name="content">
5
  <block type="glossary/adminhtml_glossary" name="glossary" />
6
  </reference>
7
- </glossary_admin_adminhtml_glossary_index>
8
- <glossary_admin_adminhtml_glossary_edit>
9
  <update handle="editor" />
10
- </glossary_admin_adminhtml_glossary_edit>
11
  </layout>
1
  <?xml version="1.0"?>
2
  <layout version="0.1.0">
3
+ <adminhtml_glossary_index>
4
  <reference name="content">
5
  <block type="glossary/adminhtml_glossary" name="glossary" />
6
  </reference>
7
+ </adminhtml_glossary_index>
8
+ <adminhtml_glossary_edit>
9
  <update handle="editor" />
10
+ </adminhtml_glossary_edit>
11
  </layout>
app/design/frontend/base/default/template/glossary/glossary.phtml CHANGED
@@ -2,9 +2,8 @@
2
  /**
3
  * @category design
4
  * @package base_default
5
- * @copyright Kreativkonzentrat GbR 2012
6
- *
7
- * Date: 04.03.12, 12:50
8
  */
9
  ?>
10
  <?php
@@ -14,6 +13,6 @@ $collection = $this->getGlossary();
14
  <?php
15
  foreach ($collection as $item) :?>
16
  <div class="glossary_entry">
17
- <h3><a href="<?php echo $item->getUrl(); ?>" title="<?php echo $this->__('View glossary entry')?>"><?php echo $item->getTitle();?></a></h3>
18
  </div>
19
  <?php endforeach;?>
2
  /**
3
  * @category design
4
  * @package base_default
5
+ * @author Felix Moche <felix@kreativkonzentrat.de>
6
+ * @copyright 2012-2013 Kreativkonzentrat GbR
 
7
  */
8
  ?>
9
  <?php
13
  <?php
14
  foreach ($collection as $item) :?>
15
  <div class="glossary_entry">
16
+ <h3><a href="<?php echo $item->getUrl(); ?>" title="<?php echo $this->__('View glossary entry'); ?>"><?php echo $item->getTitle(); ?></a></h3>
17
  </div>
18
  <?php endforeach;?>
app/design/frontend/base/default/template/glossary/glossary_letter.phtml CHANGED
@@ -2,9 +2,8 @@
2
  /**
3
  * @category design
4
  * @package base_default
5
- * @copyright Kreativkonzentrat GbR 2012
6
- *
7
- * Date: 04.03.12, 12:56
8
  */
9
  ?>
10
  <h4><?php echo $this->__('Glossary') ?></h4>
2
  /**
3
  * @category design
4
  * @package base_default
5
+ * @author Felix Moche <felix@kreativkonzentrat.de>
6
+ * @copyright 2012-2013 Kreativkonzentrat GbR
 
7
  */
8
  ?>
9
  <h4><?php echo $this->__('Glossary') ?></h4>
app/design/frontend/base/default/template/glossary/glossary_popup.phtml CHANGED
@@ -2,14 +2,11 @@
2
  /**
3
  * @category design
4
  * @package base_default
5
- * @copyright Kreativkonzentrat GbR 2012
6
- *
7
- * Date: 04.03.12, 12:55
8
  */
9
  ?>
10
- <?php
11
- $item = $this->getGlossary();
12
- ?>
13
  <h4><?php echo $item->getTitle(); ?></h4>
14
  <div class="glossary_entry">
15
  <h2><?php echo $item->getTitle(); ?></h2>
2
  /**
3
  * @category design
4
  * @package base_default
5
+ * @author Felix Moche <felix@kreativkonzentrat.de>
6
+ * @copyright 2012-2013 Kreativkonzentrat GbR
 
7
  */
8
  ?>
9
+ <?php $item = $this->getGlossary(); ?>
 
 
10
  <h4><?php echo $item->getTitle(); ?></h4>
11
  <div class="glossary_entry">
12
  <h2><?php echo $item->getTitle(); ?></h2>
app/design/frontend/base/default/template/glossary/glossary_single.phtml CHANGED
@@ -2,16 +2,13 @@
2
  /**
3
  * @category design
4
  * @package base_default
5
- * @copyright Kreativkonzentrat GbR 2012
6
- *
7
- * Date: 04.03.12, 12:55
8
  */
9
  ?>
10
- <?php
11
- $item = $this->getGlossary();
12
- ?>
13
- <h4><?php echo $item->getTitle()?></h4>
14
  <div class="glossary_entry">
15
- <h2><?php echo $item->getTitle()?></h2>
16
- <p><?php echo $item->getGlossaryContent()?></p>
17
  </div>
2
  /**
3
  * @category design
4
  * @package base_default
5
+ * @author Felix Moche <felix@kreativkonzentrat.de>
6
+ * @copyright 2012-2013 Kreativkonzentrat GbR
 
7
  */
8
  ?>
9
+ <?php $item = $this->getGlossary(); ?>
10
+ <h4><?php echo $item->getTitle(); ?></h4>
 
 
11
  <div class="glossary_entry">
12
+ <h2><?php echo $item->getTitle(); ?></h2>
13
+ <p><?php echo $item->getGlossaryContent(); ?></p>
14
  </div>
app/design/frontend/base/default/template/glossary/letter/view.phtml CHANGED
@@ -2,9 +2,8 @@
2
  /**
3
  * @category design
4
  * @package base_default
5
- * @copyright Kreativkonzentrat GbR 2012
6
- *
7
- * Date: 04.03.12, 12:55
8
  */
9
  ?>
10
  <?php if (Mage::getStoreConfig('glossary/replacings/show_empty') == 0) : ?>
2
  /**
3
  * @category design
4
  * @package base_default
5
+ * @author Felix Moche <felix@kreativkonzentrat.de>
6
+ * @copyright 2012-2013 Kreativkonzentrat GbR
 
7
  */
8
  ?>
9
  <?php if (Mage::getStoreConfig('glossary/replacings/show_empty') == 0) : ?>
app/design/frontend/base/default/template/glossary/pager.phtml CHANGED
@@ -2,9 +2,8 @@
2
  /**
3
  * @category design
4
  * @package base_default
5
- * @copyright Kreativkonzentrat GbR 2012
6
- *
7
- * Date: 04.03.12, 12:56
8
  */
9
  ?>
10
  <?php if ($this->getLastPageNum() > 1): ?>
@@ -22,15 +21,12 @@
22
  </a>
23
  </li>
24
  <?php endif; ?>
25
-
26
  <?php if ($this->canShowFirst()): ?>
27
  <li><a class="first" href="<?php echo $this->getFirstPageUrl() ?>">1</a></li>
28
  <?php endif; ?>
29
-
30
  <?php if ($this->canShowPreviousJump()): ?>
31
  <li><a class="previous_jump" title="" href="<?php echo $this->getPreviousJumpUrl() ?>">...</a></li>
32
  <?php endif; ?>
33
-
34
  <?php foreach ($this->getFramePages() as $_page): ?>
35
  <?php if ($this->isPageCurrent($_page)): ?>
36
  <li class="current"><?php echo $_page ?></li>
@@ -38,15 +34,12 @@
38
  <li><a href="<?php echo $this->getPageUrl($_page) ?>"><?php echo $_page ?></a></li>
39
  <?php endif; ?>
40
  <?php endforeach; ?>
41
-
42
  <?php if ($this->canShowNextJump()): ?>
43
  <li><a class="next_jump" title="" href="<?php echo $this->getNextJumpUrl() ?>">...</a></li>
44
  <?php endif; ?>
45
-
46
  <?php if ($this->canShowLast()): ?>
47
  <li><a class="last" href="<?php echo $this->getLastPageUrl() ?>"><?php echo $this->getLastPageNum() ?></a></li>
48
  <?php endif; ?>
49
-
50
  <?php if (!$this->isLastPage()): ?>
51
  <li>
52
  <a class="next<?php if (!$this->getAnchorTextForNext()): ?> i-next<?php endif; ?>" href="<?php echo $this->getNextPageUrl() ?>" title="<?php echo $this->__('Next') ?>">
@@ -59,6 +52,5 @@
59
  </li>
60
  <?php endif; ?>
61
  </ol>
62
-
63
  </div>
64
  <?php endif; ?>
2
  /**
3
  * @category design
4
  * @package base_default
5
+ * @author Felix Moche <felix@kreativkonzentrat.de>
6
+ * @copyright 2012-2013 Kreativkonzentrat GbR
 
7
  */
8
  ?>
9
  <?php if ($this->getLastPageNum() > 1): ?>
21
  </a>
22
  </li>
23
  <?php endif; ?>
 
24
  <?php if ($this->canShowFirst()): ?>
25
  <li><a class="first" href="<?php echo $this->getFirstPageUrl() ?>">1</a></li>
26
  <?php endif; ?>
 
27
  <?php if ($this->canShowPreviousJump()): ?>
28
  <li><a class="previous_jump" title="" href="<?php echo $this->getPreviousJumpUrl() ?>">...</a></li>
29
  <?php endif; ?>
 
30
  <?php foreach ($this->getFramePages() as $_page): ?>
31
  <?php if ($this->isPageCurrent($_page)): ?>
32
  <li class="current"><?php echo $_page ?></li>
34
  <li><a href="<?php echo $this->getPageUrl($_page) ?>"><?php echo $_page ?></a></li>
35
  <?php endif; ?>
36
  <?php endforeach; ?>
 
37
  <?php if ($this->canShowNextJump()): ?>
38
  <li><a class="next_jump" title="" href="<?php echo $this->getNextJumpUrl() ?>">...</a></li>
39
  <?php endif; ?>
 
40
  <?php if ($this->canShowLast()): ?>
41
  <li><a class="last" href="<?php echo $this->getLastPageUrl() ?>"><?php echo $this->getLastPageNum() ?></a></li>
42
  <?php endif; ?>
 
43
  <?php if (!$this->isLastPage()): ?>
44
  <li>
45
  <a class="next<?php if (!$this->getAnchorTextForNext()): ?> i-next<?php endif; ?>" href="<?php echo $this->getNextPageUrl() ?>" title="<?php echo $this->__('Next') ?>">
52
  </li>
53
  <?php endif; ?>
54
  </ol>
 
55
  </div>
56
  <?php endif; ?>
app/design/frontend/base/default/template/glossary/toolbar.phtml CHANGED
@@ -2,9 +2,8 @@
2
  /**
3
  * @category design
4
  * @package base_default
5
- * @copyright Kreativkonzentrat GbR 2012
6
- *
7
- * Date: 04.03.12, 12:56
8
  */
9
  ?>
10
  <div class="toolbar">
2
  /**
3
  * @category design
4
  * @package base_default
5
+ * @author Felix Moche <felix@kreativkonzentrat.de>
6
+ * @copyright 2012-2013 Kreativkonzentrat GbR
 
7
  */
8
  ?>
9
  <div class="toolbar">
package.xml CHANGED
@@ -1,20 +1,19 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Kreativkonzentrat_Glossary</name>
4
- <version>0.5.4</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Adds a glossary to your store</summary>
10
  <description>The Glossary plugin for Magento allows you to easily add a glossary to your shop and links directly to glossary entries.</description>
11
- <notes>*Fixed problem with prefixed database tables&#xD;
12
- *Fixed image uploads&#xD;
13
- *Wrong version number in config.xml</notes>
14
  <authors><author><name>Felix Moche</name><user>auto-converted</user><email>felix@kreativkonzentrat.de</email></author></authors>
15
- <date>2013-02-18</date>
16
- <time>18:04:43</time>
17
- <contents><target name="magecommunity"><dir name="Kreativkonzentrat"><dir name="Glossary"><dir name="Block"><dir name="Adminhtml"><dir name="Glossary"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="81d0d6a301bd1c2ae6bfd8fd06e10601"/></dir><file name="Form.php" hash="0fdbefdb7ae7a994c7c72481b0596b1f"/><file name="Tabs.php" hash="f2245c1684628bc56c471f60e9ef9a71"/></dir><file name="Edit.php" hash="d94e1d46e467aae746321a4fd1c95bd7"/><file name="Grid.php" hash="083d4fe4260a9a35fe2b75dd1a8304dc"/></dir><file name="Glossary.php" hash="9df63fd00059bdf3b8eae7f9be4a73ba"/></dir><dir name="Glossary"><file name="Navigation.php" hash="21b10b0dcf11b21787e638737787dc6c"/><file name="Toolbar.php" hash="73caf33dad188d868b3c329993526963"/></dir><file name="Glossary.php" hash="9290dc4835357fb0bbe9e1bb0ab6178b"/></dir><dir name="Controller"><file name="Router.php" hash="e46ea43594c1e76d7d12418cbf2e3d90"/></dir><dir name="Helper"><file name="Data.php" hash="0bb8245a37153b5280bec9db389f9f32"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Select.php" hash="ecf281379224f71b0a4ec2b24ab43da3"/></dir><dir name="Mysql4"><dir name="Glossary"><file name="Collection.php" hash="cb83b8dbc16e09d5506ad8cd9c2b8dd0"/></dir><file name="Glossary.php" hash="a0c7c07d246c22210b3b2bd5c2629432"/></dir><file name="Glossary.php" hash="c8766453bf025c1eac3674b00e78ac0f"/><file name="Page.php" hash="c507a9ff530939df51f0748ab1f64430"/><file name="Product.php" hash="4c15e30ad5fd5e0ad63e51ce712d9e16"/><file name="Status.php" hash="5a52b7fc5946f45425b85fa0ef86adce"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="GlossaryController.php" hash="e6f16cdf8faeab2e821508104262f1df"/></dir><file name="IndexController.php" hash="28ee4946d858b480f567b6323f5c3e8c"/><file name="ViewController.php" hash="1427f3caf03620289ff2b70cc102a8bd"/></dir><dir name="etc"><file name="config.xml" hash="8f35e356107069be8435be96cc831a12"/><file name="system.xml" hash="1d4e42aaccfd13d388056eb2938916a8"/></dir><dir name="sql"><dir name="glossary_setup"><file name="mysql4-install-0.5.1.php" hash="d19900a2c03411fcf4fb559007060134"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="glossary.xml" hash="56345facbc8a81b026d64fadbc6dafd1"/></dir><dir name="template"><dir name="glossary"><dir name="letter"><file name="view.phtml" hash="5bb0b80c315e17942c4326d9a77cc9c7"/></dir><file name="glossary.phtml" hash="a365c2b18a2fc8c322a453b387c4489d"/><file name="glossary_letter.phtml" hash="c734250b896932aacfb7ff8289436bde"/><file name="glossary_popup.phtml" hash="854f07d8fcea7ef649450e37cae4c199"/><file name="glossary_single.phtml" hash="afd557f0b958be793a57ad831f891756"/><file name="pager.phtml" hash="ff614fd4956d1fe352dda1fe8af5219c"/><file name="toolbar.phtml" hash="dfe367561f9513a79ddc61854e5f62a7"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="glossary.xml" hash="4bf01fb8f662e970b12186ed7f6388ad"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Kreativkonzentrat_Glossary.xml" hash="ae9bb531254247fcd1d628ae582e8b17"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Kreativkonzentrat_Glossary.csv" hash="f3f9ef70ef94af8f133f7abf56e5c1df"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies/>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Kreativkonzentrat_Glossary</name>
4
+ <version>0.5.5</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Adds a glossary to your store</summary>
10
  <description>The Glossary plugin for Magento allows you to easily add a glossary to your shop and links directly to glossary entries.</description>
11
+ <notes>*correct adminhtml URLs&#xD;
12
+ *further improvements for image uploads</notes>
 
13
  <authors><author><name>Felix Moche</name><user>auto-converted</user><email>felix@kreativkonzentrat.de</email></author></authors>
14
+ <date>2013-05-02</date>
15
+ <time>16:48:46</time>
16
+ <contents><target name="magecommunity"><dir name="Kreativkonzentrat"><dir name="Glossary"><dir name="Block"><dir name="Adminhtml"><dir name="Glossary"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="0effc4c7ddc0b403fa4ed8c54b598bf7"/></dir><file name="Form.php" hash="73571383488ae87a53cece22506f9633"/><file name="Tabs.php" hash="0c6ecb9e132401848ed2ea682e7c47d8"/></dir><file name="Edit.php" hash="3444d48517983c93c9ff5f5e6226dc5f"/><file name="Grid.php" hash="04d7fe7874e60891f02c69ee33cc7744"/></dir><file name="Glossary.php" hash="e8b8611c1dd2b6666e208bee5bc0a06b"/></dir><dir name="Glossary"><file name="Navigation.php" hash="f8c339fdf11ac38a6213104d5875a3f0"/><file name="Toolbar.php" hash="3d952901662c6d99e74d76ef2a16c6d7"/></dir><file name="Glossary.php" hash="79c571e1868bea0e5dc6f880e529bccc"/></dir><dir name="Controller"><file name="Router.php" hash="1c74519c5178d7682ab676f2ed4eec71"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="GlossaryController.php" hash="80a8230e790cb5f4fa722dc2b0d84887"/></dir><file name="IndexController.php" hash="7b54fbed354d4f98a228a5c62458beff"/><file name="ViewController.php" hash="14dc080ad5a937514d46cda4d56b5777"/></dir><dir name="etc"><file name="config.xml" hash="9caa343e856e0979be2cc97a6376e8a6"/><file name="system.xml" hash="1d4e42aaccfd13d388056eb2938916a8"/></dir><dir name="Helper"><file name="Data.php" hash="4e69db77812c07b925f4be34b38a501c"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Select.php" hash="21c76b12fee06db05aeedb7c71b0c5c8"/></dir><dir name="Mysql4"><dir name="Glossary"><file name="Collection.php" hash="16d8393128ba884ae94b93431cdfbcfc"/></dir><file name="Glossary.php" hash="075d8c09d782f9bcfe30bf06628c7d7f"/></dir><file name="Glossary.php" hash="cc27f83fb35f281470cc41400343a154"/><file name="Page.php" hash="aadf769ae1f2d01fa2ff2aad3b3c21fc"/><file name="Product.php" hash="cf191326f968425fd1cfd34848910752"/><file name="Status.php" hash="c356d5d8cd0c4c2e29b72b6483199949"/></dir><dir name="sql"><dir name="glossary_setup"><file name="mysql4-install-0.5.1.php" hash="cfa08f86f12be494153add2031642e0e"/><file name="mysql4-install-0.5.5.php" hash="1a23535af6a832f0412246b9c6888fe0"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="glossary.xml" hash="56345facbc8a81b026d64fadbc6dafd1"/></dir><dir name="template"><dir name="glossary"><dir name="letter"><file name="view.phtml" hash="eb40266896912a17e2f53ec67a6f3a09"/></dir><file name="glossary_letter.phtml" hash="018e520a7ac52bf9c9dc6737189b1729"/><file name="glossary.phtml" hash="f0c8072cbbdc1af7e02062f9c7f543e0"/><file name="glossary_popup.phtml" hash="aa1cbf3c5f0b0eaa8561814486f2135b"/><file name="glossary_single.phtml" hash="c915593852832e8fde6dacb37f0b1789"/><file name="pager.phtml" hash="0b4458298810fc5fbb6988ba5e338fbb"/><file name="toolbar.phtml" hash="4d152db96a576b6d19013fa1497fb2dc"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="glossary.xml" hash="8cbd849137916a3e184417d2d2b26536"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Kreativkonzentrat_Glossary.xml" hash="ae9bb531254247fcd1d628ae582e8b17"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Kreativkonzentrat_Glossary.csv" hash="f3f9ef70ef94af8f133f7abf56e5c1df"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies/>
19
  </package>