Version Notes
This release include multistore feature
Download this release
Release Info
Developer | Magento Core Team |
Extension | Mage_Navadmin |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.1.0
- app/code/community/Mage/Navadmin/Block/Adminhtml/Navadmin/Edit/Tab/Form.php +6 -6
- app/code/community/Mage/Navadmin/Helper/Data.php +58 -25
- app/code/community/Mage/Navadmin/controllers/Adminhtml/NavadminController.php +23 -44
- app/code/community/Mage/Navadmin/controllers/IndexController.php +1 -39
- app/code/community/Mage/Navadmin/sql/navadmin_setup/mysql4-install-0.1.0.php +1 -0
- app/design/frontend/default/default/layout/navadmin.xml +2 -2
- app/design/frontend/default/default/template/navadmin/top.phtml +4 -1
- package.xml +13 -10
app/code/community/Mage/Navadmin/Block/Adminhtml/Navadmin/Edit/Tab/Form.php
CHANGED
@@ -8,6 +8,12 @@ class Mage_Navadmin_Block_Adminhtml_Navadmin_Edit_Tab_Form extends Mage_Adminhtm
|
|
8 |
$this->setForm($form);
|
9 |
$fieldset = $form->addFieldset('navadmin_form', array('legend'=>Mage::helper('navadmin')->__('Item information')));
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
$fieldset->addField('title', 'text', array(
|
12 |
'label' => Mage::helper('navadmin')->__('Label'),
|
13 |
'class' => 'required-entry',
|
@@ -38,12 +44,6 @@ class Mage_Navadmin_Block_Adminhtml_Navadmin_Edit_Tab_Form extends Mage_Adminhtm
|
|
38 |
),
|
39 |
));
|
40 |
|
41 |
-
$fieldset->addField('pid', 'select', array(
|
42 |
-
'label' => Mage::helper('navadmin')->__('Pid'),
|
43 |
-
'name' => 'pid',
|
44 |
-
'values' => Mage::helper('navadmin')->getSelectcat(),
|
45 |
-
));
|
46 |
-
|
47 |
$fieldset->addField('position', 'text', array(
|
48 |
'label' => Mage::helper('navadmin')->__('Position'),
|
49 |
'required' => false,
|
8 |
$this->setForm($form);
|
9 |
$fieldset = $form->addFieldset('navadmin_form', array('legend'=>Mage::helper('navadmin')->__('Item information')));
|
10 |
|
11 |
+
$fieldset->addField('pid', 'select', array(
|
12 |
+
'label' => Mage::helper('navadmin')->__('Children of'),
|
13 |
+
'name' => 'pid',
|
14 |
+
'values' => Mage::helper('navadmin')->getSelectcat(),
|
15 |
+
));
|
16 |
+
|
17 |
$fieldset->addField('title', 'text', array(
|
18 |
'label' => Mage::helper('navadmin')->__('Label'),
|
19 |
'class' => 'required-entry',
|
44 |
),
|
45 |
));
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
$fieldset->addField('position', 'text', array(
|
48 |
'label' => Mage::helper('navadmin')->__('Position'),
|
49 |
'required' => false,
|
app/code/community/Mage/Navadmin/Helper/Data.php
CHANGED
@@ -2,56 +2,64 @@
|
|
2 |
|
3 |
class Mage_Navadmin_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
{
|
|
|
|
|
|
|
5 |
public function getSelectcat(){
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
return $out;
|
11 |
}
|
12 |
|
13 |
-
public function drawSelect($
|
14 |
-
$out = array();
|
15 |
-
if(!empty($outini)){
|
16 |
-
$out = $outini;
|
17 |
-
}
|
18 |
-
|
19 |
$spacer = '';
|
20 |
for ($i = 0; $i <= $sep; $i++){
|
21 |
$spacer.= ' ';
|
22 |
}
|
23 |
-
|
24 |
-
$items = $this->getChildrens($pid);
|
25 |
if(count($items) > 0 ){
|
26 |
foreach ($items as $item){
|
27 |
-
$
|
28 |
-
$
|
29 |
-
$
|
30 |
-
$child = $this->getChildrens($item['navadmin_id']);
|
31 |
if(!empty($child)){
|
32 |
-
$
|
33 |
}
|
34 |
}
|
35 |
}
|
36 |
-
return
|
37 |
}
|
38 |
|
39 |
-
public function getChildrens($pid=0){
|
40 |
$out = array();
|
41 |
$collection = Mage::getModel('navadmin/navadmin')->getCollection()
|
42 |
->addFieldToFilter('pid', array('in'=>$pid) )
|
|
|
43 |
->addFieldToFilter('status', array('in'=>'1') )
|
44 |
->setOrder('position', 'asc');
|
45 |
-
|
46 |
foreach ($collection as $item){
|
47 |
$out[] = $item->getData();
|
48 |
}
|
49 |
return $out;
|
50 |
}
|
51 |
|
52 |
-
public function hasChildrens($pid=0){
|
53 |
$collection = Mage::getModel('navadmin/navadmin')->getCollection()
|
54 |
->addFieldToFilter('pid', array('in'=>$pid) )
|
|
|
55 |
->addFieldToFilter('status', array('in'=>'1') )
|
56 |
->setOrder('position', 'asc')
|
57 |
->load();
|
@@ -62,10 +70,10 @@ class Mage_Navadmin_Helper_Data extends Mage_Core_Helper_Abstract
|
|
62 |
}
|
63 |
|
64 |
|
65 |
-
public function drawItem($pid=0, $level=0)
|
66 |
{
|
67 |
$html = '';
|
68 |
-
$items = $this->getChildrens($pid);
|
69 |
if (!empty($childrens)) {
|
70 |
return $html;
|
71 |
}
|
@@ -73,7 +81,7 @@ class Mage_Navadmin_Helper_Data extends Mage_Core_Helper_Abstract
|
|
73 |
$totreg = count($items);
|
74 |
foreach ($items as $k => $item){
|
75 |
$html.= '<li';
|
76 |
-
$hasChildrens = $this->hasChildrens($item['navadmin_id']);
|
77 |
if ($hasChildrens) {
|
78 |
$html.= ' onmouseover="toggleMenu(this,1)" onmouseout="toggleMenu(this,0)"';
|
79 |
}
|
@@ -99,7 +107,7 @@ class Mage_Navadmin_Helper_Data extends Mage_Core_Helper_Abstract
|
|
99 |
|
100 |
if ($hasChildrens){
|
101 |
$htmlChildren = '';
|
102 |
-
$htmlChildren.= $this->drawItem($item['navadmin_id'], $level+1);
|
103 |
if (!empty($htmlChildren)) {
|
104 |
$html.= '<ul class="level' . $level . '">'."\n"
|
105 |
.$htmlChildren
|
@@ -111,4 +119,29 @@ class Mage_Navadmin_Helper_Data extends Mage_Core_Helper_Abstract
|
|
111 |
}
|
112 |
return $html;
|
113 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
}
|
2 |
|
3 |
class Mage_Navadmin_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
{
|
5 |
+
|
6 |
+
private $outtree = array();
|
7 |
+
|
8 |
public function getSelectcat(){
|
9 |
+
$stores = $this->dataStores();
|
10 |
+
if($stores->count() > 0){
|
11 |
+
foreach ($stores as $store){
|
12 |
+
if($store->store_id != 0){
|
13 |
+
$this->outtree['value'][] = $store->store_id . '-0';
|
14 |
+
$this->outtree['label'][] = 'Root - ' . $store->name;
|
15 |
+
$this->drawSelect($store->store_id, 0);
|
16 |
+
}
|
17 |
+
}
|
18 |
+
|
19 |
+
}
|
20 |
+
|
21 |
+
foreach ($this->outtree['value'] as $k => $v){
|
22 |
+
$out[] = array('value'=>$v, 'label'=>$this->outtree['label'][$k]);
|
23 |
+
}
|
24 |
return $out;
|
25 |
}
|
26 |
|
27 |
+
public function drawSelect($store_id=1, $pid=0, $sep=1){
|
|
|
|
|
|
|
|
|
|
|
28 |
$spacer = '';
|
29 |
for ($i = 0; $i <= $sep; $i++){
|
30 |
$spacer.= ' ';
|
31 |
}
|
32 |
+
$items = $this->getChildrens($store_id, $pid);
|
|
|
33 |
if(count($items) > 0 ){
|
34 |
foreach ($items as $item){
|
35 |
+
$this->outtree['value'][] = $store_id . '-' . $item['navadmin_id'];
|
36 |
+
$this->outtree['label'][] = $spacer . $item['title'];
|
37 |
+
$child = $this->getChildrens($store_id, $item['navadmin_id']);
|
|
|
38 |
if(!empty($child)){
|
39 |
+
$this->drawSelect($store_id, $item['navadmin_id'], $sep + 1);
|
40 |
}
|
41 |
}
|
42 |
}
|
43 |
+
return;
|
44 |
}
|
45 |
|
46 |
+
public function getChildrens($store_id=1, $pid=0){
|
47 |
$out = array();
|
48 |
$collection = Mage::getModel('navadmin/navadmin')->getCollection()
|
49 |
->addFieldToFilter('pid', array('in'=>$pid) )
|
50 |
+
->addFieldToFilter('store_id', array('in'=>$store_id) )
|
51 |
->addFieldToFilter('status', array('in'=>'1') )
|
52 |
->setOrder('position', 'asc');
|
|
|
53 |
foreach ($collection as $item){
|
54 |
$out[] = $item->getData();
|
55 |
}
|
56 |
return $out;
|
57 |
}
|
58 |
|
59 |
+
public function hasChildrens($store_id=1,$pid=0){
|
60 |
$collection = Mage::getModel('navadmin/navadmin')->getCollection()
|
61 |
->addFieldToFilter('pid', array('in'=>$pid) )
|
62 |
+
->addFieldToFilter('store_id', array('in'=>$store_id) )
|
63 |
->addFieldToFilter('status', array('in'=>'1') )
|
64 |
->setOrder('position', 'asc')
|
65 |
->load();
|
70 |
}
|
71 |
|
72 |
|
73 |
+
public function drawItem($store_id=1, $pid=0, $level=0)
|
74 |
{
|
75 |
$html = '';
|
76 |
+
$items = $this->getChildrens($store_id, $pid);
|
77 |
if (!empty($childrens)) {
|
78 |
return $html;
|
79 |
}
|
81 |
$totreg = count($items);
|
82 |
foreach ($items as $k => $item){
|
83 |
$html.= '<li';
|
84 |
+
$hasChildrens = $this->hasChildrens($store_id, $item['navadmin_id']);
|
85 |
if ($hasChildrens) {
|
86 |
$html.= ' onmouseover="toggleMenu(this,1)" onmouseout="toggleMenu(this,0)"';
|
87 |
}
|
107 |
|
108 |
if ($hasChildrens){
|
109 |
$htmlChildren = '';
|
110 |
+
$htmlChildren.= $this->drawItem($store_id,$item['navadmin_id'], $level+1);
|
111 |
if (!empty($htmlChildren)) {
|
112 |
$html.= '<ul class="level' . $level . '">'."\n"
|
113 |
.$htmlChildren
|
119 |
}
|
120 |
return $html;
|
121 |
}
|
122 |
+
|
123 |
+
public function getStores(){
|
124 |
+
$out = array();
|
125 |
+
$stores = $this->dataStores();
|
126 |
+
if($stores->count() > 0){
|
127 |
+
$i = 0;
|
128 |
+
foreach ($stores as $store){
|
129 |
+
if($store->store_id != 0){
|
130 |
+
$out[$i]['value'] = $store->store_id;
|
131 |
+
$out[$i]['label'] = $store->name;
|
132 |
+
$i++;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
return $out;
|
137 |
+
}
|
138 |
+
|
139 |
+
public function dataStores(){
|
140 |
+
$stores = Mage::getModel('core/store')
|
141 |
+
->getResourceCollection()
|
142 |
+
->addFieldToFilter('is_active', array('in'=>'1') )
|
143 |
+
->setLoadDefault(true)
|
144 |
+
->load();
|
145 |
+
return $stores;
|
146 |
+
}
|
147 |
}
|
app/code/community/Mage/Navadmin/controllers/Adminhtml/NavadminController.php
CHANGED
@@ -7,10 +7,10 @@ class Mage_Navadmin_Adminhtml_NavadminController extends Mage_Adminhtml_Controll
|
|
7 |
$this->loadLayout()
|
8 |
->_setActiveMenu('navadmin/items')
|
9 |
->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
10 |
-
|
11 |
return $this;
|
12 |
-
}
|
13 |
-
|
14 |
public function indexAction() {
|
15 |
$this->_initAction()
|
16 |
->renderLayout();
|
@@ -19,7 +19,11 @@ class Mage_Navadmin_Adminhtml_NavadminController extends Mage_Adminhtml_Controll
|
|
19 |
public function editAction() {
|
20 |
$id = $this->getRequest()->getParam('id');
|
21 |
$model = Mage::getModel('navadmin/navadmin')->load($id);
|
22 |
-
|
|
|
|
|
|
|
|
|
23 |
if ($model->getId() || $id == 0) {
|
24 |
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
25 |
if (!empty($data)) {
|
@@ -45,54 +49,29 @@ class Mage_Navadmin_Adminhtml_NavadminController extends Mage_Adminhtml_Controll
|
|
45 |
$this->_redirect('*/*/');
|
46 |
}
|
47 |
}
|
48 |
-
|
49 |
public function newAction() {
|
50 |
$this->_forward('edit');
|
51 |
}
|
52 |
-
|
53 |
public function saveAction() {
|
54 |
if ($data = $this->getRequest()->getPost()) {
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
// Any extention would work
|
62 |
-
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
|
63 |
-
$uploader->setAllowRenameFiles(false);
|
64 |
-
|
65 |
-
// Set the file upload mode
|
66 |
-
// false -> get the file directly in the specified folder
|
67 |
-
// true -> get the file in the product like folders
|
68 |
-
// (file.jpg will go in something like /media/f/i/file.jpg)
|
69 |
-
$uploader->setFilesDispersion(false);
|
70 |
-
|
71 |
-
// We set media as the upload dir
|
72 |
-
$path = Mage::getBaseDir('media') . DS ;
|
73 |
-
$uploader->save($path, $_FILES['filename']['name'] );
|
74 |
-
|
75 |
-
} catch (Exception $e) {
|
76 |
-
|
77 |
-
}
|
78 |
-
|
79 |
-
//this way the name is saved in DB
|
80 |
-
$data['filename'] = $_FILES['filename']['name'];
|
81 |
-
}
|
82 |
-
|
83 |
-
|
84 |
-
$model = Mage::getModel('navadmin/navadmin');
|
85 |
$model->setData($data)
|
86 |
->setId($this->getRequest()->getParam('id'));
|
87 |
-
|
88 |
try {
|
89 |
if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
|
90 |
$model->setCreatedTime(now())
|
91 |
->setUpdateTime(now());
|
92 |
} else {
|
93 |
$model->setUpdateTime(now());
|
94 |
-
}
|
95 |
-
|
96 |
$model->save();
|
97 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('navadmin')->__('Item was successfully saved'));
|
98 |
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
@@ -113,15 +92,15 @@ class Mage_Navadmin_Adminhtml_NavadminController extends Mage_Adminhtml_Controll
|
|
113 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('navadmin')->__('Unable to find item to save'));
|
114 |
$this->_redirect('*/*/');
|
115 |
}
|
116 |
-
|
117 |
public function deleteAction() {
|
118 |
if( $this->getRequest()->getParam('id') > 0 ) {
|
119 |
try {
|
120 |
$model = Mage::getModel('navadmin/navadmin');
|
121 |
-
|
122 |
$model->setId($this->getRequest()->getParam('id'))
|
123 |
->delete();
|
124 |
-
|
125 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
126 |
$this->_redirect('*/*/');
|
127 |
} catch (Exception $e) {
|
@@ -153,7 +132,7 @@ class Mage_Navadmin_Adminhtml_NavadminController extends Mage_Adminhtml_Controll
|
|
153 |
}
|
154 |
$this->_redirect('*/*/index');
|
155 |
}
|
156 |
-
|
157 |
public function massStatusAction()
|
158 |
{
|
159 |
$navadminIds = $this->getRequest()->getParam('navadmin');
|
@@ -177,7 +156,7 @@ class Mage_Navadmin_Adminhtml_NavadminController extends Mage_Adminhtml_Controll
|
|
177 |
}
|
178 |
$this->_redirect('*/*/index');
|
179 |
}
|
180 |
-
|
181 |
public function exportCsvAction()
|
182 |
{
|
183 |
$fileName = 'navadmin.csv';
|
7 |
$this->loadLayout()
|
8 |
->_setActiveMenu('navadmin/items')
|
9 |
->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
10 |
+
|
11 |
return $this;
|
12 |
+
}
|
13 |
+
|
14 |
public function indexAction() {
|
15 |
$this->_initAction()
|
16 |
->renderLayout();
|
19 |
public function editAction() {
|
20 |
$id = $this->getRequest()->getParam('id');
|
21 |
$model = Mage::getModel('navadmin/navadmin')->load($id);
|
22 |
+
$aux = $model->getData();
|
23 |
+
if(!empty($aux)){
|
24 |
+
$aux['pid'] = $aux['store_id'] . '-' . $aux['pid'];
|
25 |
+
$model->setData($aux);
|
26 |
+
}
|
27 |
if ($model->getId() || $id == 0) {
|
28 |
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
29 |
if (!empty($data)) {
|
49 |
$this->_redirect('*/*/');
|
50 |
}
|
51 |
}
|
52 |
+
|
53 |
public function newAction() {
|
54 |
$this->_forward('edit');
|
55 |
}
|
56 |
+
|
57 |
public function saveAction() {
|
58 |
if ($data = $this->getRequest()->getPost()) {
|
59 |
+
|
60 |
+
$model = Mage::getModel('navadmin/navadmin');
|
61 |
+
$aux = explode("-", $data['pid']);
|
62 |
+
$data['store_id'] = $aux[0];
|
63 |
+
$data['pid'] = $aux[1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
$model->setData($data)
|
65 |
->setId($this->getRequest()->getParam('id'));
|
66 |
+
|
67 |
try {
|
68 |
if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
|
69 |
$model->setCreatedTime(now())
|
70 |
->setUpdateTime(now());
|
71 |
} else {
|
72 |
$model->setUpdateTime(now());
|
73 |
+
}
|
74 |
+
|
75 |
$model->save();
|
76 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('navadmin')->__('Item was successfully saved'));
|
77 |
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
92 |
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('navadmin')->__('Unable to find item to save'));
|
93 |
$this->_redirect('*/*/');
|
94 |
}
|
95 |
+
|
96 |
public function deleteAction() {
|
97 |
if( $this->getRequest()->getParam('id') > 0 ) {
|
98 |
try {
|
99 |
$model = Mage::getModel('navadmin/navadmin');
|
100 |
+
|
101 |
$model->setId($this->getRequest()->getParam('id'))
|
102 |
->delete();
|
103 |
+
|
104 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
105 |
$this->_redirect('*/*/');
|
106 |
} catch (Exception $e) {
|
132 |
}
|
133 |
$this->_redirect('*/*/index');
|
134 |
}
|
135 |
+
|
136 |
public function massStatusAction()
|
137 |
{
|
138 |
$navadminIds = $this->getRequest()->getParam('navadmin');
|
156 |
}
|
157 |
$this->_redirect('*/*/index');
|
158 |
}
|
159 |
+
|
160 |
public function exportCsvAction()
|
161 |
{
|
162 |
$fileName = 'navadmin.csv';
|
app/code/community/Mage/Navadmin/controllers/IndexController.php
CHANGED
@@ -3,45 +3,7 @@ class Mage_Navadmin_IndexController extends Mage_Core_Controller_Front_Action
|
|
3 |
{
|
4 |
public function indexAction()
|
5 |
{
|
6 |
-
|
7 |
-
/*
|
8 |
-
* Load an object by id
|
9 |
-
* Request looking like:
|
10 |
-
* http://site.com/navadmin?id=15
|
11 |
-
* or
|
12 |
-
* http://site.com/navadmin/id/15
|
13 |
-
*/
|
14 |
-
/*
|
15 |
-
$navadmin_id = $this->getRequest()->getParam('id');
|
16 |
-
|
17 |
-
if($navadmin_id != null && $navadmin_id != '') {
|
18 |
-
$navadmin = Mage::getModel('navadmin/navadmin')->load($navadmin_id)->getData();
|
19 |
-
} else {
|
20 |
-
$navadmin = null;
|
21 |
-
}
|
22 |
-
*/
|
23 |
-
|
24 |
-
/*
|
25 |
-
* If no param we load a the last created item
|
26 |
-
*/
|
27 |
-
/*
|
28 |
-
if($navadmin == null) {
|
29 |
-
$resource = Mage::getSingleton('core/resource');
|
30 |
-
$read= $resource->getConnection('core_read');
|
31 |
-
$navadminTable = $resource->getTableName('navadmin');
|
32 |
-
|
33 |
-
$select = $read->select()
|
34 |
-
->from($navadminTable,array('navadmin_id','title','content','status'))
|
35 |
-
->where('status',1)
|
36 |
-
->order('created_time DESC') ;
|
37 |
-
|
38 |
-
$navadmin = $read->fetchRow($select);
|
39 |
-
}
|
40 |
-
Mage::register('navadmin', $navadmin);
|
41 |
-
*/
|
42 |
-
|
43 |
-
|
44 |
-
$this->loadLayout();
|
45 |
$this->renderLayout();
|
46 |
}
|
47 |
}
|
3 |
{
|
4 |
public function indexAction()
|
5 |
{
|
6 |
+
$this->loadLayout();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
$this->renderLayout();
|
8 |
}
|
9 |
}
|
app/code/community/Mage/Navadmin/sql/navadmin_setup/mysql4-install-0.1.0.php
CHANGED
@@ -10,6 +10,7 @@ $installer->run("
|
|
10 |
CREATE TABLE {$this->getTable('navadmin')} (
|
11 |
`navadmin_id` int(11) unsigned NOT NULL auto_increment,
|
12 |
`pid` int(11),
|
|
|
13 |
`title` varchar(255) NOT NULL default '',
|
14 |
`link` varchar(255) NOT NULL default '',
|
15 |
`target` varchar(255) NOT NULL default '',
|
10 |
CREATE TABLE {$this->getTable('navadmin')} (
|
11 |
`navadmin_id` int(11) unsigned NOT NULL auto_increment,
|
12 |
`pid` int(11),
|
13 |
+
`store_id` int(11),
|
14 |
`title` varchar(255) NOT NULL default '',
|
15 |
`link` varchar(255) NOT NULL default '',
|
16 |
`target` varchar(255) NOT NULL default '',
|
app/design/frontend/default/default/layout/navadmin.xml
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
</default>
|
5 |
<navadmin_index_index>
|
6 |
<reference name="content">
|
7 |
-
<block type="navadmin/navadmin" name="navadmin" template="navadmin/
|
8 |
</reference>
|
9 |
</navadmin_index_index>
|
10 |
-
</layout>
|
4 |
</default>
|
5 |
<navadmin_index_index>
|
6 |
<reference name="content">
|
7 |
+
<block type="navadmin/navadmin" name="navadmin" template="navadmin/top.phtml" />
|
8 |
</reference>
|
9 |
</navadmin_index_index>
|
10 |
+
</layout>
|
app/design/frontend/default/default/template/navadmin/top.phtml
CHANGED
@@ -1 +1,4 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$aux = Mage::app()->getStore(true)->getId();
|
3 |
+
echo $this->helper('navadmin/data')->drawItem($aux);
|
4 |
+
?>
|
package.xml
CHANGED
@@ -1,20 +1,23 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mage_Navadmin</name>
|
4 |
-
<version>1.0
|
5 |
<stability>stable</stability>
|
6 |
-
<license uri="http://www.opensource.org/licenses/
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>Navigation
|
10 |
-
<description>Navigation
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
<authors><author><name>Oliver</name><user>auto-converted</user><email>olivertar@gmail.com</email></author></authors>
|
15 |
-
<date>2008-11-
|
16 |
-
<time>
|
17 |
-
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="navadmin.xml" hash="e0f3cf59fd355d679cbdfe2eaa4cf20a"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="navadmin.xml" hash="
|
18 |
<compatible/>
|
19 |
<dependencies/>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mage_Navadmin</name>
|
4 |
+
<version>1.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license uri="http://www.opensource.org/licenses/lgpl-2.1.php">GNU Lesser General Public License (LGPL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Simple Navigation bar administrator</summary>
|
10 |
+
<description>Simple Navigation bar administrator
|
11 |
+
Multiples store
|
12 |
+
Multiples levels
|
13 |
+
Sort menu items
|
14 |
+
Set target
|
15 |
+
Enable/Disable items</description>
|
16 |
+
<notes>This release include multistore feature</notes>
|
17 |
<authors><author><name>Oliver</name><user>auto-converted</user><email>olivertar@gmail.com</email></author></authors>
|
18 |
+
<date>2008-11-22</date>
|
19 |
+
<time>15:32:00</time>
|
20 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="navadmin.xml" hash="e0f3cf59fd355d679cbdfe2eaa4cf20a"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="navadmin.xml" hash="79cbb3f72762ebc8436b1089a4ef6fde"/></dir><dir name="template"><dir name="navadmin"><file name="top.phtml" hash="a935ff2e8bbc13cd6fddc47a9156a3ac"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Mage"><dir name="Navadmin"><dir name="Block"><dir name="Adminhtml"><dir name="Navadmin"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="59f81a48aa738b0226542b275669d2f9"/></dir><file name="Form.php" hash="75a0c4d1d6978c6ea4227df318de6684"/><file name="Tabs.php" hash="1709f08951d71dbe5b9799623e63dc21"/></dir><file name="Edit.php" hash="c8ae5fb904e3581e190287bf533886a1"/><file name="Grid.php" hash="6dfe0821839995966531d466be07afd8"/></dir><file name="Navadmin.php" hash="370bac5766ceb3c11fd20292f4137fda"/></dir><file name="Navadmin.php" hash="1c0064780467a1c006b046c2a18c4036"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="NavadminController.php" hash="c66b2adcfcea47d21abc3af1f9acd84d"/></dir><file name="IndexController.php" hash="9d3482797882f5dc4c5d2308f55e10e3"/></dir><dir name="etc"><file name="config.xml" hash="8d6b202e30fed22abc066bbb80fff127"/></dir><dir name="Helper"><file name="Data.php" hash="b3a1c440348cff34908427adac5a9da5"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Navadmin"><file name="Collection.php" hash="9635425cc867d26b9c1cbb9625714a16"/></dir><file name="Navadmin.php" hash="ffb1441070adc6198d22fc5d6c39eabb"/></dir><file name="Navadmin.php" hash="bdf57884f6b450414032ac8ac061f5dd"/><file name="Status.php" hash="d829853984dd1297d90d736299405d56"/><file name="Tree.php" hash="ab98e484af6b9fad35055fb74b50ef20"/></dir><dir name="sql"><dir name="navadmin_setup"><file name="mysql4-install-0.1.0.php" hash="c89a55173d536660d3947cd2da573ef6"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_Navadmin.xml" hash="c42b6689f88bfedb3c765690ca39d621"/></dir></target></contents>
|
21 |
<compatible/>
|
22 |
<dependencies/>
|
23 |
</package>
|