Skip to content

Commit

Permalink
Fix on action path hint
Browse files Browse the repository at this point in the history
  • Loading branch information
vpietri committed Jul 22, 2016
1 parent 76e4090 commit c695655
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
19 changes: 10 additions & 9 deletions Controller/Action/ConfigUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public function execute()

if($configScope=='auto') {
switch ($configKey) {
case 'hints':
case 'template_hints_admin':
case 'template_hints_storefront':
case 'template_hints_blocks':
case 'translate':
$configScope = 'stores';
break;
Expand Down Expand Up @@ -100,14 +102,13 @@ public function execute()


switch ($configKey) {
case 'hints':
case 'template_hints_admin':
case 'template_hints_storefront':
case 'template_hints_blocks':

$configValue = ($this->_qdbHelper->getConfig('dev/debug/template_hints', $configScope, $configScopeId)) ? 0 : 1;

$this->_resourceConfig->saveConfig('dev/debug/template_hints', $configValue, $configScope, $configScopeId);
$this->_resourceConfig->saveConfig('dev/debug/template_hints_storefront', $configValue, $configScope, $configScopeId);
$this->_resourceConfig->saveConfig('dev/debug/template_hints_blocks', $configValue, $configScope, $configScopeId);
$output = "Hints set " . ($configValue ? 'On' : 'Off');
$configValue = ($this->_qdbHelper->getConfig('dev/debug/' . $configKey, $configScope, $configScopeId)) ? 0 : 1;
$this->_resourceConfig->saveConfig('dev/debug/' . $configKey , $configValue, $configScope, $configScopeId);
$output = ucwords(str_replace('_', ' ', $configKey)) . " set " . ($configValue ? 'On' : 'Off');
break;
case 'translate':

Expand Down Expand Up @@ -142,4 +143,4 @@ public function execute()
}

}
}
}
3 changes: 2 additions & 1 deletion doc/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ Changelog: Quick Developer Toolbar for Magento2

0.1.8
* Add plugin list tab
* Fix bug on action hints. Thanks to [adpeate](https://github.com/vpietri/magento2-developer-quickdevbar/pull/7)

0.1.7
* Configuration section improvement
* Code refactoring
* Authorize IPv6 localhost
* Authorize IPv6 localhost. Thanks to [Dayssam](https://github.com/vpietri/magento2-developer-quickdevbar/pull/5)

0.1.6.1
* Fix compatibility bugs with Magento 2.1
Expand Down
16 changes: 13 additions & 3 deletions view/base/templates/tab/action.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
?>
<table class="qdn_table">
<tr>
<th>Template hints</th>
<td><button type="button" onClick="javascript:actionConfig('hints', 'toggle', 'auto');return false;" class="qdb-action">Toggle</button></td>
<td id="process-hints"></td>
<th>Template Path Hints for Storefront</th>
<td><button type="button" onClick="javascript:actionConfig('template_hints_storefront', 'toggle', 'auto');return false;" class="qdb-action">Toggle</button></td>
<td id="process-template_hints_storefront"></td>
</tr>
<tr>
<th>Template Path Hints for Admin</th>
<td><button type="button" onClick="javascript:actionConfig('template_hints_admin', 'toggle', 'auto');return false;" class="qdb-action">Toggle</button></td>
<td id="process-template_hints_admin"></td>
</tr>
<tr>
<th>Add Block Names to Hints</th>
<td><button type="button" onClick="javascript:actionConfig('template_hints_blocks', 'toggle', 'auto');return false;" class="qdb-action">Toggle</button></td>
<td id="process-template_hints_blocks"></td>
</tr>
<tr>
<th>Translate inline</th>
Expand Down

0 comments on commit c695655

Please sign in to comment.