Skip to content

Commit feb3baf

Browse files
author
Abhishek Kumar
committed
Remove module config links from settings page
1 parent 4d11fc5 commit feb3baf

File tree

7 files changed

+11
-97
lines changed

7 files changed

+11
-97
lines changed

config/xml/themes/default.xml

-2
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,11 @@
150150
<hook module="wkfooterpaymentinfoblockcontainer" hook="displayFooter" position="4"/>
151151
<hook module="wkfooteraboutblock" hook="displayFooterMostLeftBlock" position="3"/>
152152
<hook module="wkfooteraboutblock" hook="displayFooterPaymentInfo" position="1"/>
153-
<hook module="wkfooterpaymentblock" hook="displayAddModuleSettingLink" position="6"/>
154153
<hook module="wkfooterpaymentblock" hook="displayFooterPaymentInfo" position="2"/>
155154
<hook module="wkfooternotificationblock" hook="displayFooter" position="5"/>
156155
<hook module="blocknavigationmenu" hook="displayTop" position="2"/>
157156
<hook module="blocknavigationmenu" hook="displayFooter" position="6"/>
158157
<hook module="blocknavigationmenu" hook="actionObjectLanguageAddAfter" position="6"/>
159-
<hook module="blocknavigationmenu" hook="displayAddModuleSettingLink" position="7"/>
160158
<hook module="blocknavigationmenu" hook="displayDefaultNavigationHook" position="1"/>
161159
<hook module="blocknavigationmenu" hook="displayNavigationHook" position="1"/>
162160
<hook module="blocknewsletter" hook="Header" position="3"/>

modules/blocknavigationmenu/blocknavigationmenu.php

+5-10
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public function __construct()
4141
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
4242
}
4343

44+
public function getContent()
45+
{
46+
Tools::redirectAdmin($this->context->link->getAdminLink('AdminCustomNavigationLinkSetting'));
47+
}
48+
4449
public function hookTop($params)
4550
{
4651
return $this->hookDisplayTopSubSecondaryBlock($params);
@@ -98,15 +103,6 @@ public function hookActionObjectLanguageAddAfter($params)
98103
}
99104
}
100105

101-
public function hookDisplayAddModuleSettingLink()
102-
{
103-
$this->context->smarty->assign(
104-
'custom_navigation_link_setting_url',
105-
$this->context->link->getAdminLink('AdminCustomNavigationLinkSetting')
106-
);
107-
return $this->display(__FILE__, 'customNavigationLinkSetting.tpl');
108-
}
109-
110106
public function install()
111107
{
112108
$objModuleDb = new WkBlockNavigationMenuDb();
@@ -128,7 +124,6 @@ public function registerModuleHooks()
128124
return $this->registerHook(
129125
array (
130126
'footer',
131-
'displayAddModuleSettingLink',
132127
'actionObjectLanguageAddAfter',
133128
'displayDefaultNavigationHook',
134129
'displayNavigationHook',

modules/blocknavigationmenu/views/templates/hook/customNavigationLinkSetting.tpl

-28
This file was deleted.

modules/hotelreservationsystem/controllers/admin/AdminHotelConfigurationSettingController.php

-7
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ public function renderView()
2929
'order_restrict_setting_link' => $this->context->link->getAdminLink('AdminOrderRestrictSettings'),
3030
'additional_demand_setting_link' => $this->context->link->getAdminLink('AdminRoomTypeGlobalDemand'),
3131
);
32-
// Reviews setting link if only productcomment module is enabled
33-
if (Module::isEnabled('productcomments')) {
34-
$review_module_instance = Module::getInstanceByName('productcomments');
35-
$this->tpl_view_vars['htl_reviews_conf_link'] = $this->context->link->getAdminLink('AdminModules', true).
36-
'&configure='.urlencode($review_module_instance->name).'&tab_module='.$review_module_instance->tab.
37-
'&module_name='.urlencode($review_module_instance->name);
38-
}
3932

4033
return parent::renderView();
4134
}

modules/hotelreservationsystem/views/templates/admin/hotel_configuration_setting/helpers/view/view.tpl

-12
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@
1010
<i class="icon-question-circle"></i>
1111
</a>
1212
</div>
13-
{* Reviews setting link if only productcomment module is enabled *}
14-
{if isset($htl_reviews_conf_link) && $htl_reviews_conf_link}
15-
<div class="btn-group setting-link-div col-sm-3 col-xs-12">
16-
<a type="button" href="{$htl_reviews_conf_link}" class="setting-link btn btn-default col-sm-10 col-xs-10">
17-
<span class="col-sm-2 col-xs-2"><i class="icon-star"></i></span>
18-
<span class="setting-title col-sm-10 col-xs-10">{l s='Hotel Reviews' mod='hotelreservationsystem'}</span>
19-
</a>
20-
<a tabindex="0" class="btn btn-default col-sm-2 col-xs-2" role="button" data-toggle="popover" data-trigger="focus" title="{l s='Hotel Reviews Settings' mod='hotelreservationsystem'}" data-content="{l s='Configure Reviews setting using this link.' mod='hotelreservationsystem'}" data-placement="bottom">
21-
<i class="icon-question-circle"></i>
22-
</a>
23-
</div>
24-
{/if}
2513
<div class="btn-group setting-link-div col-sm-3 col-xs-12">
2614
<a type="button" href="{$order_restrict_setting_link}" class="setting-link btn btn-default col-sm-10 col-xs-10">
2715
<span class="col-sm-2 col-xs-2"><i class="icon-list-alt"></i></span>

modules/wkfooterpaymentblock/views/templates/hook/footerPaymentSettingLink.tpl

-28
This file was deleted.

modules/wkfooterpaymentblock/wkfooterpaymentblock.php

+6-10
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ public function __construct()
4444
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
4545
}
4646

47+
public function getContent()
48+
{
49+
Tools::redirectAdmin($this->context->link->getAdminLink('AdminFooterPaymentBlockSetting'));
50+
}
51+
4752
public function hookFooter($params)
4853
{
4954
$objPaymentBlockInfo = new WkFooterPaymentBlockInfo();
@@ -58,15 +63,7 @@ public function hookdisplayFooterPaymentInfo($params)
5863
{
5964
return $this->hookFooter($params);
6065
}
61-
62-
public function hookDisplayAddModuleSettingLink()
63-
{
64-
$footerPaymentBlockLink = $this->context->link->getAdminLink('AdminFooterPaymentBlockSetting');
65-
$this->context->smarty->assign('footerPaymentBlockLink', $footerPaymentBlockLink);
66-
67-
return $this->display(__FILE__, 'footerPaymentSettingLink.tpl');
68-
}
69-
66+
7067
public function callInstallTab()
7168
{
7269
//Controllers which are to be used in this modules but we have not to create tab for those controllers...
@@ -117,7 +114,6 @@ public function install()
117114
}
118115
if (!parent::install()
119116
||!$this->registerHook('displayFooterPaymentInfo')
120-
||!$this->registerHook('displayAddModuleSettingLink')
121117
|| !$this->callInstallTab()
122118
|| !$this->insertDefaultModuleData()
123119
) {

0 commit comments

Comments
 (0)