Version Notes
===== 1.0.3 =====
* Replaced "hostname" with a execution environment variable dropdown
* Added SERVER_NAME as a default
* Added style.css for notification bar
* Added configuration tab in System > Configuration
* Fixed wrong translation xml path
===== 1.0.2 =====
* Wrong XML syntax in bars.xml.
* Simplified main.js with pure JavaScript. No Prototype anymore.
* Minimized main.js
* Hide bar until DOM is loaded.
===== 1.0.1 =====
* Display each notification bar for a specific admin user role.
===== 1.0.0 =====
* Initial version of this module
Download this release
Release Info
Developer | Tobias Forkel |
Extension | forkel_bars |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- app/code/community/Forkel/Bars/Block/Adminhtml/Notification.php +1 -3
- app/code/community/Forkel/Bars/Block/Adminhtml/Server/Edit/Form.php +14 -5
- app/code/community/Forkel/Bars/Block/Adminhtml/Server/Grid.php +10 -3
- app/code/community/Forkel/Bars/Changelog.txt +7 -0
- app/code/community/Forkel/Bars/Helper/Data.php +40 -5
- app/code/community/Forkel/Bars/Model/Index.php +10 -3
- app/code/community/Forkel/Bars/Model/Server/Environment.php +29 -0
- app/code/community/Forkel/Bars/data/forkel_bars_setup/data-install-1.0.0.php +12 -12
- app/code/community/Forkel/Bars/etc/adminhtml.xml +12 -0
- app/code/community/Forkel/Bars/etc/config.xml +10 -3
- app/code/community/Forkel/Bars/etc/system.xml +49 -0
- app/code/community/Forkel/Bars/sql/forkel_bars_setup/install-1.0.0.php +2 -2
- app/code/community/Forkel/Bars/sql/forkel_bars_setup/upgrade-1.0.0-1.0.1.php +12 -9
- app/code/community/Forkel/Bars/sql/forkel_bars_setup/upgrade-1.0.2-1.0.3.php +37 -0
- app/design/adminhtml/default/default/layout/forkel/bars.xml +3 -0
- app/design/adminhtml/default/default/template/forkel/bars/adminhtml/notification.phtml +0 -6
- package.xml +16 -5
- skin/adminhtml/base/default/forkel/bars/styles.css +7 -0
app/code/community/Forkel/Bars/Block/Adminhtml/Notification.php
CHANGED
@@ -12,9 +12,7 @@ class Forkel_Bars_Block_Adminhtml_Notification extends Mage_Core_Block_Template
|
|
12 |
{
|
13 |
public function getNotification()
|
14 |
{
|
15 |
-
return Mage::getSingleton(Forkel_Bars_Helper_Data::MODEL_INDEX)->
|
16 |
-
Mage::helper(Forkel_Bars_Helper_Data::MODULE_KEY)->getHostname()
|
17 |
-
);
|
18 |
}
|
19 |
|
20 |
/**
|
12 |
{
|
13 |
public function getNotification()
|
14 |
{
|
15 |
+
return Mage::getSingleton(Forkel_Bars_Helper_Data::MODEL_INDEX)->loadByEnvironmentVariable();
|
|
|
|
|
16 |
}
|
17 |
|
18 |
/**
|
app/code/community/Forkel/Bars/Block/Adminhtml/Server/Edit/Form.php
CHANGED
@@ -63,11 +63,19 @@ class Forkel_Bars_Block_Adminhtml_Server_Edit_Form extends Mage_Adminhtml_Block_
|
|
63 |
'required' => true
|
64 |
));
|
65 |
|
66 |
-
$fieldset->addField('
|
67 |
-
'name' => '
|
68 |
-
'label' => $this->__('
|
69 |
-
'title' => $this->__('
|
70 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
));
|
72 |
|
73 |
$form->setValues($model->getData());
|
@@ -77,3 +85,4 @@ class Forkel_Bars_Block_Adminhtml_Server_Edit_Form extends Mage_Adminhtml_Block_
|
|
77 |
return parent::_prepareForm();
|
78 |
}
|
79 |
}
|
|
63 |
'required' => true
|
64 |
));
|
65 |
|
66 |
+
$fieldset->addField('environment_variable', 'select', array(
|
67 |
+
'name' => 'environment_variable',
|
68 |
+
'label' => $this->__('Environment Variable'),
|
69 |
+
'title' => $this->__('Environment Variable'),
|
70 |
+
'values' => Mage::getSingleton('forkel_bars/server_environment')->getOptionArray(),
|
71 |
+
'note' => $this->__('The execution environment variable for server identification. Add more variables in <a href="%s"> System > Configuration > Forkel Bars > Server</a>.', $this->getUrl('adminhtml/system_config/edit/section/forkel_bars')),
|
72 |
+
));
|
73 |
+
|
74 |
+
$fieldset->addField('environment_value', 'text', array(
|
75 |
+
'name' => 'environment_value',
|
76 |
+
'label' => $this->__('Environment Value'),
|
77 |
+
'title' => $this->__('Environment Value'),
|
78 |
+
'note' => $this->__('The value that should match the selected variable.'),
|
79 |
));
|
80 |
|
81 |
$form->setValues($model->getData());
|
85 |
return parent::_prepareForm();
|
86 |
}
|
87 |
}
|
88 |
+
|
app/code/community/Forkel/Bars/Block/Adminhtml/Server/Grid.php
CHANGED
@@ -72,10 +72,17 @@ class Forkel_Bars_Block_Adminhtml_Server_Grid extends Mage_Adminhtml_Block_Widge
|
|
72 |
)
|
73 |
);
|
74 |
|
75 |
-
$this->addColumn('
|
76 |
array(
|
77 |
-
'header' => $this->__('
|
78 |
-
'index' => '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
)
|
80 |
);
|
81 |
|
72 |
)
|
73 |
);
|
74 |
|
75 |
+
$this->addColumn('environment_variable',
|
76 |
array(
|
77 |
+
'header' => $this->__('Environment Variable'),
|
78 |
+
'index' => 'environment_variable'
|
79 |
+
)
|
80 |
+
);
|
81 |
+
|
82 |
+
$this->addColumn('environment_value',
|
83 |
+
array(
|
84 |
+
'header' => $this->__('Environment Value'),
|
85 |
+
'index' => 'environment_value'
|
86 |
)
|
87 |
);
|
88 |
|
app/code/community/Forkel/Bars/Changelog.txt
CHANGED
@@ -7,6 +7,13 @@
|
|
7 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
8 |
*/
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
===== 1.0.2 =====
|
11 |
* Wrong XML syntax in bars.xml.
|
12 |
* Simplified main.js with pure JavaScript. No Prototype anymore.
|
7 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
8 |
*/
|
9 |
|
10 |
+
===== 1.0.3 =====
|
11 |
+
* Replaced "hostname" with a execution environment variable dropdown
|
12 |
+
* Added SERVER_NAME as a default
|
13 |
+
* Added style.css for notification bar
|
14 |
+
* Added configuration tab in System > Configuration
|
15 |
+
* Fixed wrong translation xml path
|
16 |
+
|
17 |
===== 1.0.2 =====
|
18 |
* Wrong XML syntax in bars.xml.
|
19 |
* Simplified main.js with pure JavaScript. No Prototype anymore.
|
app/code/community/Forkel/Bars/Helper/Data.php
CHANGED
@@ -15,18 +15,53 @@ class Forkel_Bars_Helper_Data extends Mage_Core_Helper_Abstract
|
|
15 |
|
16 |
const MODEL_INDEX = 'forkel_bars/index';
|
17 |
const MODEL_SERVER = 'forkel_bars/server';
|
|
|
18 |
|
19 |
/**
|
20 |
-
* Return
|
21 |
*
|
22 |
* @return array
|
23 |
*/
|
24 |
-
public function
|
25 |
{
|
26 |
-
$
|
27 |
-
$url = Mage::getSingleton('core/url')->parseUrl($url);
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
31 |
|
32 |
/**
|
15 |
|
16 |
const MODEL_INDEX = 'forkel_bars/index';
|
17 |
const MODEL_SERVER = 'forkel_bars/server';
|
18 |
+
const MODEL_SERVER_ENVIRONMENT = 'forkel_bars/server_environment';
|
19 |
|
20 |
/**
|
21 |
+
* Return filtered $_SERVER array
|
22 |
*
|
23 |
* @return array
|
24 |
*/
|
25 |
+
public function getServerEnvFiltered()
|
26 |
{
|
27 |
+
$filter = explode(',', Mage::getStoreConfig('forkel_bars/server/variables'));
|
|
|
28 |
|
29 |
+
if (count($filter) > 0)
|
30 |
+
{
|
31 |
+
return array_intersect_key($_SERVER, array_flip($filter));
|
32 |
+
}
|
33 |
+
|
34 |
+
return $_SERVER;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Return environment variables
|
39 |
+
*
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
public function getEnvironment()
|
43 |
+
{
|
44 |
+
$options = array();
|
45 |
+
$env = $this->getServerEnvFiltered();
|
46 |
+
|
47 |
+
array_push($options, array(
|
48 |
+
'value' => '',
|
49 |
+
'label' => $this->__('Select a server variable')
|
50 |
+
));
|
51 |
+
|
52 |
+
if (is_array($env)) {
|
53 |
+
|
54 |
+
foreach ($env as $index => $value) {
|
55 |
+
|
56 |
+
$options[] = array(
|
57 |
+
'value' => trim($index),
|
58 |
+
'label' => sprintf('%s ( %s )', $index, $value)
|
59 |
+
);
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
return $options;
|
65 |
}
|
66 |
|
67 |
/**
|
app/code/community/Forkel/Bars/Model/Index.php
CHANGED
@@ -16,12 +16,14 @@ class Forkel_Bars_Model_Index extends Mage_Core_Model_Abstract
|
|
16 |
}
|
17 |
|
18 |
/**
|
19 |
-
* Load collection filtered by
|
20 |
*
|
21 |
* @return Forkel_Bars_Model_Index
|
22 |
*/
|
23 |
-
public function
|
24 |
{
|
|
|
|
|
25 |
$session = Mage::getSingleton('admin/session');
|
26 |
$role_id = implode('', $session->getUser()->getRoles());
|
27 |
|
@@ -36,8 +38,13 @@ class Forkel_Bars_Model_Index extends Mage_Core_Model_Abstract
|
|
36 |
)
|
37 |
);
|
38 |
|
39 |
-
$
|
|
|
|
|
|
|
|
|
40 |
|
41 |
return $collection->getFirstItem();
|
42 |
}
|
43 |
}
|
|
16 |
}
|
17 |
|
18 |
/**
|
19 |
+
* Load collection filtered by environment variable and status
|
20 |
*
|
21 |
* @return Forkel_Bars_Model_Index
|
22 |
*/
|
23 |
+
public function loadByEnvironmentVariable($status = 1)
|
24 |
{
|
25 |
+
$env = Mage::helper(Forkel_Bars_Helper_Data::MODULE_KEY)->getServerEnvFiltered();
|
26 |
+
|
27 |
$session = Mage::getSingleton('admin/session');
|
28 |
$role_id = implode('', $session->getUser()->getRoles());
|
29 |
|
38 |
)
|
39 |
);
|
40 |
|
41 |
+
$keys = array_keys($env);
|
42 |
+
$values = array_values($env);
|
43 |
+
|
44 |
+
$collection->addFieldToFilter('environment_variable', array('finset', $keys));
|
45 |
+
$collection->addFieldToFilter('environment_value', array('finset', $values));
|
46 |
|
47 |
return $collection->getFirstItem();
|
48 |
}
|
49 |
}
|
50 |
+
|
app/code/community/Forkel/Bars/Model/Server/Environment.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Forkel Bars
|
4 |
+
*
|
5 |
+
* @category Forkel
|
6 |
+
* @package Forkel_Bars
|
7 |
+
* @copyright Copyright (c) 2015 Tobias Forkel (http://www.tobiasforkel.de)
|
8 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Forkel_Bars_Model_Server_Environment extends Mage_Core_Model_Abstract
|
12 |
+
{
|
13 |
+
protected function _construct()
|
14 |
+
{
|
15 |
+
$this->_init(Forkel_Bars_Helper_Data::MODEL_SERVER_ENVIRONMENT);
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Return all collection as an option array
|
20 |
+
*
|
21 |
+
* @return array
|
22 |
+
*/
|
23 |
+
public function getOptionArray()
|
24 |
+
{
|
25 |
+
$helper = Mage::helper('forkel_bars');
|
26 |
+
|
27 |
+
return $helper->getEnvironment();
|
28 |
+
}
|
29 |
+
}
|
app/code/community/Forkel/Bars/data/forkel_bars_setup/data-install-1.0.0.php
CHANGED
@@ -17,8 +17,8 @@ if ($model->getCollection()->count() == 0)
|
|
17 |
array(
|
18 |
'name' => 'Noooope!',
|
19 |
'description' => 'Your boss will fire you right away.',
|
20 |
-
'color' => '#
|
21 |
-
'color_background' => '#
|
22 |
'server_id' => 4,
|
23 |
'status' => 1,
|
24 |
'admin_role_id' => 1
|
@@ -26,8 +26,8 @@ if ($model->getCollection()->count() == 0)
|
|
26 |
array(
|
27 |
'name' => 'Please!',
|
28 |
'description' => 'This environment is tested and ready for deployment.',
|
29 |
-
'color' => '#
|
30 |
-
'color_background' => '#
|
31 |
'server_id' => 3,
|
32 |
'status' => 1,
|
33 |
'admin_role_id' => 1,
|
@@ -35,8 +35,8 @@ if ($model->getCollection()->count() == 0)
|
|
35 |
array(
|
36 |
'name' => 'Well ...',
|
37 |
'description' => 'Ask your team and project manager before do any changes.',
|
38 |
-
'color' => '#
|
39 |
-
'color_background' => '#
|
40 |
'server_id' => 2,
|
41 |
'status' => 1,
|
42 |
'admin_role_id' => 1
|
@@ -44,8 +44,8 @@ if ($model->getCollection()->count() == 0)
|
|
44 |
array(
|
45 |
'name' => 'Good!',
|
46 |
'description' => ' You can do whatever you want.',
|
47 |
-
'color' => '#
|
48 |
-
'color_background' => '#
|
49 |
'server_id' => 1,
|
50 |
'status' => 1,
|
51 |
'admin_role_id' => 1
|
@@ -67,22 +67,22 @@ if ($model->getCollection()->count() == 0)
|
|
67 |
array(
|
68 |
'name' => 'Local Environment',
|
69 |
'description' => 'Dictum viverra suspendisse hendrerit quam pellentesque pharetra, elementum sit urna, morbi scelerisque.',
|
70 |
-
'
|
71 |
),
|
72 |
array(
|
73 |
'name' => 'Staging Environment',
|
74 |
'description' => 'Diharetra, elementum sit urna, morbi scelerisque.',
|
75 |
-
'
|
76 |
),
|
77 |
array(
|
78 |
'name' => 'Preview Environment',
|
79 |
'description' => 'Sed ut, amet nam, cras in arcu. Mollis aenean pede tortor fusce mattis rutrum, non sollicitudin.',
|
80 |
-
'
|
81 |
),
|
82 |
array(
|
83 |
'name' => 'Production Environment',
|
84 |
'description' => 'Mollis aenean pede tortor fusce mattis rutrum, non sollicitudin.',
|
85 |
-
'
|
86 |
),
|
87 |
);
|
88 |
|
17 |
array(
|
18 |
'name' => 'Noooope!',
|
19 |
'description' => 'Your boss will fire you right away.',
|
20 |
+
'color' => '#fff',
|
21 |
+
'color_background' => '#d2552e',
|
22 |
'server_id' => 4,
|
23 |
'status' => 1,
|
24 |
'admin_role_id' => 1
|
26 |
array(
|
27 |
'name' => 'Please!',
|
28 |
'description' => 'This environment is tested and ready for deployment.',
|
29 |
+
'color' => '#fff',
|
30 |
+
'color_background' => '#8a6d3b',
|
31 |
'server_id' => 3,
|
32 |
'status' => 1,
|
33 |
'admin_role_id' => 1,
|
35 |
array(
|
36 |
'name' => 'Well ...',
|
37 |
'description' => 'Ask your team and project manager before do any changes.',
|
38 |
+
'color' => '#fff',
|
39 |
+
'color_background' => '#31708f',
|
40 |
'server_id' => 2,
|
41 |
'status' => 1,
|
42 |
'admin_role_id' => 1
|
44 |
array(
|
45 |
'name' => 'Good!',
|
46 |
'description' => ' You can do whatever you want.',
|
47 |
+
'color' => '#fff',
|
48 |
+
'color_background' => '#3c763d',
|
49 |
'server_id' => 1,
|
50 |
'status' => 1,
|
51 |
'admin_role_id' => 1
|
67 |
array(
|
68 |
'name' => 'Local Environment',
|
69 |
'description' => 'Dictum viverra suspendisse hendrerit quam pellentesque pharetra, elementum sit urna, morbi scelerisque.',
|
70 |
+
'environment_value' => 'local.server.com'
|
71 |
),
|
72 |
array(
|
73 |
'name' => 'Staging Environment',
|
74 |
'description' => 'Diharetra, elementum sit urna, morbi scelerisque.',
|
75 |
+
'environment_value' => 'staging.server.com'
|
76 |
),
|
77 |
array(
|
78 |
'name' => 'Preview Environment',
|
79 |
'description' => 'Sed ut, amet nam, cras in arcu. Mollis aenean pede tortor fusce mattis rutrum, non sollicitudin.',
|
80 |
+
'environment_value' => 'preview.server.com'
|
81 |
),
|
82 |
array(
|
83 |
'name' => 'Production Environment',
|
84 |
'description' => 'Mollis aenean pede tortor fusce mattis rutrum, non sollicitudin.',
|
85 |
+
'environment_value' => 'www.server.com'
|
86 |
),
|
87 |
);
|
88 |
|
app/code/community/Forkel/Bars/etc/adminhtml.xml
CHANGED
@@ -27,6 +27,13 @@
|
|
27 |
</server>
|
28 |
</children>
|
29 |
</forkel_bars>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
</children>
|
31 |
</system>
|
32 |
</children>
|
@@ -46,6 +53,11 @@
|
|
46 |
<sort_order>10</sort_order>
|
47 |
<action>adminhtml/forkel_bars_server/index</action>
|
48 |
</server>
|
|
|
|
|
|
|
|
|
|
|
49 |
</children>
|
50 |
</forkel_bars>
|
51 |
</children>
|
27 |
</server>
|
28 |
</children>
|
29 |
</forkel_bars>
|
30 |
+
<config>
|
31 |
+
<children>
|
32 |
+
<forkel_bars translate="title" module="forkel_bars">
|
33 |
+
<title>Forkel Bars</title>
|
34 |
+
</forkel_bars>
|
35 |
+
</children>
|
36 |
+
</config>
|
37 |
</children>
|
38 |
</system>
|
39 |
</children>
|
53 |
<sort_order>10</sort_order>
|
54 |
<action>adminhtml/forkel_bars_server/index</action>
|
55 |
</server>
|
56 |
+
<settings translate="title">
|
57 |
+
<title>Settings</title>
|
58 |
+
<sort_order>20</sort_order>
|
59 |
+
<action>adminhtml/system_config/edit/section/forkel_bars</action>
|
60 |
+
</settings>
|
61 |
</children>
|
62 |
</forkel_bars>
|
63 |
</children>
|
app/code/community/Forkel/Bars/etc/config.xml
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
<config>
|
14 |
<modules>
|
15 |
<Forkel_Bars>
|
16 |
-
<version>1.0.
|
17 |
</Forkel_Bars>
|
18 |
</modules>
|
19 |
<global>
|
@@ -73,12 +73,19 @@
|
|
73 |
</layout>
|
74 |
<translate>
|
75 |
<modules>
|
76 |
-
<
|
77 |
<files>
|
78 |
<default>Forkel_Bars.csv</default>
|
79 |
</files>
|
80 |
-
</
|
81 |
</modules>
|
82 |
</translate>
|
83 |
</adminhtml>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
</config>
|
13 |
<config>
|
14 |
<modules>
|
15 |
<Forkel_Bars>
|
16 |
+
<version>1.0.3</version>
|
17 |
</Forkel_Bars>
|
18 |
</modules>
|
19 |
<global>
|
73 |
</layout>
|
74 |
<translate>
|
75 |
<modules>
|
76 |
+
<forkel_bars>
|
77 |
<files>
|
78 |
<default>Forkel_Bars.csv</default>
|
79 |
</files>
|
80 |
+
</forkel_bars>
|
81 |
</modules>
|
82 |
</translate>
|
83 |
</adminhtml>
|
84 |
+
<default>
|
85 |
+
<forkel_bars>
|
86 |
+
<server>
|
87 |
+
<variables>SERVER_NAME,HTTP_HOST,SERVER_ADDR,MAGE_IS_DEVELOPER_MODE</variables>
|
88 |
+
</server>
|
89 |
+
</forkel_bars>
|
90 |
+
</default>
|
91 |
</config>
|
app/code/community/Forkel/Bars/etc/system.xml
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Forkel Bars
|
5 |
+
*
|
6 |
+
* @category Forkel
|
7 |
+
* @package Forkel_Bars
|
8 |
+
* @copyright Copyright (c) 2016 Tobias Forkel (http://www.tobiasforkel.de)
|
9 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
10 |
+
*/
|
11 |
+
-->
|
12 |
+
|
13 |
+
<config>
|
14 |
+
<tabs>
|
15 |
+
<forkel_bars translate="label" module="forkel_bars">
|
16 |
+
<label>Forkel Bars</label>
|
17 |
+
<sort_order>9000</sort_order>
|
18 |
+
</forkel_bars>
|
19 |
+
</tabs>
|
20 |
+
<sections>
|
21 |
+
<forkel_bars translate="label" module="forkel_bars">
|
22 |
+
<label>Forkel Bars</label>
|
23 |
+
<tab>general</tab>
|
24 |
+
<sort_order>100</sort_order>
|
25 |
+
<show_in_default>1</show_in_default>
|
26 |
+
<show_in_website>1</show_in_website>
|
27 |
+
<show_in_store>1</show_in_store>
|
28 |
+
<groups>
|
29 |
+
<server translate="label">
|
30 |
+
<label>Server</label>
|
31 |
+
<sort_order>10</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
<fields>
|
36 |
+
<variables translate="label">
|
37 |
+
<label>Server Variables</label>
|
38 |
+
<frontend_type>text</frontend_type>
|
39 |
+
<sort_order>10</sort_order>
|
40 |
+
<show_in_default>1</show_in_default>
|
41 |
+
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>1</show_in_store>
|
43 |
+
</variables>
|
44 |
+
</fields>
|
45 |
+
</server>
|
46 |
+
</groups>
|
47 |
+
</forkel_bars>
|
48 |
+
</sections>
|
49 |
+
</config>
|
app/code/community/Forkel/Bars/sql/forkel_bars_setup/install-1.0.0.php
CHANGED
@@ -8,7 +8,7 @@ $installer->startSetup();
|
|
8 |
* Create table 'forkel_bars_index'
|
9 |
*/
|
10 |
$table = $installer->getTable('forkel_bars/index');
|
11 |
-
if (
|
12 |
{
|
13 |
$table = $installer->getConnection()
|
14 |
->newTable($table)
|
@@ -49,7 +49,7 @@ if ($installer->getConnection()->isTableExists($table) != true)
|
|
49 |
* Create table 'forkel_bars_server'
|
50 |
*/
|
51 |
$table = $installer->getTable('forkel_bars/server');
|
52 |
-
if (
|
53 |
{
|
54 |
$table = $installer->getConnection()
|
55 |
->newTable($table)
|
8 |
* Create table 'forkel_bars_index'
|
9 |
*/
|
10 |
$table = $installer->getTable('forkel_bars/index');
|
11 |
+
if (!$installer->getConnection()->isTableExists($table))
|
12 |
{
|
13 |
$table = $installer->getConnection()
|
14 |
->newTable($table)
|
49 |
* Create table 'forkel_bars_server'
|
50 |
*/
|
51 |
$table = $installer->getTable('forkel_bars/server');
|
52 |
+
if (!$installer->getConnection()->isTableExists($table))
|
53 |
{
|
54 |
$table = $installer->getConnection()
|
55 |
->newTable($table)
|
app/code/community/Forkel/Bars/sql/forkel_bars_setup/upgrade-1.0.0-1.0.1.php
CHANGED
@@ -9,14 +9,17 @@ $installer->startSetup();
|
|
9 |
*/
|
10 |
$table = $installer->getTable('forkel_bars/index');
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
21 |
|
22 |
$installer->endSetup();
|
9 |
*/
|
10 |
$table = $installer->getTable('forkel_bars/index');
|
11 |
|
12 |
+
if (!$installer->getConnection()->tableColumnExists($table, 'admin_role_id'))
|
13 |
+
{
|
14 |
+
$installer->getConnection()
|
15 |
+
->addColumn($table,
|
16 |
+
'admin_role_id',
|
17 |
+
array(
|
18 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
19 |
+
'nullable' => true,
|
20 |
+
'comment' => 'Admin Role'
|
21 |
+
)
|
22 |
+
);
|
23 |
+
}
|
24 |
|
25 |
$installer->endSetup();
|
app/code/community/Forkel/Bars/sql/forkel_bars_setup/upgrade-1.0.2-1.0.3.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
4 |
+
$installer = $this;
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Create table 'forkel_bars_index'
|
9 |
+
*/
|
10 |
+
$table = $installer->getTable('forkel_bars/server');
|
11 |
+
|
12 |
+
if ($installer->getConnection()->tableColumnExists($table, 'hostname'))
|
13 |
+
{
|
14 |
+
$installer->getConnection()
|
15 |
+
->changeColumn($table,
|
16 |
+
'hostname',
|
17 |
+
'environment_value',
|
18 |
+
array(
|
19 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
20 |
+
'length' => 255,
|
21 |
+
'comment' => 'Server Environment Value'
|
22 |
+
)
|
23 |
+
);
|
24 |
+
}
|
25 |
+
|
26 |
+
$installer->getConnection()
|
27 |
+
->addColumn($table,
|
28 |
+
'environment_variable',
|
29 |
+
array(
|
30 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
31 |
+
'length' => 255,
|
32 |
+
'default' => 'HTTP_HOST',
|
33 |
+
'comment' => 'Server Environment Variable'
|
34 |
+
)
|
35 |
+
);
|
36 |
+
|
37 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/forkel/bars.xml
CHANGED
@@ -2,6 +2,9 @@
|
|
2 |
<layout>
|
3 |
<default>
|
4 |
<reference name="head">
|
|
|
|
|
|
|
5 |
<action method="addJs"><script>community/forkel_bars/main.min.js</script></action>
|
6 |
</reference>
|
7 |
<reference name="notifications">
|
2 |
<layout>
|
3 |
<default>
|
4 |
<reference name="head">
|
5 |
+
<action method="addCss">
|
6 |
+
<name>forkel/bars/styles.css</name>
|
7 |
+
</action>
|
8 |
<action method="addJs"><script>community/forkel_bars/main.min.js</script></action>
|
9 |
</reference>
|
10 |
<reference name="notifications">
|
app/design/adminhtml/default/default/template/forkel/bars/adminhtml/notification.phtml
CHANGED
@@ -4,12 +4,7 @@
|
|
4 |
|
5 |
<style>
|
6 |
#forkel_bars_adminhtml_notification {
|
7 |
-
display: none;
|
8 |
color: <?php echo $notification->getColor() ?>;
|
9 |
-
overflow: hidden;
|
10 |
-
font-size: 1.2em;
|
11 |
-
text-align: left;
|
12 |
-
padding: 1em 1.5em;
|
13 |
background: repeating-linear-gradient(
|
14 |
45deg,
|
15 |
<?php echo $this->getBackgroundLighter($notification->getColorBackground(), '20') ?>,
|
@@ -27,4 +22,3 @@
|
|
27 |
</div>
|
28 |
|
29 |
<?php endif; ?>
|
30 |
-
|
4 |
|
5 |
<style>
|
6 |
#forkel_bars_adminhtml_notification {
|
|
|
7 |
color: <?php echo $notification->getColor() ?>;
|
|
|
|
|
|
|
|
|
8 |
background: repeating-linear-gradient(
|
9 |
45deg,
|
10 |
<?php echo $this->getBackgroundLighter($notification->getColorBackground(), '20') ?>,
|
22 |
</div>
|
23 |
|
24 |
<?php endif; ?>
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>forkel_bars</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://opensource.org/licenses/OSL-3.0">Open Software License v. 3.0 (OSL-3.0)</license>
|
7 |
<channel>community</channel>
|
@@ -14,6 +14,10 @@
|
|
14 |
<br />
|
15 |
<br />
|
16 |

|
|
|
|
|
|
|
|
|
17 |
<img src="//www.tobiasforkel.de/public/magento/forkel_bars/version/1.0/screenshots/backend/backend_bar_list_overview.gif" />
|
18 |
<br />
|
19 |
<br />
|
@@ -61,7 +65,14 @@
|
|
61 |

|
62 |
<h3>Support</h3>
|
63 |
<p>This module is provided as-is with no warranty or support. Purchase a Warranty and Support Package on <a href="http://www.tobiasforkel.de">http://www.tobiasforkel.de</a> starting from $50.</p></description>
|
64 |
-
<notes>===== 1.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
* Wrong XML syntax in bars.xml.
|
66 |
* Simplified main.js with pure JavaScript. No Prototype anymore.
|
67 |
* Minimized main.js
|
@@ -73,9 +84,9 @@
|
|
73 |
===== 1.0.0 =====
|
74 |
* Initial version of this module</notes>
|
75 |
<authors><author><name>Tobias Forkel</name><user>tforkel</user><email>magento@tobiasforkel.de</email></author></authors>
|
76 |
-
<date>2016-
|
77 |
-
<time>
|
78 |
-
<contents><target name="magecommunity"><dir name="Forkel"><dir name="Bars"><dir name="Block"><dir name="Adminhtml"><dir name="Index"><dir name="Edit"><file name="Form.php" hash="98183881e27d929e1a5b43aaaecd611c"/></dir><file name="Edit.php" hash="0103c7c1c3459fce8605ed20abbd6e78"/><file name="Grid.php" hash="5a2dbf65cda4161d3b4d077302ec2e9f"/></dir><file name="Index.php" hash="525509035f5c44c2d8adc0967a052415"/><file name="Notification.php" hash="
|
79 |
<compatible/>
|
80 |
<dependencies><required><php><min>5.4.0</min><max>5.6.16</max></php></required></dependencies>
|
81 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>forkel_bars</name>
|
4 |
+
<version>1.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://opensource.org/licenses/OSL-3.0">Open Software License v. 3.0 (OSL-3.0)</license>
|
7 |
<channel>community</channel>
|
14 |
<br />
|
15 |
<br />
|
16 |

|
17 |
+
<img src="//www.tobiasforkel.de/public/magento/forkel_bars/version/1.0/screenshots/backend/backend_bar_edit.gif" />
|
18 |
+
<br />
|
19 |
+
<br />
|
20 |
+

|
21 |
<img src="//www.tobiasforkel.de/public/magento/forkel_bars/version/1.0/screenshots/backend/backend_bar_list_overview.gif" />
|
22 |
<br />
|
23 |
<br />
|
65 |

|
66 |
<h3>Support</h3>
|
67 |
<p>This module is provided as-is with no warranty or support. Purchase a Warranty and Support Package on <a href="http://www.tobiasforkel.de">http://www.tobiasforkel.de</a> starting from $50.</p></description>
|
68 |
+
<notes>===== 1.0.3 =====
|
69 |
+
* Replaced "hostname" with a execution environment variable dropdown
|
70 |
+
* Added SERVER_NAME as a default
|
71 |
+
* Added style.css for notification bar
|
72 |
+
* Added configuration tab in System > Configuration
|
73 |
+
* Fixed wrong translation xml path
|
74 |
+

|
75 |
+
===== 1.0.2 =====
|
76 |
* Wrong XML syntax in bars.xml.
|
77 |
* Simplified main.js with pure JavaScript. No Prototype anymore.
|
78 |
* Minimized main.js
|
84 |
===== 1.0.0 =====
|
85 |
* Initial version of this module</notes>
|
86 |
<authors><author><name>Tobias Forkel</name><user>tforkel</user><email>magento@tobiasforkel.de</email></author></authors>
|
87 |
+
<date>2016-09-25</date>
|
88 |
+
<time>12:54:03</time>
|
89 |
+
<contents><target name="magecommunity"><dir name="Forkel"><dir name="Bars"><dir name="Block"><dir name="Adminhtml"><dir name="Index"><dir name="Edit"><file name="Form.php" hash="98183881e27d929e1a5b43aaaecd611c"/></dir><file name="Edit.php" hash="0103c7c1c3459fce8605ed20abbd6e78"/><file name="Grid.php" hash="5a2dbf65cda4161d3b4d077302ec2e9f"/></dir><file name="Index.php" hash="525509035f5c44c2d8adc0967a052415"/><file name="Notification.php" hash="02aa79bb46584a3872a2cd6589e4ed8b"/><dir name="Server"><dir name="Edit"><file name="Form.php" hash="9ea81e92caf12a69bae34cca54cd0e92"/></dir><file name="Edit.php" hash="27810453296f514b1f381dbb1841ce43"/><file name="Grid.php" hash="f63d1ee50ae199d0a9270f51b3383cea"/></dir><file name="Server.php" hash="c993f4e4212e3b3ca3513ebb501def4a"/></dir></dir><file name="Changelog.txt" hash="d9cec18b9a81e8aae152e76289f93c03"/><dir name="controllers"><dir name="Adminhtml"><dir name="Forkel"><dir name="Bars"><file name="IndexController.php" hash="c6caff3224fd46a067e92b2a69e6f3fe"/><file name="ServerController.php" hash="1da8c0ef1465fdad96aaed34a74818ee"/></dir></dir></dir></dir><dir name="data"><dir name="forkel_bars_setup"><file name="data-install-1.0.0.php" hash="f7e401cecb403245a2ea001322d4f03d"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="835cff67082882a422825db514311675"/><file name="config.xml" hash="0550d413bb59cc6249dde3f27436589d"/><file name="system.xml" hash="5de53c92eb106ebb75ef7c448eb594dc"/></dir><dir name="Helper"><file name="Data.php" hash="e392727850db60b445e9ae775dbd4990"/></dir><dir name="Model"><file name="Index.php" hash="11721f1834493e8dbc875d07c38a6a3d"/><dir name="Resource"><dir name="Index"><file name="Collection.php" hash="1c9b8c4157f07777058eea128c683426"/></dir><file name="Index.php" hash="16f51afe18dba2f4bf1146ae1bf2a73a"/><dir name="Server"><file name="Collection.php" hash="da06239337f1b586285df29fd308200e"/></dir><file name="Server.php" hash="11141fe5a4646eda013b85e2e1ec7d07"/></dir><file name="Roles.php" hash="037b30f230e133eb28f73bcb44b7a7db"/><dir name="Server"><file name="Environment.php" hash="8765a66608ebebe69900d4ba5f1bf0b5"/></dir><file name="Server.php" hash="1b373759e53211ad488d2b5bf1ba2344"/></dir><dir name="sql"><dir name="forkel_bars_setup"><file name="install-1.0.0.php" hash="cc207c4656ef681ea86ac9961174a612"/><file name="upgrade-1.0.0-1.0.1.php" hash="7e40cd39ec5c7884e1934bd918b62e8d"/><file name="upgrade-1.0.2-1.0.3.php" hash="40ea2a36f4bc1e8ba1da6708bcbcf7aa"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="forkel"><file name="bars.xml" hash="7de21a059c6ea03101ec5e9c71667cfa"/></dir></dir><dir name="template"><dir name="forkel"><dir name="bars"><dir><dir name="adminhtml"><file name="notification.phtml" hash="8a64a0237618e6b0418f67ac4209fe9a"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Forkel_Bars.xml" hash="1b36f833bbcf2b4061f775a0a95dbdfe"/></dir></target><target name="mage"><dir name="js"><dir name="community"><dir name="forkel_bars"><file name="main.min.js" hash="9fc965c32ea6ad226f4add7c4ddaae11"/></dir></dir></dir></target><target name="magelocal"><dir name="de_DE"><file name="Forkel_Bars.csv" hash=""/></dir><dir name="en_US"><file name="Forkel_Bars.csv" hash=""/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="forkel"><dir name="bars"><file name="styles.css" hash="5f44a4fed9fc7cce1d8ea964eb3c0e46"/></dir></dir></dir></dir></dir></target></contents>
|
90 |
<compatible/>
|
91 |
<dependencies><required><php><min>5.4.0</min><max>5.6.16</max></php></required></dependencies>
|
92 |
</package>
|
skin/adminhtml/base/default/forkel/bars/styles.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#forkel_bars_adminhtml_notification {
|
2 |
+
display: none;
|
3 |
+
font-size: 1.2em;
|
4 |
+
overflow: hidden;
|
5 |
+
text-align: left;
|
6 |
+
padding: 1em 1.5em;
|
7 |
+
}
|