Skip to content

Commit

Permalink
Merge pull request #357 from abhishek-webkul/gli-778
Browse files Browse the repository at this point in the history
Remove module config links from Hotel Reservation System > Settings page
  • Loading branch information
rohit053 authored May 5, 2022
2 parents 5a2a3b3 + feb3baf commit 6719a6a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 97 deletions.
2 changes: 0 additions & 2 deletions config/xml/themes/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,11 @@
<hook module="wkfooterpaymentinfoblockcontainer" hook="displayFooter" position="4"/>
<hook module="wkfooteraboutblock" hook="displayFooterMostLeftBlock" position="3"/>
<hook module="wkfooteraboutblock" hook="displayFooterPaymentInfo" position="1"/>
<hook module="wkfooterpaymentblock" hook="displayAddModuleSettingLink" position="6"/>
<hook module="wkfooterpaymentblock" hook="displayFooterPaymentInfo" position="2"/>
<hook module="wkfooternotificationblock" hook="displayFooter" position="5"/>
<hook module="blocknavigationmenu" hook="displayTop" position="2"/>
<hook module="blocknavigationmenu" hook="displayFooter" position="6"/>
<hook module="blocknavigationmenu" hook="actionObjectLanguageAddAfter" position="6"/>
<hook module="blocknavigationmenu" hook="displayAddModuleSettingLink" position="7"/>
<hook module="blocknavigationmenu" hook="displayDefaultNavigationHook" position="1"/>
<hook module="blocknavigationmenu" hook="displayNavigationHook" position="1"/>
<hook module="blocknewsletter" hook="Header" position="3"/>
Expand Down
15 changes: 5 additions & 10 deletions modules/blocknavigationmenu/blocknavigationmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ public function __construct()
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
}

public function getContent()
{
Tools::redirectAdmin($this->context->link->getAdminLink('AdminCustomNavigationLinkSetting'));
}

public function hookTop($params)
{
return $this->hookDisplayTopSubSecondaryBlock($params);
Expand Down Expand Up @@ -98,15 +103,6 @@ public function hookActionObjectLanguageAddAfter($params)
}
}

public function hookDisplayAddModuleSettingLink()
{
$this->context->smarty->assign(
'custom_navigation_link_setting_url',
$this->context->link->getAdminLink('AdminCustomNavigationLinkSetting')
);
return $this->display(__FILE__, 'customNavigationLinkSetting.tpl');
}

public function install()
{
$objModuleDb = new WkBlockNavigationMenuDb();
Expand All @@ -128,7 +124,6 @@ public function registerModuleHooks()
return $this->registerHook(
array (
'footer',
'displayAddModuleSettingLink',
'actionObjectLanguageAddAfter',
'displayDefaultNavigationHook',
'displayNavigationHook',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ public function renderView()
'order_restrict_setting_link' => $this->context->link->getAdminLink('AdminOrderRestrictSettings'),
'additional_demand_setting_link' => $this->context->link->getAdminLink('AdminRoomTypeGlobalDemand'),
);
// Reviews setting link if only productcomment module is enabled
if (Module::isEnabled('productcomments')) {
$review_module_instance = Module::getInstanceByName('productcomments');
$this->tpl_view_vars['htl_reviews_conf_link'] = $this->context->link->getAdminLink('AdminModules', true).
'&configure='.urlencode($review_module_instance->name).'&tab_module='.$review_module_instance->tab.
'&module_name='.urlencode($review_module_instance->name);
}

return parent::renderView();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@
<i class="icon-question-circle"></i>
</a>
</div>
{* Reviews setting link if only productcomment module is enabled *}
{if isset($htl_reviews_conf_link) && $htl_reviews_conf_link}
<div class="btn-group setting-link-div col-sm-3 col-xs-12">
<a type="button" href="{$htl_reviews_conf_link}" class="setting-link btn btn-default col-sm-10 col-xs-10">
<span class="col-sm-2 col-xs-2"><i class="icon-star"></i></span>
<span class="setting-title col-sm-10 col-xs-10">{l s='Hotel Reviews' mod='hotelreservationsystem'}</span>
</a>
<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">
<i class="icon-question-circle"></i>
</a>
</div>
{/if}
<div class="btn-group setting-link-div col-sm-3 col-xs-12">
<a type="button" href="{$order_restrict_setting_link}" class="setting-link btn btn-default col-sm-10 col-xs-10">
<span class="col-sm-2 col-xs-2"><i class="icon-list-alt"></i></span>
Expand Down

This file was deleted.

16 changes: 6 additions & 10 deletions modules/wkfooterpaymentblock/wkfooterpaymentblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public function __construct()
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
}

public function getContent()
{
Tools::redirectAdmin($this->context->link->getAdminLink('AdminFooterPaymentBlockSetting'));
}

public function hookFooter($params)
{
$objPaymentBlockInfo = new WkFooterPaymentBlockInfo();
Expand All @@ -57,15 +62,7 @@ public function hookdisplayFooterPaymentInfo($params)
{
return $this->hookFooter($params);
}

public function hookDisplayAddModuleSettingLink()
{
$footerPaymentBlockLink = $this->context->link->getAdminLink('AdminFooterPaymentBlockSetting');
$this->context->smarty->assign('footerPaymentBlockLink', $footerPaymentBlockLink);

return $this->display(__FILE__, 'footerPaymentSettingLink.tpl');
}


public function callInstallTab()
{
//Controllers which are to be used in this modules but we have not to create tab for those controllers...
Expand Down Expand Up @@ -102,7 +99,6 @@ public function install()
if (!parent::install()
|| !$objFooterPaymentBlockDb->createTables()
||!$this->registerHook('displayFooterPaymentInfo')
||!$this->registerHook('displayAddModuleSettingLink')
|| !$this->callInstallTab()
|| !$this->insertDefaultModuleData()
) {
Expand Down

0 comments on commit 6719a6a

Please sign in to comment.