Solwin_Manageteam - Version 1.0.0

Version Notes

Manage Team extension is used to display team member's information on the website with ease.

Download this release

Release Info

Developer Sanjay Dabhoya
Extension Solwin_Manageteam
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (31) hide show
  1. app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam.php +17 -0
  2. app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam/Edit.php +45 -0
  3. app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam/Edit/Form.php +18 -0
  4. app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam/Edit/Tab/Form.php +72 -0
  5. app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam/Edit/Tabs.php +21 -0
  6. app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam/Grid.php +103 -0
  7. app/code/community/Solwin/Manageteam/Block/Adminhtml/Renderer/Image.php +16 -0
  8. app/code/community/Solwin/Manageteam/Block/Index.php +26 -0
  9. app/code/community/Solwin/Manageteam/Helper/Data.php +8 -0
  10. app/code/community/Solwin/Manageteam/Model/Manageteam.php +12 -0
  11. app/code/community/Solwin/Manageteam/Model/Mysql4/Manageteam.php +8 -0
  12. app/code/community/Solwin/Manageteam/Model/Mysql4/Manageteam/Collection.php +12 -0
  13. app/code/community/Solwin/Manageteam/controllers/Adminhtml/ManageteamController.php +191 -0
  14. app/code/community/Solwin/Manageteam/controllers/IndexController.php +24 -0
  15. app/code/community/Solwin/Manageteam/etc/adminhtml.xml +23 -0
  16. app/code/community/Solwin/Manageteam/etc/config.xml +115 -0
  17. app/code/community/Solwin/Manageteam/etc/system.xml +69 -0
  18. app/code/community/Solwin/Manageteam/sql/manageteam_setup/mysql4-install-1.0.0.php +23 -0
  19. app/design/adminhtml/default/default/layout/manageteam.xml +8 -0
  20. app/design/frontend/base/default/layout/manageteam.xml +45 -0
  21. app/design/frontend/base/default/template/manageteam/index.phtml +136 -0
  22. app/design/frontend/base/default/template/manageteam/toplinks.phtml +16 -0
  23. app/etc/modules/Solwin_Manageteam.xml +10 -0
  24. package.xml +18 -0
  25. skin/adminhtml/default/default/images/manageteam/manageteam.jpg +0 -0
  26. skin/frontend/base/default/css/manageteam.css +109 -0
  27. skin/frontend/base/default/images/manageteam/facebook.png +0 -0
  28. skin/frontend/base/default/images/manageteam/google-plus.png +0 -0
  29. skin/frontend/base/default/images/manageteam/mail.png +0 -0
  30. skin/frontend/base/default/images/manageteam/manageteam.jpg +0 -0
  31. skin/frontend/base/default/images/manageteam/twitter.png +0 -0
