Version Notes
Magento compatibility
Improved features
Download this release
Release Info
Developer | Sanjeev Jha |
Extension | SKJ_Meetmyteam |
Version | 0.1.4 |
Comparing to | |
See all releases |
Code changes from version 0.1.3 to 0.1.4
- app/code/local/SKJ/Meetmyteam/Block/Adminhtml/Meetmyteam/Edit/Tab/Form.php +71 -20
- app/code/local/SKJ/Meetmyteam/Block/Adminhtml/Meetmyteam/Grid.php +43 -14
- app/code/local/SKJ/Meetmyteam/Block/Adminhtml/Renderer/Category.php +28 -0
- app/code/local/SKJ/Meetmyteam/Block/Category.php +38 -1
- app/code/local/SKJ/Meetmyteam/Block/Meetmyteam.php +31 -1
- app/code/local/SKJ/Meetmyteam/controllers/Adminhtml/CategoryController.php +6 -0
- app/code/local/SKJ/Meetmyteam/controllers/Adminhtml/MeetmyteamController.php +14 -0
- app/code/local/SKJ/Meetmyteam/etc/config.xml +31 -5
- app/code/local/SKJ/Meetmyteam/etc/system.xml +39 -0
- app/code/local/SKJ/Meetmyteam/sql/meetmyteam_setup/mysql4-install-0.1.0.php~ +0 -25
- app/code/local/SKJ/Meetmyteam/sql/meetmyteam_setup/mysql4-upgrade-0.1.0-0.1.1.php~ +0 -23
- app/code/local/SKJ/Meetmyteam/sql/meetmyteam_setup/mysql4-upgrade-0.1.1-0.1.2.php +11 -0
- app/code/local/SKJ/Meetmyteam/sql/meetmyteam_setup/mysql4-upgrade-0.1.2-0.1.3.php +18 -0
- app/design/adminhtml/default/default/layout/meetmyteam.xml +24 -2
- app/design/frontend/base/default/template/meetmyteam/category.phtml +25 -8
- app/design/frontend/base/default/template/meetmyteam/category_box.phtml +22 -0
- app/design/frontend/base/default/template/meetmyteam/detail.phtml +29 -4
- app/design/frontend/base/default/template/meetmyteam/meetmyteam.phtml +21 -3
- package.xml +13 -7
app/code/local/SKJ/Meetmyteam/Block/Adminhtml/Meetmyteam/Edit/Tab/Form.php
CHANGED
@@ -11,16 +11,17 @@ class SKJ_Meetmyteam_Block_Adminhtml_Meetmyteam_Edit_Tab_Form extends Mage_Admin
|
|
11 |
*
|
12 |
* @return Mage_Core_Block_Abstract
|
13 |
*/
|
14 |
-
|
15 |
-
|
16 |
protected function _prepareLayout()
|
17 |
{
|
18 |
parent::_prepareLayout();
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
}
|
23 |
-
|
|
|
24 |
|
25 |
protected function _prepareForm()
|
26 |
{
|
@@ -29,23 +30,50 @@ class SKJ_Meetmyteam_Block_Adminhtml_Meetmyteam_Edit_Tab_Form extends Mage_Admin
|
|
29 |
$fieldset = $form->addFieldset('meetmyteam_form', array('legend'=>Mage::helper('meetmyteam')->__('Item information')));
|
30 |
|
31 |
// Get category collection
|
32 |
-
|
33 |
|
34 |
$categoryCollection = Mage::getModel('meetmyteam/category')->getCollection()
|
35 |
->addFieldToFilter('status' , '1');
|
36 |
;
|
37 |
|
|
|
|
|
38 |
foreach($categoryCollection as $category){
|
39 |
$optioncat[$category->getID()] = $category->getTitle();
|
40 |
}
|
41 |
|
42 |
$fieldset->addField('category', 'select', array(
|
43 |
-
'label' => Mage::helper('meetmyteam')->__('
|
44 |
'name' => 'category',
|
45 |
'values' => $optioncat,
|
46 |
'required' => true,
|
47 |
));
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
$fieldset->addField('title', 'text', array(
|
50 |
'label' => Mage::helper('meetmyteam')->__('Name'),
|
51 |
'class' => 'required-entry',
|
@@ -84,6 +112,14 @@ class SKJ_Meetmyteam_Block_Adminhtml_Meetmyteam_Edit_Tab_Form extends Mage_Admin
|
|
84 |
),
|
85 |
));
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
$fieldset->addField('content', 'editor', array(
|
89 |
'name' => 'content',
|
@@ -93,18 +129,33 @@ class SKJ_Meetmyteam_Block_Adminhtml_Meetmyteam_Edit_Tab_Form extends Mage_Admin
|
|
93 |
'wysiwyg' => false,
|
94 |
'required' => true,
|
95 |
));
|
96 |
-
|
97 |
-
/*
|
98 |
-
$fieldset->addField('content', 'editor', array(
|
99 |
-
'name' => 'content',
|
100 |
-
'label' => Mage::helper('meetmyteam')->__('content'),
|
101 |
-
'title' => Mage::helper('meetmyteam')->__('content'),
|
102 |
-
'style' => 'width:100%;height:300px;',
|
103 |
-
'required' => true,
|
104 |
-
'config' => Mage::getSingleton('meetmyteam/wysiwyg_config')->getConfig()
|
105 |
-
));
|
106 |
*/
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
if ( Mage::getSingleton('adminhtml/session')->getMeetmyteamData() )
|
109 |
{
|
110 |
$form->setValues(Mage::getSingleton('adminhtml/session')->getMeetmyteamData());
|
11 |
*
|
12 |
* @return Mage_Core_Block_Abstract
|
13 |
*/
|
14 |
+
|
15 |
+
/* */
|
16 |
protected function _prepareLayout()
|
17 |
{
|
18 |
parent::_prepareLayout();
|
19 |
+
|
20 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
21 |
+
|
22 |
}
|
23 |
+
/**/
|
24 |
+
|
25 |
|
26 |
protected function _prepareForm()
|
27 |
{
|
30 |
$fieldset = $form->addFieldset('meetmyteam_form', array('legend'=>Mage::helper('meetmyteam')->__('Item information')));
|
31 |
|
32 |
// Get category collection
|
33 |
+
|
34 |
|
35 |
$categoryCollection = Mage::getModel('meetmyteam/category')->getCollection()
|
36 |
->addFieldToFilter('status' , '1');
|
37 |
;
|
38 |
|
39 |
+
/*
|
40 |
+
$optioncat[''] = 'Select category';
|
41 |
foreach($categoryCollection as $category){
|
42 |
$optioncat[$category->getID()] = $category->getTitle();
|
43 |
}
|
44 |
|
45 |
$fieldset->addField('category', 'select', array(
|
46 |
+
'label' => Mage::helper('meetmyteam')->__('Category'),
|
47 |
'name' => 'category',
|
48 |
'values' => $optioncat,
|
49 |
'required' => true,
|
50 |
));
|
51 |
+
*/
|
52 |
+
|
53 |
+
|
54 |
+
// $optioncat[-1] = array('label'=>'Select Category','value'=>-1);
|
55 |
+
/**/
|
56 |
+
|
57 |
+
foreach($categoryCollection as $category){
|
58 |
+
$optioncat[$category->getID()] = array('label'=>$category->getTitle(),'value'=>$category->getID());
|
59 |
+
}
|
60 |
+
|
61 |
+
|
62 |
+
$fieldset->addField('category', 'multiselect', array(
|
63 |
+
'label' => Mage::helper('meetmyteam')->__('Select Category'),
|
64 |
+
'class' => 'required-entry',
|
65 |
+
'required' => true,
|
66 |
+
'name' => 'category[]',
|
67 |
+
'onclick' => "return false;",
|
68 |
+
'onchange' => "return false;",
|
69 |
+
'value' => '4',
|
70 |
+
'values' => $optioncat,
|
71 |
+
'disabled' => false,
|
72 |
+
'readonly' => false,
|
73 |
+
'tabindex' => 1
|
74 |
+
));
|
75 |
+
/* */
|
76 |
+
|
77 |
$fieldset->addField('title', 'text', array(
|
78 |
'label' => Mage::helper('meetmyteam')->__('Name'),
|
79 |
'class' => 'required-entry',
|
112 |
),
|
113 |
));
|
114 |
|
115 |
+
$fieldset->addField('position', 'text', array(
|
116 |
+
'label' => Mage::helper('meetmyteam')->__('Position'),
|
117 |
+
'class' => 'required-entry',
|
118 |
+
'required' => true,
|
119 |
+
'name' => 'position',
|
120 |
+
));
|
121 |
+
|
122 |
+
/*
|
123 |
|
124 |
$fieldset->addField('content', 'editor', array(
|
125 |
'name' => 'content',
|
129 |
'wysiwyg' => false,
|
130 |
'required' => true,
|
131 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
*/
|
133 |
+
|
134 |
+
/**/
|
135 |
+
$wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig();
|
136 |
+
|
137 |
+
$wysiwygConfig->addData(array(
|
138 |
+
'add_variables' => false,
|
139 |
+
'plugins' => array(),
|
140 |
+
'widget_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/widget/index'),
|
141 |
+
'directives_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive'),
|
142 |
+
'directives_url_quoted' => preg_quote(Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive')),
|
143 |
+
'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
|
144 |
+
));
|
145 |
+
|
146 |
+
$fieldset->addField('contents', 'editor', array(
|
147 |
+
'name' => 'contents',
|
148 |
+
'label' => $this->__('Content'),
|
149 |
+
'title' => $this->__('Content'),
|
150 |
+
'style' => 'width:700px; height:300px;',
|
151 |
+
'config' => $wysiwygConfig,
|
152 |
+
'required' => true,
|
153 |
+
'wysiwyg' => true
|
154 |
+
));
|
155 |
+
|
156 |
+
/* */
|
157 |
+
|
158 |
+
|
159 |
if ( Mage::getSingleton('adminhtml/session')->getMeetmyteamData() )
|
160 |
{
|
161 |
$form->setValues(Mage::getSingleton('adminhtml/session')->getMeetmyteamData());
|
app/code/local/SKJ/Meetmyteam/Block/Adminhtml/Meetmyteam/Grid.php
CHANGED
@@ -14,23 +14,13 @@ class SKJ_Meetmyteam_Block_Adminhtml_Meetmyteam_Grid extends Mage_Adminhtml_Bloc
|
|
14 |
protected function _prepareCollection()
|
15 |
{
|
16 |
$collection = Mage::getModel('meetmyteam/meetmyteam')->getCollection();
|
17 |
-
$this->setCollection($collection);
|
18 |
return parent::_prepareCollection();
|
19 |
}
|
20 |
|
21 |
protected function _prepareColumns()
|
22 |
{
|
23 |
-
|
24 |
-
$catCollection = Mage::getModel('meetmyteam/category')->getCollection();
|
25 |
-
$catCollection->addFieldToFilter('status',Array('eq'=>1));
|
26 |
-
|
27 |
-
$categoryOption = '';
|
28 |
-
|
29 |
-
foreach($catCollection as $cat)
|
30 |
-
{
|
31 |
-
$key = $cat['meetmyteam_cat_id'];
|
32 |
-
$categoryOption[$key] = $cat->getTitle();
|
33 |
-
}
|
34 |
|
35 |
$this->addColumn('meetmyteam_id', array(
|
36 |
'header' => Mage::helper('meetmyteam')->__('ID'),
|
@@ -58,6 +48,12 @@ class SKJ_Meetmyteam_Block_Adminhtml_Meetmyteam_Grid extends Mage_Adminhtml_Bloc
|
|
58 |
'index' => 'meetmyteam_id',
|
59 |
'renderer'=> new SKJ_Meetmyteam_Block_Adminhtml_Renderer_Image(),
|
60 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
|
63 |
$this->addColumn('status', array(
|
@@ -72,14 +68,38 @@ class SKJ_Meetmyteam_Block_Adminhtml_Meetmyteam_Grid extends Mage_Adminhtml_Bloc
|
|
72 |
),
|
73 |
));
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
$this->addColumn('category', array(
|
76 |
-
'header' => Mage::helper('
|
77 |
'width' => '200px',
|
78 |
'index' => 'category',
|
79 |
'type' => 'options',
|
80 |
'options' => $categoryOption,
|
81 |
));
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
$this->addColumn('action',
|
85 |
array(
|
@@ -141,4 +161,13 @@ class SKJ_Meetmyteam_Block_Adminhtml_Meetmyteam_Grid extends Mage_Adminhtml_Bloc
|
|
141 |
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
142 |
}
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
}
|
14 |
protected function _prepareCollection()
|
15 |
{
|
16 |
$collection = Mage::getModel('meetmyteam/meetmyteam')->getCollection();
|
17 |
+
$this->setCollection($collection);
|
18 |
return parent::_prepareCollection();
|
19 |
}
|
20 |
|
21 |
protected function _prepareColumns()
|
22 |
{
|
23 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
$this->addColumn('meetmyteam_id', array(
|
26 |
'header' => Mage::helper('meetmyteam')->__('ID'),
|
48 |
'index' => 'meetmyteam_id',
|
49 |
'renderer'=> new SKJ_Meetmyteam_Block_Adminhtml_Renderer_Image(),
|
50 |
));
|
51 |
+
|
52 |
+
$this->addColumn('position', array(
|
53 |
+
'header' => Mage::helper('meetmyteam')->__('Position'),
|
54 |
+
'align' =>'left',
|
55 |
+
'index' => 'position',
|
56 |
+
));
|
57 |
|
58 |
|
59 |
$this->addColumn('status', array(
|
68 |
),
|
69 |
));
|
70 |
|
71 |
+
$catCollection = Mage::getModel('meetmyteam/category')->getCollection();
|
72 |
+
$catCollection->addFieldToFilter('status',Array('eq'=>1));
|
73 |
+
|
74 |
+
$categoryOption = '';
|
75 |
+
foreach($catCollection as $cat)
|
76 |
+
{
|
77 |
+
$key = $cat['meetmyteam_cat_id'];
|
78 |
+
$categoryOption[$key] = $cat->getTitle();
|
79 |
+
}
|
80 |
+
|
81 |
+
/*
|
82 |
$this->addColumn('category', array(
|
83 |
+
'header' => Mage::helper('catalog')->__('Category'),
|
84 |
'width' => '200px',
|
85 |
'index' => 'category',
|
86 |
'type' => 'options',
|
87 |
'options' => $categoryOption,
|
88 |
));
|
89 |
+
*/
|
90 |
+
|
91 |
+
|
92 |
+
$this->addColumn('category', array(
|
93 |
+
'header' => Mage::helper('catalog')->__('Category'),
|
94 |
+
'width' => '180px',
|
95 |
+
'index' => 'category',
|
96 |
+
'type' => 'options',
|
97 |
+
'options' => $categoryOption,
|
98 |
+
'filter_condition_callback' => array($this, '_filterCategoriesCondition'),
|
99 |
+
'renderer'=> new SKJ_Meetmyteam_Block_Adminhtml_Renderer_Category(),
|
100 |
+
));
|
101 |
+
|
102 |
+
|
103 |
|
104 |
$this->addColumn('action',
|
105 |
array(
|
161 |
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
162 |
}
|
163 |
|
164 |
+
protected function _filterCategoriesCondition($collection, $column)
|
165 |
+
{
|
166 |
+
if (!$value = $column->getFilter()->getValue()) {
|
167 |
+
return;
|
168 |
+
}
|
169 |
+
|
170 |
+
$this->getCollection()->addFieldToFilter('category', array('finset' => $value));
|
171 |
+
}
|
172 |
+
|
173 |
}
|
app/code/local/SKJ/Meetmyteam/Block/Adminhtml/Renderer/Category.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Render for my team
|
4 |
+
*
|
5 |
+
*
|
6 |
+
* @category SKJ
|
7 |
+
* @package SKJ_Meetmyteam
|
8 |
+
* @author Sanjeev Kumar Jha <jha.sanjeev.in@gmail.com>
|
9 |
+
*/
|
10 |
+
class SKJ_Meetmyteam_Block_Adminhtml_Renderer_Category extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
11 |
+
{
|
12 |
+
|
13 |
+
public function render(Varien_Object $row)
|
14 |
+
{
|
15 |
+
$categoryIds = $row->getCategory();
|
16 |
+
$categoryIdsArray = explode(',', $categoryIds);
|
17 |
+
$str = '<ul>';
|
18 |
+
foreach ($categoryIdsArray as $value) {
|
19 |
+
$categoryData = Mage::getModel('meetmyteam/category')->load($value);
|
20 |
+
$str.='<li>'.$categoryData->getTitle().'</li>';
|
21 |
+
|
22 |
+
}
|
23 |
+
$str.= '</ul>';
|
24 |
+
|
25 |
+
return $str;
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/local/SKJ/Meetmyteam/Block/Category.php
CHANGED
@@ -26,6 +26,43 @@ class SKJ_Meetmyteam_Block_Category extends Mage_Core_Block_Template
|
|
26 |
|
27 |
return $catCollection->getFirstItem();
|
28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
|
31 |
-
}
|
26 |
|
27 |
return $catCollection->getFirstItem();
|
28 |
}
|
29 |
+
|
30 |
+
public function getAllMembers()
|
31 |
+
{
|
32 |
+
|
33 |
+
$collection = Mage::getModel('meetmyteam/meetmyteam')->getCollection();
|
34 |
+
$collection->addFieldToFilter('status',Array('eq'=>1));
|
35 |
+
|
36 |
+
// Search
|
37 |
+
if($_GET['q-team'])
|
38 |
+
{
|
39 |
+
|
40 |
+
if($_GET['q-team']){
|
41 |
+
$collection->addFieldToFilter('title', array(
|
42 |
+
array('like' => '%'.$_GET['q-team'].'%'),
|
43 |
+
));
|
44 |
+
}
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
// To filter category
|
49 |
+
$categoryId = Mage::app()->getRequest()->getParam('id');
|
50 |
+
if($categoryId){
|
51 |
+
//$collection->addFieldToFilter('category',Array('eq'=>$categoryId));
|
52 |
+
$collection->addFieldToFilter('category', ['finset' => $categoryId]);
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
// Sorting by position
|
57 |
+
$collection->getSelect()->order('position', 'ASC');
|
58 |
+
|
59 |
+
// Sorting by name
|
60 |
+
//$collection->getSelect()->order('title', 'ASC');
|
61 |
+
|
62 |
+
//$collection->printlogquery(true);
|
63 |
+
|
64 |
+
return $collection;
|
65 |
+
}
|
66 |
|
67 |
|
68 |
+
}
|
app/code/local/SKJ/Meetmyteam/Block/Meetmyteam.php
CHANGED
@@ -11,11 +11,41 @@ class SKJ_Meetmyteam_Block_Meetmyteam extends Mage_Core_Block_Template
|
|
11 |
|
12 |
public function getAllMembers()
|
13 |
{
|
|
|
|
|
|
|
14 |
$collection = Mage::getModel('meetmyteam/meetmyteam')->getCollection();
|
15 |
$collection->addFieldToFilter('status',Array('eq'=>1));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
return $collection;
|
18 |
}
|
19 |
|
20 |
|
21 |
-
}
|
11 |
|
12 |
public function getAllMembers()
|
13 |
{
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
$collection = Mage::getModel('meetmyteam/meetmyteam')->getCollection();
|
18 |
$collection->addFieldToFilter('status',Array('eq'=>1));
|
19 |
+
|
20 |
+
// Search
|
21 |
+
if($_GET['q-team'])
|
22 |
+
{
|
23 |
+
//Print_r($_GET);exit;
|
24 |
+
//echo $_GET['q-team'];exit;
|
25 |
+
if($_GET['q-team']){
|
26 |
+
$collection->addFieldToFilter('title', array(
|
27 |
+
array('like' => '%'.$_GET['q-team'].'%'), //spaces on each side
|
28 |
+
));
|
29 |
+
}
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
//$collection->printlogquery(true);exit;
|
35 |
+
|
36 |
+
// To filter category
|
37 |
+
$categoryId = $this->getCategoryId();
|
38 |
+
if($categoryId)
|
39 |
+
$collection->addFieldToFilter('category',Array('eq'=>$categoryId));
|
40 |
+
|
41 |
+
// Sorting
|
42 |
+
$collection->getSelect()->order('position', 'ASC');
|
43 |
+
|
44 |
+
// Sorting by name
|
45 |
+
//$collection->getSelect()->order('title', 'ASC');
|
46 |
|
47 |
return $collection;
|
48 |
}
|
49 |
|
50 |
|
51 |
+
}
|
app/code/local/SKJ/Meetmyteam/controllers/Adminhtml/CategoryController.php
CHANGED
@@ -192,4 +192,10 @@ class SKJ_Meetmyteam_Adminhtml_CategoryController extends Mage_Adminhtml_Control
|
|
192 |
$response->sendResponse();
|
193 |
die;
|
194 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
}
|
192 |
$response->sendResponse();
|
193 |
die;
|
194 |
}
|
195 |
+
//Added by quickfix script
|
196 |
+
function _isAllowed()
|
197 |
+
{
|
198 |
+
return true;
|
199 |
+
}
|
200 |
+
|
201 |
}
|
app/code/local/SKJ/Meetmyteam/controllers/Adminhtml/MeetmyteamController.php
CHANGED
@@ -57,6 +57,14 @@ class SKJ_Meetmyteam_Adminhtml_MeetmyteamController extends Mage_Adminhtml_Contr
|
|
57 |
|
58 |
public function saveAction() {
|
59 |
if ($data = $this->getRequest()->getPost()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
if(isset($data['filename']['delete']) && $data['filename']['delete'] != '') {
|
62 |
|
@@ -237,4 +245,10 @@ class SKJ_Meetmyteam_Adminhtml_MeetmyteamController extends Mage_Adminhtml_Contr
|
|
237 |
$response->sendResponse();
|
238 |
die;
|
239 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
}
|
57 |
|
58 |
public function saveAction() {
|
59 |
if ($data = $this->getRequest()->getPost()) {
|
60 |
+
|
61 |
+
// Multiple category
|
62 |
+
$multipleCategory = $this->getRequest()->getParam('category');
|
63 |
+
if (is_array($multipleCategory))
|
64 |
+
{
|
65 |
+
$data['category'] = implode(',',$multipleCategory);
|
66 |
+
}
|
67 |
+
|
68 |
|
69 |
if(isset($data['filename']['delete']) && $data['filename']['delete'] != '') {
|
70 |
|
245 |
$response->sendResponse();
|
246 |
die;
|
247 |
}
|
248 |
+
//Added by quickfix script
|
249 |
+
function _isAllowed()
|
250 |
+
{
|
251 |
+
return true;
|
252 |
+
}
|
253 |
+
|
254 |
}
|
app/code/local/SKJ/Meetmyteam/etc/config.xml
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
<config>
|
12 |
<modules>
|
13 |
<SKJ_Meetmyteam>
|
14 |
-
<version>0.1.
|
15 |
</SKJ_Meetmyteam>
|
16 |
</modules>
|
17 |
<frontend>
|
@@ -46,7 +46,7 @@
|
|
46 |
<adminhtml>
|
47 |
<menu>
|
48 |
<meetmyteam module="meetmyteam">
|
49 |
-
<title>
|
50 |
<sort_order>71</sort_order>
|
51 |
<children>
|
52 |
<items module="meetmyteam">
|
@@ -55,7 +55,7 @@
|
|
55 |
<action>meetmyteam/adminhtml_meetmyteam</action>
|
56 |
</items>
|
57 |
<cat module="meetmyteam">
|
58 |
-
<title>Manage
|
59 |
<sort_order>0</sort_order>
|
60 |
<action>meetmyteam/adminhtml_category</action>
|
61 |
</cat>
|
@@ -67,7 +67,7 @@
|
|
67 |
<admin>
|
68 |
<children>
|
69 |
<meetmyteam module="meetmyteam">
|
70 |
-
<title>
|
71 |
<sort_order>71</sort_order>
|
72 |
<children>
|
73 |
<items module="meetmyteam">
|
@@ -76,7 +76,7 @@
|
|
76 |
<action>meetmyteam/adminhtml_meetmyteam</action>
|
77 |
</items>
|
78 |
<cat module="meetmyteam">
|
79 |
-
<title>Manage
|
80 |
<sort_order>0</sort_order>
|
81 |
<action>meetmyteam/adminhtml_category</action>
|
82 |
</cat>
|
@@ -143,4 +143,30 @@
|
|
143 |
</meetmyteam>
|
144 |
</helpers>
|
145 |
</global>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
</config>
|
11 |
<config>
|
12 |
<modules>
|
13 |
<SKJ_Meetmyteam>
|
14 |
+
<version>0.1.3</version>
|
15 |
</SKJ_Meetmyteam>
|
16 |
</modules>
|
17 |
<frontend>
|
46 |
<adminhtml>
|
47 |
<menu>
|
48 |
<meetmyteam module="meetmyteam">
|
49 |
+
<title>MeetMyTeam</title>
|
50 |
<sort_order>71</sort_order>
|
51 |
<children>
|
52 |
<items module="meetmyteam">
|
55 |
<action>meetmyteam/adminhtml_meetmyteam</action>
|
56 |
</items>
|
57 |
<cat module="meetmyteam">
|
58 |
+
<title>Manage Category</title>
|
59 |
<sort_order>0</sort_order>
|
60 |
<action>meetmyteam/adminhtml_category</action>
|
61 |
</cat>
|
67 |
<admin>
|
68 |
<children>
|
69 |
<meetmyteam module="meetmyteam">
|
70 |
+
<title>MeetMyTeam</title>
|
71 |
<sort_order>71</sort_order>
|
72 |
<children>
|
73 |
<items module="meetmyteam">
|
76 |
<action>meetmyteam/adminhtml_meetmyteam</action>
|
77 |
</items>
|
78 |
<cat module="meetmyteam">
|
79 |
+
<title>Manage Category</title>
|
80 |
<sort_order>0</sort_order>
|
81 |
<action>meetmyteam/adminhtml_category</action>
|
82 |
</cat>
|
143 |
</meetmyteam>
|
144 |
</helpers>
|
145 |
</global>
|
146 |
+
|
147 |
+
<adminhtml>
|
148 |
+
<acl>
|
149 |
+
<resources>
|
150 |
+
<all>
|
151 |
+
<title>Allow Everything</title>
|
152 |
+
</all>
|
153 |
+
<admin>
|
154 |
+
<children>
|
155 |
+
<system>
|
156 |
+
<children>
|
157 |
+
<config>
|
158 |
+
<children>
|
159 |
+
<meetmyteam_option>
|
160 |
+
<title>SKJ MeetMyTeam</title>
|
161 |
+
</meetmyteam_option>
|
162 |
+
</children>
|
163 |
+
</config>
|
164 |
+
</children>
|
165 |
+
</system>
|
166 |
+
</children>
|
167 |
+
</admin>
|
168 |
+
</resources>
|
169 |
+
</acl>
|
170 |
+
</adminhtml>
|
171 |
+
|
172 |
</config>
|
app/code/local/SKJ/Meetmyteam/etc/system.xml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<meetmyteam>
|
5 |
+
<label>SKJ MeetMyTeam</label>
|
6 |
+
<sort_order>100</sort_order>
|
7 |
+
</meetmyteam>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<meetmyteam_option>
|
11 |
+
<label>SKJ MeetMyTeam</label>
|
12 |
+
<tab>meetmyteam</tab>
|
13 |
+
<sort_order>10</sort_order>
|
14 |
+
<show_in_default>1</show_in_default>
|
15 |
+
<show_in_website>1</show_in_website>
|
16 |
+
<show_in_store>1</show_in_store>
|
17 |
+
<groups>
|
18 |
+
<meetmyteam_all translate="label">
|
19 |
+
<label>Meet my team options</label>
|
20 |
+
<sort_order>50</sort_order>
|
21 |
+
<show_in_default>1</show_in_default>
|
22 |
+
<show_in_website>1</show_in_website>
|
23 |
+
<show_in_store>1</show_in_store>
|
24 |
+
<fields>
|
25 |
+
<display_category_page translate="label comment">
|
26 |
+
<label>Display category menu sidebar on page</label>
|
27 |
+
<comment><![CDATA[Use comma separator. e.g. meetmyteam,catalog]]></comment>
|
28 |
+
<frontend_type>text</frontend_type>
|
29 |
+
<sort_order>100</sort_order>
|
30 |
+
<show_in_default>1</show_in_default>
|
31 |
+
<show_in_website>1</show_in_website>
|
32 |
+
<show_in_store>1</show_in_store>
|
33 |
+
</display_category_page>
|
34 |
+
</fields>
|
35 |
+
</meetmyteam_all>
|
36 |
+
</groups>
|
37 |
+
</meetmyteam_option>
|
38 |
+
</sections>
|
39 |
+
</config>
|
app/code/local/SKJ/Meetmyteam/sql/meetmyteam_setup/mysql4-install-0.1.0.php~
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$installer = $this;
|
4 |
-
|
5 |
-
$installer->startSetup();
|
6 |
-
|
7 |
-
$installer->run("
|
8 |
-
|
9 |
-
-- DROP TABLE IF EXISTS {$this->getTable('meetmyteam')};
|
10 |
-
CREATE TABLE {$this->getTable('meetmyteam')} (
|
11 |
-
`meetmyteam_id` int(11) unsigned NOT NULL auto_increment,
|
12 |
-
`title` varchar(255) NOT NULL default '',
|
13 |
-
`filename` varchar(255) NOT NULL default '',
|
14 |
-
`category` int(11) NOT NULL default '',
|
15 |
-
`content` text NOT NULL default '',
|
16 |
-
`description` text NOT NULL default '',
|
17 |
-
`status` smallint(6) NOT NULL default '0',
|
18 |
-
`created_time` datetime NULL,
|
19 |
-
`update_time` datetime NULL,
|
20 |
-
PRIMARY KEY (`meetmyteam_id`)
|
21 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
22 |
-
|
23 |
-
");
|
24 |
-
|
25 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/SKJ/Meetmyteam/sql/meetmyteam_setup/mysql4-upgrade-0.1.0-0.1.1.php~
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/* @var $installer Mage_Core_Model_Resource_Setup */
|
4 |
-
$installer = $this;
|
5 |
-
|
6 |
-
$installer->startSetup();
|
7 |
-
|
8 |
-
$installer->run("
|
9 |
-
|
10 |
-
-- DROP TABLE IF EXISTS meetmyteam_cat;
|
11 |
-
CREATE TABLE meetmyteam_cat (
|
12 |
-
`meetmyteam_cat_id` int(11) unsigned NOT NULL auto_increment,
|
13 |
-
`title` varchar(255) NOT NULL default '',
|
14 |
-
`status` smallint(6) NOT NULL default '0',
|
15 |
-
`created_time` datetime NULL,
|
16 |
-
`update_time` datetime NULL,
|
17 |
-
PRIMARY KEY (`meetmyteam_cat_id`)
|
18 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
19 |
-
|
20 |
-
");
|
21 |
-
|
22 |
-
|
23 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/SKJ/Meetmyteam/sql/meetmyteam_setup/mysql4-upgrade-0.1.1-0.1.2.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->run("
|
7 |
+
|
8 |
+
ALTER TABLE `meetmyteam` ADD `position` int( 11 ) NOT NULL DEFAULT 0 ;
|
9 |
+
|
10 |
+
");
|
11 |
+
$installer->endSetup();
|
app/code/local/SKJ/Meetmyteam/sql/meetmyteam_setup/mysql4-upgrade-0.1.2-0.1.3.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
$installer->run("
|
7 |
+
|
8 |
+
ALTER TABLE `meetmyteam` CHANGE COLUMN `content` `contents` text NOT NULL default '';
|
9 |
+
|
10 |
+
");
|
11 |
+
|
12 |
+
$installer->run("
|
13 |
+
|
14 |
+
ALTER TABLE `meetmyteam` CHANGE COLUMN `category` `category` varchar(100) NOT NULL default '';
|
15 |
+
|
16 |
+
");
|
17 |
+
|
18 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/meetmyteam.xml
CHANGED
@@ -1,13 +1,35 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
<reference name="content">
|
5 |
<block type="meetmyteam/adminhtml_meetmyteam" name="meetmyteam" />
|
6 |
</reference>
|
7 |
</meetmyteam_adminhtml_meetmyteam_index>
|
|
|
8 |
<meetmyteam_adminhtml_category_index>
|
9 |
<reference name="content">
|
10 |
<block type="meetmyteam/adminhtml_category" name="meetmyteam" />
|
11 |
</reference>
|
12 |
</meetmyteam_adminhtml_category_index>
|
13 |
-
|
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
3 |
+
|
4 |
+
<!-- -->
|
5 |
+
<default>
|
6 |
+
<reference name="head">
|
7 |
+
<action method="setCanLoadExtJs"><flag>1</flag></action>
|
8 |
+
<action method="setCanLoadTinyMce"><flag>1</flag></action>
|
9 |
+
<action method="addJs"><script>mage/adminhtml/variables.js</script></action>
|
10 |
+
<action method="addJs"><script>mage/adminhtml/wysiwyg/widget.js</script></action>
|
11 |
+
<action method="addJs"><script>lib/flex.js</script></action>
|
12 |
+
<action method="addJs"><script>lib/FABridge.js</script></action>
|
13 |
+
<action method="addJs"><script>mage/adminhtml/flexuploader.js</script></action>
|
14 |
+
<action method="addJs"><script>mage/adminhtml/browser.js</script></action>
|
15 |
+
<action method="addJs"><script>prototype/window.js</script></action>
|
16 |
+
<action method="addJs"><script>prototype/prototype.js</script></action>
|
17 |
+
<action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
|
18 |
+
<action method="addItem"><type>skin_css</type><file>lib/prototype/windows/themes/magento.css</file></action>
|
19 |
+
</reference>
|
20 |
+
</default>
|
21 |
+
<!-- -->
|
22 |
+
|
23 |
+
<meetmyteam_adminhtml_meetmyteam_index>
|
24 |
<reference name="content">
|
25 |
<block type="meetmyteam/adminhtml_meetmyteam" name="meetmyteam" />
|
26 |
</reference>
|
27 |
</meetmyteam_adminhtml_meetmyteam_index>
|
28 |
+
|
29 |
<meetmyteam_adminhtml_category_index>
|
30 |
<reference name="content">
|
31 |
<block type="meetmyteam/adminhtml_category" name="meetmyteam" />
|
32 |
</reference>
|
33 |
</meetmyteam_adminhtml_category_index>
|
34 |
+
|
35 |
+
</layout>
|
app/design/frontend/base/default/template/meetmyteam/category.phtml
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
<?php $category = $this->getCategory(); ?>
|
2 |
<?php
|
|
|
3 |
// get breadcrumbs block
|
4 |
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
|
5 |
// add first item with link
|
@@ -21,6 +22,7 @@ $breadcrumbs->addCrumb(
|
|
21 |
)
|
22 |
);
|
23 |
echo $breadcrumbs->toHtml();
|
|
|
24 |
?>
|
25 |
|
26 |
<div class="page-title">
|
@@ -33,10 +35,19 @@ echo $breadcrumbs->toHtml();
|
|
33 |
|
34 |
<br/>
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
<?php
|
37 |
-
|
38 |
-
$collection->
|
39 |
-
$collection->addFieldToFilter('category',Array('eq'=>$category->getId()));
|
40 |
|
41 |
$size = $collection->getSize();
|
42 |
|
@@ -47,15 +58,21 @@ if($size>0){
|
|
47 |
<?php
|
48 |
$url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
49 |
$i = 0;
|
50 |
-
|
51 |
-
|
52 |
//$detailUrl = Mage::getUrl('meetmyteam/index/detail',array('id'=>$item->getId(),'cat_id'=>$item->getCategory()));
|
53 |
$detailUrl = Mage::getUrl('meetmyteam/index/detail',array('id'=>$item->getId()));
|
|
|
|
|
|
|
|
|
54 |
?>
|
55 |
|
56 |
-
<li
|
57 |
-
|
58 |
-
|
|
|
|
|
59 |
|
60 |
<div class="title">
|
61 |
<?php echo $item->getTitle(); ?>
|
1 |
<?php $category = $this->getCategory(); ?>
|
2 |
<?php
|
3 |
+
/*
|
4 |
// get breadcrumbs block
|
5 |
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
|
6 |
// add first item with link
|
22 |
)
|
23 |
);
|
24 |
echo $breadcrumbs->toHtml();
|
25 |
+
*/
|
26 |
?>
|
27 |
|
28 |
<div class="page-title">
|
35 |
|
36 |
<br/>
|
37 |
|
38 |
+
<div>
|
39 |
+
<form id="search_team_form" action="<?php echo Mage::helper('core/url')->getCurrentUrl();?>" method="get">
|
40 |
+
<div class="input-box">
|
41 |
+
|
42 |
+
<input id="search-team" type="search" name="q-team" value="<?php if(isset($_GET['q-team'])) echo $_GET['q-team']?>" class="input-text required-entry" maxlength="128" placeholder="Search team by name..." autocomplete="off">
|
43 |
+
<button type="submit" title="Search" class="button search-button"><span><span>Search</span></span></button>
|
44 |
+
</div>
|
45 |
+
</form>
|
46 |
+
</div>
|
47 |
+
|
48 |
<?php
|
49 |
+
// Call Category block
|
50 |
+
$collection = $this->getAllMembers();
|
|
|
51 |
|
52 |
$size = $collection->getSize();
|
53 |
|
58 |
<?php
|
59 |
$url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
60 |
$i = 0;
|
61 |
+
foreach ($collection as $item) {
|
62 |
+
$i = $i+1;
|
63 |
//$detailUrl = Mage::getUrl('meetmyteam/index/detail',array('id'=>$item->getId(),'cat_id'=>$item->getCategory()));
|
64 |
$detailUrl = Mage::getUrl('meetmyteam/index/detail',array('id'=>$item->getId()));
|
65 |
+
$imageUrl = '#';
|
66 |
+
if($item->getFilename()){
|
67 |
+
$imageUrl = $url.'media'.DS.$item->getFilename();
|
68 |
+
}
|
69 |
?>
|
70 |
|
71 |
+
<li>
|
72 |
+
|
73 |
+
<span class="photo_section">
|
74 |
+
<a href="<?php echo $detailUrl; ?>"> <img height="170" width="150" border="0" title="<?php echo $item->getTitle(); ?>" alt="<?php echo $item->getTitle(); ?>" src="<?php echo $imageUrl; ?>"> </a>
|
75 |
+
</span>
|
76 |
|
77 |
<div class="title">
|
78 |
<?php echo $item->getTitle(); ?>
|
app/design/frontend/base/default/template/meetmyteam/category_box.phtml
CHANGED
@@ -1,5 +1,24 @@
|
|
1 |
<?php $categories = $this->getCategoryList();
|
2 |
$size = $categories->getSize();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
if($size > 0):
|
4 |
?>
|
5 |
<h4>
|
@@ -16,3 +35,6 @@ foreach ($categories as $category) {
|
|
16 |
?>
|
17 |
</ul>
|
18 |
<?php endif; ?>
|
|
|
|
|
|
1 |
<?php $categories = $this->getCategoryList();
|
2 |
$size = $categories->getSize();
|
3 |
+
|
4 |
+
/**/
|
5 |
+
$pages = Mage::getStoreConfig('meetmyteam_option/meetmyteam_all/display_category_page');
|
6 |
+
if($pages):
|
7 |
+
//$currentPage = Mage::app()->getRequest()->getRouteName();
|
8 |
+
$pagesArray = explode(',', $pages);
|
9 |
+
//if(in_array($currentPage, $pagesArray)):
|
10 |
+
|
11 |
+
$currentPage = Mage::helper('core/url')->getCurrentUrl();
|
12 |
+
$display = false;
|
13 |
+
foreach ($pagesArray as $value) {
|
14 |
+
if (strpos($currentPage,$value) !== false){
|
15 |
+
$display = true; // yes page is for display
|
16 |
+
}
|
17 |
+
}
|
18 |
+
if($display):
|
19 |
+
/**/
|
20 |
+
|
21 |
+
|
22 |
if($size > 0):
|
23 |
?>
|
24 |
<h4>
|
35 |
?>
|
36 |
</ul>
|
37 |
<?php endif; ?>
|
38 |
+
|
39 |
+
<?php endif; ?>
|
40 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/meetmyteam/detail.phtml
CHANGED
@@ -42,24 +42,49 @@ $breadcrumbs->addCrumb(
|
|
42 |
);
|
43 |
echo $breadcrumbs->toHtml();
|
44 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
<div class="meetmyteam-detail">
|
46 |
<?php
|
47 |
$url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
49 |
echo "<h4> ".$item->getTitle()."</h4>";
|
50 |
|
51 |
echo "<h6>";
|
52 |
echo $item->getDescription();
|
53 |
echo "</h6>";
|
54 |
echo "<p>";
|
55 |
-
echo $item->getContent();
|
|
|
|
|
|
|
|
|
|
|
56 |
echo "</p>";
|
57 |
|
58 |
?>
|
59 |
|
60 |
</div>
|
61 |
|
62 |
-
<a class="detail-back" href="<?php echo $detailUrl; ?>">< Back </a><br/>
|
63 |
-
|
64 |
|
|
|
|
|
|
|
|
|
|
|
65 |
|
42 |
);
|
43 |
echo $breadcrumbs->toHtml();
|
44 |
?>
|
45 |
+
|
46 |
+
<div>
|
47 |
+
<form id="search_team_form" action="<?php echo Mage::getUrl('meetmyteam')?>" method="get">
|
48 |
+
<div class="input-box">
|
49 |
+
|
50 |
+
<input id="search-team" type="search" name="q-team" value="<?php if(isset($_GET['q-team'])) echo $_GET['q-team']?>" class="input-text required-entry" maxlength="128" placeholder="Search team by name..." autocomplete="off">
|
51 |
+
<button type="submit" title="Search" class="button search-button"><span><span>Search</span></span></button>
|
52 |
+
</div>
|
53 |
+
</form>
|
54 |
+
</div>
|
55 |
+
|
56 |
<div class="meetmyteam-detail">
|
57 |
<?php
|
58 |
$url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
59 |
+
$imageUrl = '#';
|
60 |
+
if($item->getFilename()){
|
61 |
+
$imageUrl = $url.'media'.DS.$item->getFilename();
|
62 |
+
}
|
63 |
+
|
64 |
+
echo "<img width='250px' height='250px' title='". $item->getTitle() ."' alt='". $item->getTitle() ."' src='".$imageUrl."'/>";
|
65 |
echo "<h4> ".$item->getTitle()."</h4>";
|
66 |
|
67 |
echo "<h6>";
|
68 |
echo $item->getDescription();
|
69 |
echo "</h6>";
|
70 |
echo "<p>";
|
71 |
+
//echo $item->getContent();
|
72 |
+
/**/
|
73 |
+
$html_content = $item->getContents();
|
74 |
+
$html_content = Mage::helper('cms')->getPageTemplateProcessor()->filter($html_content);
|
75 |
+
echo $html_content;
|
76 |
+
/**/
|
77 |
echo "</p>";
|
78 |
|
79 |
?>
|
80 |
|
81 |
</div>
|
82 |
|
83 |
+
<a class="detail-back" onclick="goBack()" href="<?php //echo $detailUrl; ?>">< Back </a><br/>
|
|
|
84 |
|
85 |
+
<script>
|
86 |
+
function goBack() {
|
87 |
+
window.history.back();
|
88 |
+
}
|
89 |
+
</script>
|
90 |
|
app/design/frontend/base/default/template/meetmyteam/meetmyteam.phtml
CHANGED
@@ -3,6 +3,17 @@
|
|
3 |
<?php echo $this->__('My Team') ?>
|
4 |
</h4>
|
5 |
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
<?php
|
7 |
$collection = $this->getAllMembers();
|
8 |
|
@@ -10,6 +21,7 @@ $size = $collection->getSize();
|
|
10 |
|
11 |
if($size>0){
|
12 |
?>
|
|
|
13 |
<div>
|
14 |
<ul class="leader_not">
|
15 |
<?php
|
@@ -18,11 +30,17 @@ $url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
|
18 |
$i = $i+1;
|
19 |
//$detailUrl = Mage::getUrl('meetmyteam/index/detail',array('id'=>$item->getId(),'cat_id'=>$item->getCategory()));
|
20 |
$detailUrl = Mage::getUrl('meetmyteam/index/detail',array('id'=>$item->getId()));
|
|
|
|
|
|
|
|
|
21 |
?>
|
22 |
|
23 |
-
<li
|
24 |
-
|
25 |
-
|
|
|
|
|
26 |
|
27 |
<div class="title">
|
28 |
<?php echo $item->getTitle(); ?>
|
3 |
<?php echo $this->__('My Team') ?>
|
4 |
</h4>
|
5 |
</span>
|
6 |
+
|
7 |
+
<div>
|
8 |
+
<form id="search_team_form" action="<?php echo Mage::getUrl('meetmyteam')?>" method="get">
|
9 |
+
<div class="input-box">
|
10 |
+
|
11 |
+
<input id="search-team" type="search" name="q-team" value="<?php if(isset($_GET['q-team'])) echo $_GET['q-team']?>" class="input-text required-entry" maxlength="128" placeholder="Search team by name..." autocomplete="off">
|
12 |
+
<button type="submit" title="Search" class="button search-button"><span><span>Search</span></span></button>
|
13 |
+
</div>
|
14 |
+
</form>
|
15 |
+
</div>
|
16 |
+
|
17 |
<?php
|
18 |
$collection = $this->getAllMembers();
|
19 |
|
21 |
|
22 |
if($size>0){
|
23 |
?>
|
24 |
+
|
25 |
<div>
|
26 |
<ul class="leader_not">
|
27 |
<?php
|
30 |
$i = $i+1;
|
31 |
//$detailUrl = Mage::getUrl('meetmyteam/index/detail',array('id'=>$item->getId(),'cat_id'=>$item->getCategory()));
|
32 |
$detailUrl = Mage::getUrl('meetmyteam/index/detail',array('id'=>$item->getId()));
|
33 |
+
$imageUrl = '#';
|
34 |
+
if($item->getFilename()){
|
35 |
+
$imageUrl = $url.'media'.DS.$item->getFilename();
|
36 |
+
}
|
37 |
?>
|
38 |
|
39 |
+
<li>
|
40 |
+
|
41 |
+
<span class="photo_section">
|
42 |
+
<a href="<?php echo $detailUrl; ?>"> <img height="170" width="150" border="0" title="<?php echo $item->getTitle(); ?>" alt="<?php echo $item->getTitle(); ?>" src="<?php echo $imageUrl; ?>"> </a>
|
43 |
+
</span>
|
44 |
|
45 |
<div class="title">
|
46 |
<?php echo $item->getTitle(); ?>
|
package.xml
CHANGED
@@ -1,18 +1,24 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>SKJ_Meetmyteam</name>
|
4 |
-
<version>0.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">version OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>It is known as Team Management or Member Management or Board Management
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
<authors><author><name>Sanjeev Jha</name><user>sakjha10</user><email>jha.sanjeev.in@gmail.com</email></author></authors>
|
13 |
-
<date>2016-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="SKJ"><dir name="Meetmyteam"><dir name="Block"><dir name="Adminhtml"><dir name="Category"><dir name="Edit"><file name="Form.php" hash="a0e4afc0acb0349e52b0a2e1100d2314"/><dir name="Tab"><file name="Form.php" hash="57c7b71cf4342b947bbde551406686ed"/></dir><file name="Tabs.php" hash="7bbbdeca0cf30b377dc10eea06eced06"/></dir><file name="Edit.php" hash="469c1fc9633341aa5a2fd11a82758bf5"/><file name="Grid.php" hash="f3a133ad26dbdd77780144128aec6c2f"/></dir><file name="Category.php" hash="24b703d87e3970378611845596917d5b"/><dir name="Meetmyteam"><dir name="Edit"><file name="Form.php" hash="f35c94d92186fcd95d035cd208e7bc0b"/><dir name="Tab"><file name="Form.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>SKJ_Meetmyteam</name>
|
4 |
+
<version>0.1.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">version OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Team Management extension for Magento</summary>
|
10 |
+
<description>It is known as Team Management or Member Management or Board Management.
|
11 |
+

|
12 |
+
Features include:
|
13 |
+

|
14 |
+
Easily see team member information - You can easily see a list of everyone on the team including their name, designation, biography and profile picture of each member.
|
15 |
+
Find Who’s On Each member group - You can see a complete list of every member on the team.</description>
|
16 |
+
<notes>Magento compatibility
|
17 |
+
Improved features</notes>
|
18 |
<authors><author><name>Sanjeev Jha</name><user>sakjha10</user><email>jha.sanjeev.in@gmail.com</email></author></authors>
|
19 |
+
<date>2016-09-27</date>
|
20 |
+
<time>02:29:52</time>
|
21 |
+
<contents><target name="magelocal"><dir name="SKJ"><dir name="Meetmyteam"><dir name="Block"><dir name="Adminhtml"><dir name="Category"><dir name="Edit"><file name="Form.php" hash="a0e4afc0acb0349e52b0a2e1100d2314"/><dir name="Tab"><file name="Form.php" hash="57c7b71cf4342b947bbde551406686ed"/></dir><file name="Tabs.php" hash="7bbbdeca0cf30b377dc10eea06eced06"/></dir><file name="Edit.php" hash="469c1fc9633341aa5a2fd11a82758bf5"/><file name="Grid.php" hash="f3a133ad26dbdd77780144128aec6c2f"/></dir><file name="Category.php" hash="24b703d87e3970378611845596917d5b"/><dir name="Meetmyteam"><dir name="Edit"><file name="Form.php" hash="f35c94d92186fcd95d035cd208e7bc0b"/><dir name="Tab"><file name="Form.php" hash="e03374e683e107ebc68be90f306e6ab4"/></dir><file name="Tabs.php" hash="8999f697d85b668a66aa1c903b449c83"/></dir><file name="Edit.php" hash="4618091f20e4870e7f2d004ac68694d4"/><file name="Grid.php" hash="1fbf35f8f19e3afbe717d9844175f0e0"/></dir><file name="Meetmyteam.php" hash="eda38dc3b3f8541fce6e57c9054cb6ce"/><dir name="Renderer"><file name="Category.php" hash="6d06d26e4d91f66fd93c2186dae90486"/><file name="Image.php" hash="2a05f442d666879dcc123448f54d921e"/><file name="Preview.php" hash="8171809bd2a1a87b9fd3f52759448ed2"/></dir></dir><file name="Category.php" hash="95b557a17252366fc6f11e96f2f5373e"/><file name="Meetmyteam.php" hash="25cf75483d995efe4265423629ecd98d"/></dir><dir name="Helper"><file name="Data.php" hash="c243bcb9a48f889fc56497417da21bec"/></dir><dir name="Model"><file name="Category.php" hash="4cd23ce3b0b8204e7cb8e0b8a4ce26be"/><file name="Meetmyteam.php" hash="2bdb9919636eae66a2e97e7a106ebb52"/><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="f2626f19f54975660aec9b1fc85f0dd0"/></dir><file name="Category.php" hash="b2378c476d8170df691745374068c914"/><dir name="Meetmyteam"><file name="Collection.php" hash="a6d4943bb60fa57d97dcbb58ce4629f2"/></dir><file name="Meetmyteam.php" hash="cf3d49b3e8861d40fbad764ba61f2707"/></dir><file name="Status.php" hash="bd8e2ed3300c4b8e940b6a529d5832e8"/><dir name="Wysiwyg"><file name="Config.php" hash="6e8364d8f1df6b715e9eb88ca42c1859"/><file name="Config.php~" hash="c086f047a6e8a05b7693e262594dfa21"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CategoryController.php" hash="1bf1cf14b473de7d3ecac746c70941e9"/><file name="MeetmyteamController.php" hash="00c91057daa7c67dac56bbaf7268a74a"/></dir><file name="IndexController.php" hash="93838a98b19a1246f631a3c6664216ae"/></dir><dir name="etc"><file name="config.xml" hash="c6610fb173e7a31da411cc9e34d4ceac"/><file name="system.xml" hash="9ae0e91e5474d551f52aecf5261b7c76"/></dir><dir name="sql"><dir name="meetmyteam_setup"><file name="mysql4-install-0.1.0.php" hash="4cb218488da3fa7e18b78190da3f384c"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="ce2b1cbd79a9db0b23bc000f980c4dcf"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="2870e5214a02d462b2a649eaf7ab1518"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="2335d6255e2a63c1c4ae5a901327bda8"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="meetmyteam.xml" hash="56b9781c6c54a9679a052a5473deca3b"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="meetmyteam.xml" hash="ad62f3d727a7e9e4e91e018dde0fc7d3"/></dir><dir name="template"><dir name="meetmyteam"><file name="category.phtml" hash="95a313076d1eaae2cc3d776c34b102cf"/><file name="category_box.phtml" hash="1fdba91637e85d1eb2a429e2fc24a19e"/><file name="detail.phtml" hash="48a5f849a2e0acf9944b19b1b61edb34"/><file name="meetmyteam.phtml" hash="25d8242d962d2a6109b02835c44fae50"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SKJ_Meetmyteam.xml" hash="ff5636717a2f26da2e81845e51e9ab27"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="skj-myteam.css" hash="8800d4c322e00307bacd514e94b49e70"/></dir></dir></dir></dir></target></contents>
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
24 |
</package>
|