diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CorePluginsAdmin/Controller.php | 10 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/angularjs/plugins/plugin-filter.directive.js | 3 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/lang/en.json | 1 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/templates/macros.twig | 5 |
4 files changed, 16 insertions, 3 deletions
diff --git a/plugins/CorePluginsAdmin/Controller.php b/plugins/CorePluginsAdmin/Controller.php index 5861ae0a71..d2b0b305e4 100644 --- a/plugins/CorePluginsAdmin/Controller.php +++ b/plugins/CorePluginsAdmin/Controller.php @@ -223,6 +223,16 @@ class Controller extends Plugin\ControllerAdmin foreach ($plugins as $pluginName => &$plugin) { $plugin['isCorePlugin'] = $this->pluginManager->isPluginBundledWithCore($pluginName); + $plugin['isOfficialPlugin'] = false; + + if (isset($plugin['info']) && isset($plugin['info']['authors'])) { + foreach ($plugin['info']['authors'] as $author) { + if (in_array(strtolower($author['name']), array('piwik', 'innocraft'))) { + $plugin['isOfficialPlugin'] = true; + break; + } + } + } if (!empty($plugin['info']['description'])) { $plugin['info']['description'] = $this->translator->translate($plugin['info']['description']); diff --git a/plugins/CorePluginsAdmin/angularjs/plugins/plugin-filter.directive.js b/plugins/CorePluginsAdmin/angularjs/plugins/plugin-filter.directive.js index df77ee5d7f..6e5a335392 100644 --- a/plugins/CorePluginsAdmin/angularjs/plugins/plugin-filter.directive.js +++ b/plugins/CorePluginsAdmin/angularjs/plugins/plugin-filter.directive.js @@ -48,7 +48,8 @@ updateNumberOfMatchingPluginsInFilter('[data-filter-origin="all"]', 'all', filterStatus); updateNumberOfMatchingPluginsInFilter('[data-filter-origin="core"]', 'core', filterStatus); - updateNumberOfMatchingPluginsInFilter('[data-filter-origin="noncore"]', 'noncore', filterStatus); + updateNumberOfMatchingPluginsInFilter('[data-filter-origin="official"]', 'official', filterStatus); + updateNumberOfMatchingPluginsInFilter('[data-filter-origin="thirdparty"]', 'thirdparty', filterStatus); } function updateNumberOfMatchingPluginsInFilter(selectorFilterToUpdate, filterOrigin, filterStatus) diff --git a/plugins/CorePluginsAdmin/lang/en.json b/plugins/CorePluginsAdmin/lang/en.json index 1fe5a78fa9..5247ae19d9 100644 --- a/plugins/CorePluginsAdmin/lang/en.json +++ b/plugins/CorePluginsAdmin/lang/en.json @@ -37,6 +37,7 @@ "NoPluginSettings": "No plugin settings that can be configured", "Origin": "Origin", "OriginCore": "Core", + "OriginOfficial": "Official", "OriginThirdParty": "Third-party", "PluginHomepage": "Plugin Homepage", "PluginNotCompatibleWith": "%1$s plugin is not compatible with %2$s.", diff --git a/plugins/CorePluginsAdmin/templates/macros.twig b/plugins/CorePluginsAdmin/templates/macros.twig index 6e6f3c7115..ffdff511f7 100644 --- a/plugins/CorePluginsAdmin/templates/macros.twig +++ b/plugins/CorePluginsAdmin/templates/macros.twig @@ -76,7 +76,8 @@ <strong>{{ 'CorePluginsAdmin_Origin'|translate }}</strong> <a data-filter-origin="all" href="#" class="active">{{ 'General_All'|translate }}<span class="counter"></span></a> | <a data-filter-origin="core" href="#">{{ 'CorePluginsAdmin_OriginCore'|translate }}<span class="counter"></span></a> | - <a data-filter-origin="noncore" href="#">{{ 'CorePluginsAdmin_OriginThirdParty'|translate }}<span class="counter"></span></a> + <a data-filter-origin="official" href="#">{{ 'CorePluginsAdmin_OriginOfficial'|translate }}<span class="counter"></span></a> | + <a data-filter-origin="thirdparty" href="#">{{ 'CorePluginsAdmin_OriginThirdParty'|translate }}<span class="counter"></span></a> </span> <span class="status"> @@ -114,7 +115,7 @@ {% for name,plugin in pluginsInfo %} {% set isDefaultTheme = isTheme and name == 'Morpheus' %} {% if (plugin.alwaysActivated is defined and not plugin.alwaysActivated) or isTheme %} - <tr {% if plugin.activated %}class="active-plugin"{% else %}class="inactive-plugin"{% endif %} data-filter-status="{% if plugin.activated %}active{% else %}inactive{% endif %}" data-filter-origin="{% if plugin.isCorePlugin %}core{% else %}noncore{% endif %}"> + <tr {% if plugin.activated %}class="active-plugin"{% else %}class="inactive-plugin"{% endif %} data-filter-status="{% if plugin.activated %}active{% else %}inactive{% endif %}" data-filter-origin="{% if plugin.isCorePlugin %}core{% elseif plugin.isOfficialPlugin %}official{% else %}thirdparty{% endif %}"> <td class="name"> <a name="{{ name|e('html_attr') }}"></a> {% if not plugin.isCorePlugin and name in marketplacePluginNames -%} |