Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove module config links from Hotel Reservation System > Settings page #357

Merged
merged 1 commit into from
May 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -44,6 +44,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 @@ -58,15 +63,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 @@ -117,7 +114,6 @@ public function install()
}
if (!parent::install()
||!$this->registerHook('displayFooterPaymentInfo')
||!$this->registerHook('displayAddModuleSettingLink')
|| !$this->callInstallTab()
|| !$this->insertDefaultModuleData()
) {
Expand Down