app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class Solwin_Manageteam_Block_Adminhtml_Manageteam extends Mage_Adminhtml_Block_Widget_Grid_Container{
5
+
6
+ public function __construct()
7
+ {
8
+
9
+ $this->_controller = "adminhtml_manageteam";
10
+ $this->_blockGroup = "manageteam";
11
+ $this->_headerText = Mage::helper("manageteam")->__("Manage Team");
12
+ $this->_addButtonLabel = Mage::helper("manageteam")->__("Add New Member");
13
+ parent::__construct();
14
+
15
+ }
16
+
17
+ }
app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam/Edit.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Solwin_Manageteam_Block_Adminhtml_Manageteam_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
4
+
5
+ public function __construct() {
6
+
7
+ parent::__construct();
8
+ $this->_objectId = "manageteam_id";
9
+ $this->_blockGroup = "manageteam";
10
+ $this->_controller = "adminhtml_manageteam";
11
+ $this->_updateButton("save", "label", Mage::helper("manageteam")->__("Save Item"));
12
+ $this->_updateButton("delete", "label", Mage::helper("manageteam")->__("Delete Item"));
13
+
14
+ $this->_addButton("saveandcontinue", array(
15
+ "label" => Mage::helper("manageteam")->__("Save And Continue Edit"),
16
+ "onclick" => "saveAndContinueEdit()",
17
+ "class" => "save",
18
+ ), -100);
19
+
20
+ $this->_formScripts[] = "
21
+
22
+ function saveAndContinueEdit(){
23
+ editForm.submit($('edit_form').action+'back/edit/');
24
+ }
25
+ ";
26
+ }
27
+
28
+ protected function _prepareLayout() {
29
+ parent::_prepareLayout();
30
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
31
+ $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
32
+ }
33
+ }
34
+
35
+ public function getHeaderText() {
36
+ if (Mage::registry("manageteam_data") && Mage::registry("manageteam_data")->getId()) {
37
+
38
+ return Mage::helper("manageteam")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("manageteam_data")->getId()));
39
+ } else {
40
+
41
+ return Mage::helper("manageteam")->__("Add Item");
42
+ }
43
+ }
44
+
45
+ }
app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam/Edit/Form.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Solwin_Manageteam_Block_Adminhtml_Manageteam_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
+
18
+ }
app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam/Edit/Tab/Form.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Solwin_Manageteam_Block_Adminhtml_Manageteam_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
4
+
5
+ protected function _prepareForm() {
6
+
7
+ $form = new Varien_Data_Form();
8
+ $this->setForm($form);
9
+ $fieldset = $form->addFieldset("manageteam_form", array("legend" => Mage::helper("manageteam")->__("Item information")));
10
+
11
+
12
+ $fieldset->addField("name", "text", array(
13
+ "label" => Mage::helper("manageteam")->__("Name"),
14
+ "class" => "required-entry",
15
+ "required" => true,
16
+ "name" => "name",
17
+ ));
18
+
19
+ $fieldset->addField('image', 'image', array(
20
+ 'label' => Mage::helper('manageteam')->__('Image'),
21
+ 'name' => 'image',
22
+ 'note' => '(*.jpg, *.png, *.gif)',
23
+ ));
24
+ $fieldset->addField("designation", "text", array(
25
+ "label" => Mage::helper("manageteam")->__("Designation"),
26
+ "name" => "designation",
27
+ ));
28
+
29
+ $fieldset->addField("description", "editor", array(
30
+ "label" => Mage::helper("manageteam")->__("Description"),
31
+ "name" => "description",
32
+ 'style' => 'height:15em',
33
+ 'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
34
+ 'wysiwyg' => true,
35
+ ));
36
+
37
+ $fieldset->addField('status', 'select', array(
38
+ 'label' => Mage::helper('manageteam')->__('Status'),
39
+ 'values' => Solwin_Manageteam_Block_Adminhtml_Manageteam_Grid::getValueArray6(),
40
+ 'name' => 'status',
41
+ ));
42
+ $fieldset->addField("facebookurl", "text", array(
43
+ "label" => Mage::helper("manageteam")->__("Facebook Url"),
44
+ "name" => "facebookurl",
45
+ ));
46
+
47
+ $fieldset->addField("googleurl", "text", array(
48
+ "label" => Mage::helper("manageteam")->__("Google+ Url"),
49
+ "name" => "googleurl",
50
+ ));
51
+
52
+ $fieldset->addField("twitterurl", "text", array(
53
+ "label" => Mage::helper("manageteam")->__("Twitter Url"),
54
+ "name" => "twitterurl",
55
+ ));
56
+
57
+ $fieldset->addField("email", "text", array(
58
+ "label" => Mage::helper("manageteam")->__("Email"),
59
+ "name" => "email",
60
+ ));
61
+
62
+
63
+ if (Mage::getSingleton("adminhtml/session")->getManageteamData()) {
64
+ $form->setValues(Mage::getSingleton("adminhtml/session")->getManageteamData());
65
+ Mage::getSingleton("adminhtml/session")->setManageteamData(null);
66
+ } elseif (Mage::registry("manageteam_data")) {
67
+ $form->setValues(Mage::registry("manageteam_data")->getData());
68
+ }
69
+ return parent::_prepareForm();
70
+ }
71
+
72
+ }
app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam/Edit/Tabs.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Solwin_Manageteam_Block_Adminhtml_Manageteam_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
4
+
5
+ public function __construct() {
6
+ parent::__construct();
7
+ $this->setId("manageteam_tabs");
8
+ $this->setDestElementId("edit_form");
9
+ $this->setTitle(Mage::helper("manageteam")->__("Item Information"));
10
+ }
11
+
12
+ protected function _beforeToHtml() {
13
+ $this->addTab("form_section", array(
14
+ "label" => Mage::helper("manageteam")->__("Item Information"),
15
+ "title" => Mage::helper("manageteam")->__("Item Information"),
16
+ "content" => $this->getLayout()->createBlock("manageteam/adminhtml_manageteam_edit_tab_form")->toHtml(),
17
+ ));
18
+ return parent::_beforeToHtml();
19
+ }
20
+
21
+ }
app/code/community/Solwin/Manageteam/Block/Adminhtml/Manageteam/Grid.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Solwin_Manageteam_Block_Adminhtml_Manageteam_Grid extends Mage_Adminhtml_Block_Widget_Grid {
4
+
5
+ public function __construct() {
6
+ parent::__construct();
7
+ $this->setId("manageteamGrid");
8
+ $this->setDefaultSort("manageteam_id");
9
+ $this->setDefaultDir("DESC");
10
+ $this->setSaveParametersInSession(true);
11
+ }
12
+
13
+ protected function _prepareCollection() {
14
+ $collection = Mage::getModel("manageteam/manageteam")->getCollection();
15
+ $this->setCollection($collection);
16
+ return parent::_prepareCollection();
17
+ }
18
+
19
+ protected function _prepareColumns() {
20
+ $this->addColumn("manageteam_id", array(
21
+ "header" => Mage::helper("manageteam")->__("ID"),
22
+ "align" => "right",
23
+ "width" => "50px",
24
+ "type" => "number",
25
+ "index" => "manageteam_id",
26
+ ));
27
+
28
+ $this->addColumn("image", array(
29
+ "header" => Mage::helper("manageteam")->__("Image"),
30
+ "index" => "image",
31
+ "width" => "100px",
32
+ "renderer" => "Solwin_Manageteam_Block_Adminhtml_Renderer_Image",
33
+ ));
34
+
35
+ $this->addColumn("name", array(
36
+ "header" => Mage::helper("manageteam")->__("Name"),
37
+ "index" => "name",
38
+ ));
39
+ $this->addColumn("designation", array(
40
+ "header" => Mage::helper("manageteam")->__("Designation"),
41
+ "index" => "designation",
42
+ ));
43
+ $this->addColumn('status', array(
44
+ 'header' => Mage::helper('manageteam')->__('Status'),
45
+ 'index' => 'status',
46
+ 'type' => 'options',
47
+ 'options' => Solwin_Manageteam_Block_Adminhtml_Manageteam_Grid::getOptionArray6(),
48
+ ));
49
+
50
+ $this->addColumn("facebookurl", array(
51
+ "header" => Mage::helper("manageteam")->__("Facebook Url"),
52
+ "index" => "facebookurl",
53
+ ));
54
+ $this->addColumn("googleurl", array(
55
+ "header" => Mage::helper("manageteam")->__("Google+ Url"),
56
+ "index" => "googleurl",
57
+ ));
58
+ $this->addColumn("twitterurl", array(
59
+ "header" => Mage::helper("manageteam")->__("Twitter Url"),
60
+ "index" => "twitterurl",
61
+ ));
62
+ $this->addColumn("email", array(
63
+ "header" => Mage::helper("manageteam")->__("Email"),
64
+ "index" => "email",
65
+ ));
66
+ $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
67
+ $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
68
+
69
+ return parent::_prepareColumns();
70
+ }
71
+
72
+ public function getRowUrl($row) {
73
+ return $this->getUrl("*/*/edit", array("id" => $row->getId()));
74
+ }
75
+
76
+ protected function _prepareMassaction() {
77
+ $this->setMassactionIdField('manageteam_id');
78
+ $this->getMassactionBlock()->setFormFieldName('manageteam_ids');
79
+ $this->getMassactionBlock()->setUseSelectAll(true);
80
+ $this->getMassactionBlock()->addItem('remove_manageteam', array(
81
+ 'label' => Mage::helper('manageteam')->__('Remove Manageteam'),
82
+ 'url' => $this->getUrl('*/adminhtml_manageteam/massRemove'),
83
+ 'confirm' => Mage::helper('manageteam')->__('Are you sure?')
84
+ ));
85
+ return $this;
86
+ }
87
+
88
+ static public function getOptionArray6() {
89
+ $data_array = array();
90
+ $data_array[0] = 'Enable';
91
+ $data_array[1] = 'Disable';
92
+ return($data_array);
93
+ }
94
+
95
+ static public function getValueArray6() {
96
+ $data_array = array();
97
+ foreach (Solwin_Manageteam_Block_Adminhtml_Manageteam_Grid::getOptionArray6() as $k => $v) {
98
+ $data_array[] = array('value' => $k, 'label' => $v);
99
+ }
100
+ return($data_array);
101
+ }
102
+
103
+ }
app/code/community/Solwin/Manageteam/Block/Adminhtml/Renderer/Image.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Solwin_Manageteam_Block_Adminhtml_Renderer_Image extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
4
+
5
+ public function render(Varien_Object $row) {
6
+ $mediaurl = '';
7
+ $value = $row->getData($this->getColumn()->getIndex());
8
+ if ($value) {
9
+ $mediaurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . DS . $value;
10
+ } else {
11
+ $mediaurl = $this->getSkinUrl() . 'images/manageteam/manageteam.jpg';
12
+ }
13
+ return '<p style="text-align:center;padding-top:5px;"><img src="' . $mediaurl . '" style="width:80px;height:80px;text-align:center;"/></p>';
14
+ }
15
+
16
+ }
app/code/community/Solwin/Manageteam/Block/Index.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Solwin_Manageteam_Block_Index extends Mage_Core_Block_Template {
4
+
5
+ public function __construct() {
6
+ parent::__construct();
7
+ $collection = Mage::getModel('manageteam/manageteam')->getCollection();
8
+ $this->setCollection($collection);
9
+ }
10
+
11
+ protected function _prepareLayout() {
12
+ parent::_prepareLayout();
13
+
14
+ $pager = $this->getLayout()->createBlock('page/html_pager', 'custom.pager');
15
+ $pager->setAvailableLimit(array(8 => 8, 12 => 12, 24 => 24, 'all' => 'all'));
16
+ $pager->setCollection($this->getCollection());
17
+ $this->setChild('pager', $pager);
18
+ $this->getCollection()->load();
19
+ return $this;
20
+ }
21
+
22
+ public function getPagerHtml() {
23
+ return $this->getChildHtml('pager');
24
+ }
25
+
26
+ }
app/code/community/Solwin/Manageteam/Helper/Data.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Solwin_Manageteam_Helper_Data extends Mage_Core_Helper_Abstract {
4
+
5
+ public function getManageteamsUrl() {
6
+ return Mage::getUrl('manageteam');
7
+ }
8
+ }
app/code/community/Solwin/Manageteam/Model/Manageteam.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Solwin_Manageteam_Model_Manageteam extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct(){
6
+
7
+ $this->_init("manageteam/manageteam");
8
+
9
+ }
10
+
11
+ }
12
+
app/code/community/Solwin/Manageteam/Model/Mysql4/Manageteam.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Solwin_Manageteam_Model_Mysql4_Manageteam extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init("manageteam/manageteam", "manageteam_id");
7
+ }
8
+ }
app/code/community/Solwin/Manageteam/Model/Mysql4/Manageteam/Collection.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Solwin_Manageteam_Model_Mysql4_Manageteam_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+
5
+ public function _construct(){
6
+ $this->_init("manageteam/manageteam");
7
+ }
8
+
9
+
10
+
11
+ }
12
+
app/code/community/Solwin/Manageteam/controllers/Adminhtml/ManageteamController.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Solwin_Manageteam_Adminhtml_ManageteamController extends Mage_Adminhtml_Controller_Action {
4
+
5
+ protected function _initAction() {
6
+ $this->loadLayout()->_setActiveMenu("manageteam/manageteam")->_addBreadcrumb(Mage::helper("adminhtml")->__("Manageteam Manager"), Mage::helper("adminhtml")->__("Manageteam Manager"));
7
+ return $this;
8
+ }
9
+
10
+ public function indexAction() {
11
+ $this->_title($this->__("Manageteam"));
12
+ $this->_title($this->__("Manager Manageteam"));
13
+
14
+ $this->_initAction();
15
+ $this->renderLayout();
16
+ }
17
+
18
+ public function editAction() {
19
+ $this->_title($this->__("Manageteam"));
20
+ $this->_title($this->__("Manageteam"));
21
+ $this->_title($this->__("Edit Item"));
22
+
23
+ $id = $this->getRequest()->getParam("id");
24
+ $model = Mage::getModel("manageteam/manageteam")->load($id);
25
+ if ($model->getId()) {
26
+ Mage::register("manageteam_data", $model);
27
+ $this->loadLayout();
28
+ $this->_setActiveMenu("manageteam/manageteam");
29
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Manageteam Manager"), Mage::helper("adminhtml")->__("Manageteam Manager"));
30
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Manageteam Description"), Mage::helper("adminhtml")->__("Manageteam Description"));
31
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
32
+ $this->_addContent($this->getLayout()->createBlock("manageteam/adminhtml_manageteam_edit"))->_addLeft($this->getLayout()->createBlock("manageteam/adminhtml_manageteam_edit_tabs"));
33
+ $this->renderLayout();
34
+ } else {
35
+ Mage::getSingleton("adminhtml/session")->addError(Mage::helper("manageteam")->__("Item does not exist."));
36
+ $this->_redirect("*/*/");
37
+ }
38
+ }
39
+
40
+ public function newAction() {
41
+
42
+ $this->_title($this->__("Manageteam"));
43
+ $this->_title($this->__("Manageteam"));
44
+ $this->_title($this->__("New Item"));
45
+
46
+ $id = $this->getRequest()->getParam("id");
47
+ $model = Mage::getModel("manageteam/manageteam")->load($id);
48
+
49
+ $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
50
+ if (!empty($data)) {
51
+ $model->setData($data);
52
+ }
53
+
54
+ Mage::register("manageteam_data", $model);
55
+
56
+ $this->loadLayout();
57
+ $this->_setActiveMenu("manageteam/manageteam");
58
+
59
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
60
+
61
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Manageteam Manager"), Mage::helper("adminhtml")->__("Manageteam Manager"));
62
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Manageteam Description"), Mage::helper("adminhtml")->__("Manageteam Description"));
63
+
64
+
65
+ $this->_addContent($this->getLayout()->createBlock("manageteam/adminhtml_manageteam_edit"))->_addLeft($this->getLayout()->createBlock("manageteam/adminhtml_manageteam_edit_tabs"));
66
+
67
+ $this->renderLayout();
68
+ }
69
+
70
+ public function saveAction() {
71
+
72
+ $post_data = $this->getRequest()->getPost();
73
+
74
+
75
+ if ($post_data) {
76
+
77
+ try {
78
+
79
+ //save image
80
+ try {
81
+
82
+ if ((bool) $post_data['image']['delete'] == 1) {
83
+
84
+ $post_data['image'] = '';
85
+ } else {
86
+
87
+ unset($post_data['image']);
88
+
89
+ if (isset($_FILES)) {
90
+
91
+ if ($_FILES['image']['name']) {
92
+
93
+ if ($this->getRequest()->getParam("id")) {
94
+ $model = Mage::getModel("manageteam/manageteam")->load($this->getRequest()->getParam("id"));
95
+ if ($model->getData('image')) {
96
+ $io = new Varien_Io_File();
97
+ $io->rm(Mage::getBaseDir('media') . DS . implode(DS, explode('/', $model->getData('image'))));
98
+ }
99
+ }
100
+ $path = Mage::getBaseDir('media') . DS . 'manageteam' . DS . 'manageteam' . DS;
101
+ $uploader = new Varien_File_Uploader('image');
102
+ $uploader->setAllowedExtensions(array('jpg', 'png', 'gif'));
103
+ $uploader->setAllowRenameFiles(false);
104
+ $uploader->setFilesDispersion(false);
105
+ $destFile = $path . $_FILES['image']['name'];
106
+ $filename = $uploader->getNewFileName($destFile);
107
+ $uploader->save($path, $filename);
108
+
109
+ $post_data['image'] = 'manageteam/manageteam/' . $filename;
110
+ }
111
+ }
112
+ }
113
+ } catch (Exception $e) {
114
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
115
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
116
+ return;
117
+ }
118
+
119
+ //save image
120
+ $model = Mage::getModel("manageteam/manageteam")
121
+ ->addData($post_data)
122
+ ->setId($this->getRequest()->getParam("id"))
123
+ ->save();
124
+
125
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Manageteam was successfully saved"));
126
+ Mage::getSingleton("adminhtml/session")->setManageteamData(false);
127
+
128
+ if ($this->getRequest()->getParam("back")) {
129
+ $this->_redirect("*/*/edit", array("id" => $model->getId()));
130
+ return;
131
+ }
132
+ $this->_redirect("*/*/");
133
+ return;
134
+ } catch (Exception $e) {
135
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
136
+ Mage::getSingleton("adminhtml/session")->setManageteamData($this->getRequest()->getPost());
137
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
138
+ return;
139
+ }
140
+ }
141
+ $this->_redirect("*/*/");
142
+ }
143
+
144
+ public function deleteAction() {
145
+ if ($this->getRequest()->getParam("id") > 0) {
146
+ try {
147
+ $model = Mage::getModel("manageteam/manageteam");
148
+ $model->setId($this->getRequest()->getParam("id"))->delete();
149
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
150
+ $this->_redirect("*/*/");
151
+ } catch (Exception $e) {
152
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
153
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
154
+ }
155
+ }
156
+ $this->_redirect("*/*/");
157
+ }
158
+
159
+ public function massRemoveAction() {
160
+ try {
161
+ $ids = $this->getRequest()->getPost('manageteam_ids', array());
162
+ foreach ($ids as $id) {
163
+ $model = Mage::getModel("manageteam/manageteam");
164
+ $model->setId($id)->delete();
165
+ }
166
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
167
+ } catch (Exception $e) {
168
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
169
+ }
170
+ $this->_redirect('*/*/');
171
+ }
172
+
173
+ /**
174
+ * Export order grid to CSV format
175
+ */
176
+ public function exportCsvAction() {
177
+ $fileName = 'manageteam.csv';
178
+ $grid = $this->getLayout()->createBlock('manageteam/adminhtml_manageteam_grid');
179
+ $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
180
+ }
181
+
182
+ /**
183
+ * Export order grid to Excel XML format
184
+ */
185
+ public function exportExcelAction() {
186
+ $fileName = 'manageteam.xml';
187
+ $grid = $this->getLayout()->createBlock('manageteam/adminhtml_manageteam_grid');
188
+ $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
189
+ }
190
+
191
+ }
app/code/community/Solwin/Manageteam/controllers/IndexController.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Solwin_Manageteam_IndexController extends Mage_Core_Controller_Front_Action {
4
+
5
+ public function IndexAction() {
6
+
7
+ $this->loadLayout();
8
+ $this->getLayout()->getBlock("head")->setTitle($this->__("Our Team"));
9
+ $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
10
+ $breadcrumbs->addCrumb("home", array(
11
+ "label" => $this->__("Home"),
12
+ "title" => $this->__("Home"),
13
+ "link" => Mage::getBaseUrl()
14
+ ));
15
+
16
+ $breadcrumbs->addCrumb("manage team", array(
17
+ "label" => $this->__("Our Team"),
18
+ "title" => $this->__("Our Team")
19
+ ));
20
+
21
+ $this->renderLayout();
22
+ }
23
+
24
+ }
app/code/community/Solwin/Manageteam/etc/adminhtml.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <manageteamsection translate="title" module="manageteam">
12
+ <title>Manage Team Section</title>
13
+ <sort_order>100</sort_order>
14
+ </manageteamsection>
15
+ </children>
16
+ </config>
17
+ </children>
18
+ </system>
19
+ </children>
20
+ </admin>
21
+ </resources>
22
+ </acl>
23
+ </config>
app/code/community/Solwin/Manageteam/etc/config.xml ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Solwin_Manageteam>
5
+ <version>1.0.0</version>
6
+ </Solwin_Manageteam>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <manageteam>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Solwin_Manageteam</module>
14
+ <frontName>manageteam</frontName>
15
+ </args>
16
+ </manageteam>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <manageteam>
21
+ <file>manageteam.xml</file>
22
+ </manageteam>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <global>
27
+ <helpers>
28
+ <manageteam>
29
+ <class>Solwin_Manageteam_Helper</class>
30
+ </manageteam>
31
+ </helpers>
32
+ <blocks>
33
+ <manageteam>
34
+ <class>Solwin_Manageteam_Block</class>
35
+ </manageteam>
36
+ </blocks>
37
+ <models>
38
+ <manageteam>
39
+ <class>Solwin_Manageteam_Model</class>
40
+ <resourceModel>manageteam_mysql4</resourceModel>
41
+ </manageteam>
42
+ <manageteam_mysql4>
43
+ <class>Solwin_Manageteam_Model_Mysql4</class>
44
+ <entities>
45
+ <manageteam>
46
+ <table>manageteam</table>
47
+ </manageteam>
48
+ </entities>
49
+ </manageteam_mysql4>
50
+ </models>
51
+ <resources>
52
+ <manageteam_setup>
53
+ <setup>
54
+ <module>Solwin_Manageteam</module>
55
+ </setup>
56
+ <connection>
57
+ <use>core_setup</use>
58
+ </connection>
59
+ </manageteam_setup>
60
+ <manageteam_write>
61
+ <connection>
62
+ <use>core_write</use>
63
+ </connection>
64
+ </manageteam_write>
65
+ <manageteam_read>
66
+ <connection>
67
+ <use>core_read</use>
68
+ </connection>
69
+ </manageteam_read>
70
+ </resources>
71
+ </global>
72
+ <adminhtml>
73
+ <menu>
74
+ <manageteam module="manageteam">
75
+ <title>Our Team</title>
76
+ <sort_order>100</sort_order>
77
+ <children>
78
+ <manageteam module="manageteam">
79
+ <title>Manage Our Team</title>
80
+ <sort_order>10</sort_order>
81
+ <action>manageteam/adminhtml_manageteam</action>
82
+ </manageteam>
83
+ </children>
84
+ </manageteam>
85
+ </menu>
86
+ <acl>
87
+ <resources>
88
+ <all>
89
+ <title>Allow Everything</title>
90
+ </all>
91
+ <admin>
92
+ <children>
93
+ <manageteam translate="title" module="manageteam">
94
+ <title>Our Team</title>
95
+ <sort_order>1000</sort_order>
96
+ <children>
97
+ <manageteam translate="title">
98
+ <title>Our Team</title>
99
+ <sort_order>10</sort_order>
100
+ </manageteam>
101
+ </children>
102
+ </manageteam>
103
+ </children>
104
+ </admin>
105
+ </resources>
106
+ </acl>
107
+ <layout>
108
+ <updates>
109
+ <manageteam>
110
+ <file>manageteam.xml</file>
111
+ </manageteam>
112
+ </updates>
113
+ </layout>
114
+ </adminhtml>
115
+ </config>
app/code/community/Solwin/Manageteam/etc/system.xml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <manageteamtab translate="label" module="manageteam">
5
+ <label>SOLWIN</label>
6
+ <sort_order>100</sort_order>
7
+ </manageteamtab>
8
+ </tabs>
9
+ <sections>
10
+ <manageteamsection translate="label" module="manageteam">
11
+ <label>Our Team</label>
12
+ <tab>manageteamtab</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>100</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <manageteamgroup translate="label">
20
+ <label>General</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>0</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ <comment><![CDATA[Use this link to open manageteam page from url- <b>http://yourdomain.com/manageteam</b>]]></comment>
27
+ <fields>
28
+ <enable translate="label">
29
+ <label>Enable</label>
30
+ <frontend_type>select</frontend_type>
31
+ <source_model>adminhtml/system_config_source_yesno</source_model>
32
+ <sort_order>1</sort_order>
33
+ <show_in_default>1</show_in_default>
34
+ <show_in_website>1</show_in_website>
35
+ <show_in_store>1</show_in_store>
36
+ </enable>
37
+ <toplink translate="label">
38
+ <label>Add link to toplink?</label>
39
+ <frontend_type>select</frontend_type>
40
+ <source_model>adminhtml/system_config_source_yesno</source_model>
41
+ <sort_order>2</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ </toplink>
46
+ <topmenu translate="label">
47
+ <label>Add link to topmenu?</label>
48
+ <frontend_type>select</frontend_type>
49
+ <source_model>adminhtml/system_config_source_yesno</source_model>
50
+ <sort_order>3</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>1</show_in_store>
54
+ </topmenu>
55
+ <footerlink translate="label">
56
+ <label>Add link to footer?</label>
57
+ <frontend_type>select</frontend_type>
58
+ <source_model>adminhtml/system_config_source_yesno</source_model>
59
+ <sort_order>4</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ </footerlink>
64
+ </fields>
65
+ </manageteamgroup>
66
+ </groups>
67
+ </manageteamsection>
68
+ </sections>
69
+ </config>
app/code/community/Solwin/Manageteam/sql/manageteam_setup/mysql4-install-1.0.0.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $sql=<<<SQLTEXT
5
+ create table manageteam(manageteam_id int not null auto_increment, name varchar(100),
6
+ image varchar(255),
7
+ designation varchar(255),
8
+ description varchar(255),
9
+ status int(11),
10
+ facebookurl varchar(255),
11
+ googleurl varchar(255),
12
+ twitterurl varchar(255),
13
+ email varchar(255),
14
+ primary key(manageteam_id));
15
+
16
+ SQLTEXT;
17
+
18
+ $installer->run($sql);
19
+ //demo
20
+ //Mage::getModel('core/url_rewrite')->setId(null);
21
+ //demo
22
+ $installer->endSetup();
23
+
app/design/adminhtml/default/default/layout/manageteam.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <manageteam_adminhtml_manageteam_index>
4
+ <reference name="content">
5
+ <block type="manageteam/adminhtml_manageteam" name="manageteam" />
6
+ </reference>
7
+ </manageteam_adminhtml_manageteam_index>
8
+ </layout>
app/design/frontend/base/default/layout/manageteam.xml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <default>
4
+ <reference name="top.links">
5
+ <action method="addLink">
6
+ <label>Our Team</label>
7
+ <url helper="manageteam/getManageteamsUrl"/>
8
+ <title>Our Team</title>
9
+ <prepare />
10
+ <urlParams/>
11
+ <position>120</position>
12
+ </action>
13
+ </reference>
14
+ <reference name="top.menu">
15
+ <block type="manageteam/index" template="manageteam/toplinks.phtml"/>
16
+ </reference>
17
+ <reference name="footer_links">
18
+ <action method="addLink" translate="label title" module="manageteam" ifconfig="manageteamsection/manageteamgroup/enable">
19
+ <label>Our Team</label>
20
+ <url helper="manageteam/getManageteamsUrl" />
21
+ <title>Our Team</title>
22
+ <prepare />
23
+ <urlParams/>
24
+ <position>120</position>
25
+ </action>
26
+ </reference>
27
+ <reference name="head">
28
+ <action method="addItem">
29
+ <type>skin_css</type>
30
+ <name>css/manageteam.css</name>
31
+ </action>
32
+ </reference>
33
+ </default>
34
+ <manageteam_index_index>
35
+ <reference name="root">
36
+ <action method="setTemplate">
37
+ <template>page/1column.phtml</template>
38
+ </action>
39
+ </reference>
40
+ <reference name="content">
41
+ <block type="manageteam/index" name="manageteam_index" template="manageteam/index.phtml"/>
42
+ </reference>
43
+ </manageteam_index_index>
44
+ </layout>
45
+
app/design/frontend/base/default/template/manageteam/index.phtml ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $modname = Mage::app()->getRequest()->getModuleName();
3
+ $controllerName = Mage::app()->getRequest()->getControllerName();
4
+ $actionName = Mage::app()->getRequest()->getActionName();
5
+ $baseUrl = $this->getBaseUrl();
6
+ $redirectPath = $baseUrl . $modname . DS . $controllerName . DS . $actionName;
7
+ $enable = Mage::getStoreConfig('manageteamsection/manageteamgroup/enable');
8
+ if ($enable) {
9
+ if (!empty($this->getRequest()->getParam('id'))):
10
+ $currId = $this->getRequest()->getParam('id');
11
+ $collection = Mage::getModel('manageteam/manageteam')->load($currId);
12
+ $media_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
13
+ $name = $collection->getName();
14
+ $designation = $collection->getDesignation();
15
+ $description = $collection->getDescription();
16
+ $facebookurl = $collection->getFacebookurl();
17
+ $googleurl = $collection->getGoogleurl();
18
+ $twitterurl = $collection->getTwitterurl();
19
+ $email = $collection->getEmail();
20
+ ?>
21
+ <div class="ourteam-view">
22
+ <div class="ourteam-detail">
23
+ <div class="team-block-left">
24
+ <?php if ($collection->getImage()) { ?>
25
+ <img src="<?php echo $media_url . $collection->getImage(); ?>" alt="<?php echo $this->htmlEscape($collection->getName()); ?>" />
26
+ <?php } else { ?>
27
+ <img src="<?php echo $this->getSkinUrl('images/manageteam/manageteam.jpg'); ?>" alt="<?php echo $this->htmlEscape($collection->getName()); ?>" />
28
+ <?php } ?>
29
+ </div>
30
+ <div class="team-block-right">
31
+ <?php if (!empty($name)): ?>
32
+ <h2 class="ourteam-name">
33
+ <b><?php echo Mage::helper('manageteam')->__('Name'); ?>: </b><?php echo $collection->getName(); ?>
34
+ </h2>
35
+ <?php endif; ?>
36
+ <?php if (!empty($designation)): ?>
37
+ <div class="ourteam-short_desc">
38
+ <b><?php echo Mage::helper('manageteam')->__('Designation'); ?>: </b><?php echo $collection->getDesignation(); ?>
39
+ </div>
40
+ <?php endif; ?>
41
+ <?php if (!empty($description)): ?>
42
+ <div class="ourteam-description">
43
+ <b><?php echo Mage::helper('manageteam')->__('Description'); ?>: </b><?php echo $collection->getDescription(); ?>
44
+ </div>
45
+ <?php endif; ?>
46
+
47
+ <?php if (!empty($facebookurl)): ?>
48
+ <div class="ourteam-short_desc">
49
+ <b><?php echo Mage::helper('manageteam')->__('Facebook'); ?>: </b><a target="_new" href="<?php echo $collection->getFacebookurl(); ?>"><?php echo $collection->getFacebookurl(); ?></a>
50
+ </div>
51
+ <?php endif; ?>
52
+ <?php if (!empty($googleurl)): ?>
53
+ <div class="ourteam-short_desc">
54
+ <b><?php echo Mage::helper('manageteam')->__('Google+'); ?>: </b><a target="_new" href="<?php echo $collection->getGoogleurl(); ?>"><?php echo $collection->getGoogleurl(); ?></a>
55
+ </div>
56
+ <?php endif; ?>
57
+ <?php if (!empty($twitterurl)): ?>
58
+ <div class="ourteam-short_desc">
59
+ <b><?php echo Mage::helper('manageteam')->__('Twitter'); ?>: </b><a target="_new" href="<?php echo $collection->getTwitterurl(); ?>"><?php echo $collection->getTwitterurl(); ?></a>
60
+ </div>
61
+ <?php endif; ?>
62
+ <?php if (!empty($email)): ?>
63
+ <div class="ourteam-short_desc">
64
+ <b><?php echo Mage::helper('manageteam')->__('Email'); ?>: </b><a href="mailto:<?php echo $collection->getEmail(); ?>"><?php echo $collection->getEmail(); ?></a>
65
+ </div>
66
+ <?php endif; ?>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ <div class="back-btn">
71
+ <a class="read-more" href="<?php echo $baseUrl . $modname; ?>" title="Back">
72
+ <?php echo __('Back'); ?>
73
+ </a>
74
+ </div>
75
+ <?php else: ?>
76
+ <div class="page-title ourteam-title">
77
+ <h1><?php echo Mage::helper('manageteam')->__('Our Team') ?></h1>
78
+ </div>
79
+ <?php
80
+ //get collection of manageteam
81
+ $collection = $this->getCollection();
82
+ $size = $collection->getSize();
83
+ $media_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
84
+ ?>
85
+ <?php if ($size > 0): ?>
86
+ <div class="ourteam-list-container">
87
+ <?php echo $this->getPagerHtml(); ?>
88
+ <ul class="team-wrapper">
89
+ <?php foreach ($collection as $teamData): ?>
90
+ <li class="ourteam-list-item">
91
+ <div class="team-mem-img"
92
+ <a href="<?php echo $redirectPath . '/id/' . $teamData->getManageteam_id(); ?>" title="<?php echo $this->htmlEscape($teamData->getName()) ?>">
93
+ <?php if ($teamData->getImage()): ?>
94
+ <img class="member_avatar " src="<?php echo $media_url . $teamData->getImage(); ?>" alt="<?php echo $teamData->getName(); ?>" width="190" height="190"/>
95
+ <?php else: ?>
96
+ <img class="member_avatar" src="<?php echo $this->getSkinUrl('images/manageteam/manageteam.jpg') ?>" alt="<?php echo $teamData->getName(); ?>" width="190" height="190"/>
97
+ <?php endif; ?>
98
+ </a>
99
+ </div>
100
+ <h2 class="full-name">
101
+ <?php echo $teamData->getName(); ?>
102
+ </h2>
103
+ <?php if ($teamData->getDesignation()): ?>
104
+ <div id="greg_description">(<?php echo $teamData->getDesignation(); ?>)</div>
105
+ <?php endif; ?>
106
+ <div class="social-icon">
107
+ <?php if ($teamData->getFacebookurl()): ?>
108
+ <a target="_new" href="<?php echo $teamData->getFacebookurl(); ?>"><img src="<?php echo $this->getSkinUrl('images/manageteam/facebook.png') ?>"></a>
109
+ <?php endif; ?>
110
+ <?php if ($teamData->getGoogleurl()): ?>
111
+ <a target="_new" href="<?php echo $teamData->getGoogleurl(); ?>"><img src="<?php echo $this->getSkinUrl('images/manageteam/google-plus.png') ?>"></a>
112
+ <?php endif; ?>
113
+ <?php if ($teamData->getTwitterurl()): ?>
114
+ <a target="_new" href="<?php echo $teamData->getTwitterurl(); ?>"><img src="<?php echo $this->getSkinUrl('images/manageteam/twitter.png') ?>"></a>
115
+ <?php endif; ?>
116
+ <?php if ($teamData->getEmail()): ?>
117
+ <a target="_new" href="mailto:<?php echo $teamData->getEmail(); ?>"><img src="<?php echo $this->getSkinUrl('images/manageteam/mail.png') ?>"></a>
118
+ <?php endif; ?>
119
+ </div>
120
+ <?php if ($teamData->getDescription()): ?>
121
+ <a class="read-more" href="<?php echo $redirectPath . '/id/' . $teamData->getManageteam_id(); ?>" title="<?php echo $this->htmlEscape($teamData->getName()) ?>">
122
+ <?php echo __('Read More'); ?>
123
+ </a>
124
+ <?php endif; ?>
125
+ </li>
126
+ <?php endforeach; ?>
127
+ <?php
128
+ ?>
129
+ </ul>
130
+ <?php echo $this->getPagerHtml(); ?>
131
+ </div>
132
+ <?php else : ?>
133
+ <?php echo Mage::helper('manageteam')->__('There are no team member found at this moment'); ?>
134
+ <?php endif; ?>
135
+ <?php endif; ?>
136
+ <?php } ?>
app/design/frontend/base/default/template/manageteam/toplinks.phtml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php if (Mage::getStoreConfig('manageteamsection/manageteamgroup/enable') && Mage::getStoreConfig('manageteamsection/manageteamgroup/topmenu')): ?>
3
+ <div id="manageteam_container" style="display: none">
4
+ <li class="level0 nav-3 last level-top">
5
+ <a href="<?php echo $this->getUrl('manageteam') ?>">
6
+ <span><?php echo $this->__('Our Team') ?></span>
7
+ </a>
8
+ </li>
9
+ </div>
10
+ <script type="text/javascript">
11
+ var menu = $('nav');
12
+ if (menu) {
13
+ menu.insert($('manageteam_container').innerHTML);
14
+ }
15
+ </script>
16
+ <?php endif; ?>
app/etc/modules/Solwin_Manageteam.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Solwin_Manageteam>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>1.0.0</version>
8
+ </Solwin_Manageteam>
9
+ </modules>
10
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Solwin_Manageteam</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Manage Team extension is used to display team member's information on the website with ease.</summary>
10
+ <description>It manages all the basic details of the team members like employee name, image and description, social profile, email etc from the backend panel and display all employee details in frontend. Add Manage Team link in front end footer that display all team members list.</description>
11
+ <notes>Manage Team extension is used to display team member's information on the website with ease.</notes>
12
+ <authors><author><name>Sanjay Dabhoya</name><user>solwin</user><email>stdabhoya@yahoo.com</email></author></authors>
13
+ <date>2015-08-03</date>
14
+ <time>09:55:45</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Solwin_Manageteam.xml" hash="6a0a77464285274b74e66ea3e9cfccaa"/></dir></target><target name="magecommunity"><dir name="Solwin"><dir name="Manageteam"><dir name="Block"><dir name="Adminhtml"><dir name="Manageteam"><dir name="Edit"><file name="Form.php" hash="a27ef5db33e44d89619c554a2d5ca748"/><dir name="Tab"><file name="Form.php" hash="db20267748575efc0311a73bb47678d2"/></dir><file name="Tabs.php" hash="f6efd72c6aaba75f2e40f9c841611dbc"/></dir><file name="Edit.php" hash="f79b5476752b82b03b57903ed2e25325"/><file name="Grid.php" hash="c826538cd3babfd75f775bbb52230b27"/></dir><file name="Manageteam.php" hash="a563969ee104cfada2c50dbedd70b0e8"/><dir name="Renderer"><file name="Image.php" hash="56b39c7853ecba12af9b7aab96fd70d1"/></dir></dir><file name="Index.php" hash="e89897b9fcaeee2acaa492e34c9cc161"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ManageteamController.php" hash="a313071f203c4aff8bf312d36c0e4cc0"/></dir><file name="IndexController.php" hash="de4449a6f50e2cdd423f49980409af84"/></dir><dir name="etc"><file name="adminhtml.xml" hash="dc19fa0c1fb3c3b5f4d49f8c498673b0"/><file name="config.xml" hash="16b9e856245648a2ef1a740efab3a833"/><file name="system.xml" hash="473cec776005406cf83bfa3a79617cdf"/></dir><dir name="Helper"><file name="Data.php" hash="35a2f60bb2abea4a5059ea4454c5419e"/></dir><dir name="Model"><file name="Manageteam.php" hash="7af144e511bac1e7a2f209cac9ce0c97"/><dir name="Mysql4"><dir name="Manageteam"><file name="Collection.php" hash="e5b257066432045bd4b509de4377e1f6"/></dir><file name="Manageteam.php" hash="06d2d50fc1510b5d089089b5460b2d75"/></dir></dir><dir name="sql"><dir name="manageteam_setup"><file name="mysql4-install-1.0.0.php" hash="9677dee5b1876b3e46a694fa1dc87bfb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="manageteam.xml" hash="da3e600551874cc45c06746d7607188b"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="manageteam.xml" hash="7504e47424fbca84444501f098bae4b6"/></dir><dir name="template"><dir name="manageteam"><file name="index.phtml" hash="1dc8fda050686c0de20888c14c485f65"/><file name="toplinks.phtml" hash="572c37ea6852593acebf2cfbdbbbb5f6"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="manageteam.css" hash="8c1359102a448f0e244edc5bf0283938"/></dir><dir name="images"><dir name="manageteam"><file name="facebook.png" hash="79cab086ed8c49a91389c0ba6242aa59"/><file name="google-plus.png" hash="23d4c6ed2e4ad47aceee9db1eb93e6df"/><file name="mail.png" hash="93e80db59ee1ccdd69dad358f80fa15e"/><file name="manageteam.jpg" hash="5899668cf07da547e66436fc87bacc19"/><file name="twitter.png" hash="035a083e619bc79e1c0998bed704047e"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="manageteam"><file name="manageteam.jpg" hash="5899668cf07da547e66436fc87bacc19"/></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>
skin/adminhtml/default/default/images/manageteam/manageteam.jpg ADDED
Binary file
skin/frontend/base/default/css/manageteam.css ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .team-wrapper{
2
+ display: inline-block;
3
+ }
4
+ .team-wrapper li {
5
+ display: inline-block;
6
+ text-align: center;
7
+ float: left;
8
+ max-height:366px;
9
+ min-height: 310px!important;
10
+ margin: 10px 8px;
11
+ width: 187px;
12
+ padding: 10px;
13
+ }
14
+ .team-wrapper li.ourteam-list-item .team-mem-img {
15
+ position: relative;
16
+ overflow: hidden;
17
+ border: 2px solid #999999;
18
+ border-radius: 50%;
19
+ }
20
+ .team-wrapper li.ourteam-list-item a img {
21
+ display: inline-block;
22
+ max-width: 100%;
23
+ height: auto;
24
+ }
25
+ .team-wrapper li.ourteam-list-item:hover .team-mem-img {
26
+ border-color: #de5400;
27
+ }
28
+ .team-wrapper li.ourteam-list-item:hover .team-mem-img img {
29
+ transform: scale(1.1);
30
+ }
31
+ .team-wrapper li:hover a{
32
+ text-decoration: none;
33
+ }
34
+ .team-wrapper li .member_avatar {
35
+ max-width: 100%;
36
+ text-align: center;
37
+ display: inherit;
38
+ }
39
+ h2.full-name {
40
+ font-size: 16px;
41
+ margin: 10px 0px 5px;
42
+ max-height: 20px;
43
+ overflow: hidden;
44
+ color: #2f2f2f;
45
+ }
46
+ h2.full-name a{
47
+ color: #000;
48
+ text-decoration: none;
49
+ }
50
+ .team-wrapper li #greg_description {
51
+ max-height: 45px;
52
+ overflow: hidden;
53
+ color: #0a263c;
54
+ }
55
+ .ourteam-detail .ourteam-short_desc{
56
+ float: left;
57
+ margin-left: 0;
58
+ margin-top: 5px;
59
+ width: 100%;
60
+ }
61
+ .ourteam-description{
62
+ float: left;
63
+ margin-top: 5px;
64
+ }
65
+ .read-more {
66
+ background: #999999;
67
+ border-radius: 2px;
68
+ color: #fff;
69
+ display: inline-block;
70
+ margin: 15px 0;
71
+ padding: 5px 10px;
72
+ text-decoration: none;
73
+ font-weight: bold;
74
+ }
75
+ .read-more:hover{
76
+ color: #fff;
77
+ background: #de5400;
78
+ }
79
+ .ourteam-view {
80
+ padding: 20px;
81
+ display: inline-block;
82
+ width: 95%;
83
+ margin-bottom: 5px;
84
+ }
85
+ .team-img{
86
+ float: left;
87
+ width: auto;
88
+ margin-right: 20px;
89
+ text-align: -webkit-center;
90
+ border: 1px solid rgba(204, 204, 204, 0.41);
91
+ }
92
+ .team-img img{
93
+ max-width: 100%;
94
+ }
95
+ .team-block-left{
96
+ float: left;
97
+ width: 35%;
98
+ }
99
+ .team-block-right{
100
+ float: left;
101
+ width: 65%;
102
+ }
103
+ .back-btn{
104
+ float: left;
105
+ width: 100%;
106
+ }
107
+ .social-icon {
108
+ padding-top: 5px;
109
+ }
skin/frontend/base/default/images/manageteam/facebook.png ADDED
Binary file
skin/frontend/base/default/images/manageteam/google-plus.png ADDED
Binary file
skin/frontend/base/default/images/manageteam/mail.png ADDED
Binary file
skin/frontend/base/default/images/manageteam/manageteam.jpg ADDED
Binary file
skin/frontend/base/default/images/manageteam/twitter.png ADDED
Binary file