95 lines
4.5 KiB
XML
95 lines
4.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<modification>
|
|
<name>Poll Widget [NAT]</name>
|
|
<id>poll_widget_nat</id>
|
|
<code>poll_widget_nat_od_ua</code>
|
|
<version>1.1.0</version>
|
|
<author>NAT</author>
|
|
<link>mailto:info@nat.od.ua</link>
|
|
|
|
<file path="admin/controller/common/column_left.php">
|
|
<operation error="skip">
|
|
<search><![CDATA[if ($this->user->hasPermission('access', 'catalog/product')) {]]></search>
|
|
<add position="before"><![CDATA[
|
|
$this->load->model('setting/setting');
|
|
if ($this->config->get('module_poll_widget_nat_status')) {
|
|
$nat_pos = $this->config->get('module_poll_widget_nat_menu_position');
|
|
if ($nat_pos == 'sidebar' || $nat_pos == 'both') {
|
|
if ($this->user->hasPermission('access', 'module/poll_widget_nat')) {
|
|
$nat_item = array(
|
|
'name' => 'Poll Widget',
|
|
'href' => $this->url->link('module/poll_widget_nat', 'token=' . $this->session->data['token'], true),
|
|
'children' => array()
|
|
);
|
|
|
|
$nat_menu_index = -1;
|
|
if (isset($data['menus'])) {
|
|
foreach ($data['menus'] as $k => $menu) {
|
|
if (isset($menu['id']) && $menu['id'] == 'menu-nat') {
|
|
$nat_menu_index = $k;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
if ($nat_menu_index > -1) {
|
|
$data['menus'][$nat_menu_index]['children'][] = $nat_item;
|
|
} else {
|
|
$data['menus'][] = array(
|
|
'id' => 'menu-nat',
|
|
'icon' => 'fa-rocket fw',
|
|
'name' => '[NAT] Modules',
|
|
'href' => '',
|
|
'children' => array($nat_item)
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]]></add>
|
|
</operation>
|
|
</file>
|
|
|
|
<file path="admin/controller/common/header.php">
|
|
<operation error="skip">
|
|
<search><![CDATA[$data['logout'] = $this->url->link('common/logout']]></search>
|
|
<add position="before"><![CDATA[
|
|
if (!isset($data['nat_menus'])) {
|
|
$data['nat_menus'] = array();
|
|
}
|
|
$this->load->model('setting/setting');
|
|
if ($this->config->get('module_poll_widget_nat_status')) {
|
|
$nat_pos = $this->config->get('module_poll_widget_nat_menu_position');
|
|
if ($nat_pos == 'header' || $nat_pos == 'both') {
|
|
if ($this->user->hasPermission('access', 'module/poll_widget_nat')) {
|
|
$data['nat_menus'][] = array(
|
|
'name' => 'Poll Widget',
|
|
'href' => $this->url->link('module/poll_widget_nat', 'token=' . $this->session->data['token'], true)
|
|
);
|
|
}
|
|
}
|
|
}
|
|
]]></add>
|
|
</operation>
|
|
</file>
|
|
|
|
<file path="admin/view/template/common/header.tpl">
|
|
<operation error="skip">
|
|
<search><![CDATA[<li><a href="<?php echo $logout; ?>"]]></search>
|
|
<add position="before"><![CDATA[
|
|
<?php if (isset($nat_menus) && $nat_menus && empty($nat_menu_rendered)) { ?>
|
|
<?php $nat_menu_rendered = true; ?>
|
|
<li class="dropdown" id="nat-ecosystem-menu">
|
|
<a class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-rocket fa-lg" style="color:#e74c3c;"></i> <span class="hidden-xs hidden-sm hidden-md">[NAT]</span> <span class="caret"></span></a>
|
|
<ul class="dropdown-menu dropdown-menu-right" id="nat-ecosystem-list">
|
|
<li class="dropdown-header">Ecosystem [NAT]</li>
|
|
<?php foreach ($nat_menus as $n_menu) { ?>
|
|
<li><a href="<?php echo $n_menu['href']; ?>"><i class="fa fa-angle-right"></i> <?php echo $n_menu['name']; ?></a></li>
|
|
<?php } ?>
|
|
</ul>
|
|
</li>
|
|
<?php } ?>
|
|
]]></add>
|
|
</operation>
|
|
</file>
|
|
</modification> |