Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-08-15 14:25:24 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-08-15 14:25:24 +0400
commitfe239518110ab6815ab1e7591ab6ad8f5f5750f5 (patch)
tree0e44066b57c2846978691124bb3f879cd29ff049
parent7145523b0bd4fa191543ac3d41687b3ae5f77a11 (diff)
refs #5994 add marketplace link to user menu and actually highlight settings in the user menu only if the user is on the user settings for instance to prevent Marketplace and Settings is highlight but also because it does not really make sense otherwise2.5.0-rc4
-rw-r--r--plugins/CoreHome/angularjs/menudropdown/menudropdown.less1
-rw-r--r--plugins/CoreHome/templates/_topBarTopMenu.twig4
-rw-r--r--plugins/CorePluginsAdmin/Menu.php19
3 files changed, 20 insertions, 4 deletions
diff --git a/plugins/CoreHome/angularjs/menudropdown/menudropdown.less b/plugins/CoreHome/angularjs/menudropdown/menudropdown.less
index df9b8d3cd3..4128615387 100644
--- a/plugins/CoreHome/angularjs/menudropdown/menudropdown.less
+++ b/plugins/CoreHome/angularjs/menudropdown/menudropdown.less
@@ -51,7 +51,6 @@
&.active {
background-color: @color-silver-l80;
- cursor: default;
}
&.category {
diff --git a/plugins/CoreHome/templates/_topBarTopMenu.twig b/plugins/CoreHome/templates/_topBarTopMenu.twig
index f839e4223f..5f5831237a 100644
--- a/plugins/CoreHome/templates/_topBarTopMenu.twig
+++ b/plugins/CoreHome/templates/_topBarTopMenu.twig
@@ -37,8 +37,8 @@
piwik-menudropdown>
{% if userLogin != 'anonymous' %}
- {% if isAdminLayout is defined %}
- <a class="item active">{{ 'General_Settings'|translate }}</a>
+ {% if isAdminLayout is defined and currentModule == 'UsersManager' and currentAction == 'userSettings' %}
+ <a class="item active" href="index.php?module=CoreAdminHome">{{ 'General_Settings'|translate }}</a>
{% else %}
<a class="item" href="index.php?module=CoreAdminHome">{{ 'General_Settings'|translate }}</a>
{% endif %}
diff --git a/plugins/CorePluginsAdmin/Menu.php b/plugins/CorePluginsAdmin/Menu.php
index 3cd9dea086..cd056720d5 100644
--- a/plugins/CorePluginsAdmin/Menu.php
+++ b/plugins/CorePluginsAdmin/Menu.php
@@ -10,6 +10,7 @@ namespace Piwik\Plugins\CorePluginsAdmin;
use Piwik\Db;
use Piwik\Menu\MenuAdmin;
+use Piwik\Menu\MenuUser;
use Piwik\Piwik;
/**
@@ -52,7 +53,7 @@ class Menu extends \Piwik\Plugin\Menu
$order = 3);
}
- if ($isMarketplaceEnabled && !$isAnonymous) {
+ if ($this->isAllowedToSeeMarketPlace()) {
$menu->addPlatformItem('CorePluginsAdmin_Marketplace',
array('module' => 'CorePluginsAdmin', 'action' => 'extend', 'activated' => ''),
$order = 5);
@@ -60,4 +61,20 @@ class Menu extends \Piwik\Plugin\Menu
}
}
+ private function isAllowedToSeeMarketPlace()
+ {
+ $isAnonymous = Piwik::isUserIsAnonymous();
+ $isMarketplaceEnabled = CorePluginsAdmin::isMarketplaceEnabled();
+
+ return $isMarketplaceEnabled && !$isAnonymous;
+ }
+
+ public function configureUserMenu(MenuUser $menu)
+ {
+ if ($this->isAllowedToSeeMarketPlace()) {
+ $menu->addPlatformItem('CorePluginsAdmin_Marketplace',
+ array('module' => 'CorePluginsAdmin', 'action' => 'browsePlugins', 'activated' => ''),
+ $order = 5);
+ }
+ }
}