Skip to content

Commit

Permalink
1.6.7 - remove unneeded js link (fixes #20)
Browse files Browse the repository at this point in the history
  • Loading branch information
edalzell committed Apr 5, 2019
1 parent 46e90e0 commit f162326
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions PowerTools/PowerToolsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,17 @@ class PowerToolsListener extends Listener
* @var array
*/
public $events = [
'cp.add_to_head' => 'powerUp',
'cp.nav.created' => 'nav',
'cp.add_to_head' => 'powerUp',
'cp.nav.created' => 'nav',
];

/**
* Initialize Aggregator assets
* Load css
* @return string css link
*/
public function powerUp()
{
$html = $this->js->tag('powertools');
$html .= $this->css->tag('powertools');
return $html;
return $this->css->tag('powertools');
}

/**
Expand All @@ -39,14 +37,15 @@ public function nav($nav)
// Only super users can see the PHP info
/** @var \Statamic\Data\Users\User $user */
$user = User::getCurrent();
if ($user && $user->isSuper())
{
if ($user && $user->isSuper()) {
$nav->addTo(
'tools',
Nav::item('PHP Info')->route('phpinfo')->icon('info'));
Nav::item('PHP Info')->route('phpinfo')->icon('info')
);
$nav->addTo(
'tools',
Nav::item('Logs')->route('logs')->icon('book'));
Nav::item('Logs')->route('logs')->icon('book')
);
}
}
}
2 changes: 1 addition & 1 deletion PowerTools/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: PowerTools
version: 1.6.6
version: 1.6.7
description: Rebuild your search indexes, cache & asset presets, see your PHP Info and your log
url: https://github.com/edalzell/statamic-powertools
developer: Erin Dalzell
Expand Down

0 comments on commit f162326

Please sign in to comment.