diff options
-rw-r--r-- | LEGALNOTICE | 8 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/Controller.php | 11 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/Menu.php | 2 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/javascripts/pluginExtend.js | 2 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/lang/en.json | 14 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/stylesheets/marketplace.less | 8 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/templates/browsePlugins.twig | 10 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/templates/browsePluginsActions.twig | 15 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/templates/browseThemes.twig | 3 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/templates/extend.twig | 70 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/templates/plugins.twig | 3 | ||||
m--------- | tests/PHPUnit/UI | 0 |
12 files changed, 44 insertions, 102 deletions
diff --git a/LEGALNOTICE b/LEGALNOTICE index c438523071..5dd1db2ea4 100644 --- a/LEGALNOTICE +++ b/LEGALNOTICE @@ -259,10 +259,6 @@ THIRD-PARTY CONTENT Notes: - used in ImageGraph plugin - Name: plugins/CorePluginsAdmin/images/themes.png - Link: https://www.iconfinder.com/icons/17022/colors_draw_paint_icon - License: Free for commercial use - Name: plugins/Feedback/angularjs/ratefeature/thumbs-down.png Link: https://www.iconfinder.com/icons/216428/down_thumbs_icon License: Creative Commons (Attribution-Share Alike 3.0 Unported) @@ -271,10 +267,6 @@ THIRD-PARTY CONTENT Link: https://www.iconfinder.com/icons/216429/thumbs_up_icon License: Creative Commons (Attribution-Share Alike 3.0 Unported) - Name: plugins/CorePluginsAdmin/images/plugins.png - Link: http://findicons.com/icon/94051/tools_wizard?id=396912 - License: GNU/GPL - Name: plugins/Insights/images/idea.png Link: https://www.iconfinder.com/icons/6074/brainstorm_bulb_idea_jabber_light_icon License: GPL diff --git a/plugins/CorePluginsAdmin/Controller.php b/plugins/CorePluginsAdmin/Controller.php index 02020c710d..0a7a497d46 100644 --- a/plugins/CorePluginsAdmin/Controller.php +++ b/plugins/CorePluginsAdmin/Controller.php @@ -205,17 +205,6 @@ class Controller extends Plugin\ControllerAdmin return $view->render(); } - public function extend() - { - static::dieIfMarketplaceIsDisabled(); - - $view = $this->configureView('@CorePluginsAdmin/extend'); - $view->installNonce = Nonce::getNonce(static::INSTALL_NONCE); - $view->isSuperUser = Piwik::hasUserSuperUserAccess(); - - return $view->render(); - } - private function createPluginsOrThemesView($template, $themesOnly) { Piwik::checkUserHasSuperUserAccess(); diff --git a/plugins/CorePluginsAdmin/Menu.php b/plugins/CorePluginsAdmin/Menu.php index 8279afcc73..bda9caa9db 100644 --- a/plugins/CorePluginsAdmin/Menu.php +++ b/plugins/CorePluginsAdmin/Menu.php @@ -55,7 +55,7 @@ class Menu extends \Piwik\Plugin\Menu if ($this->isAllowedToSeeMarketPlace()) { $menu->addPlatformItem('CorePluginsAdmin_Marketplace', - $this->urlForAction('extend', array('activated' => '')), + $this->urlForAction('browsePlugins', array('activated' => '')), $order = 5); } diff --git a/plugins/CorePluginsAdmin/javascripts/pluginExtend.js b/plugins/CorePluginsAdmin/javascripts/pluginExtend.js index 5c93452dee..ecaf872504 100644 --- a/plugins/CorePluginsAdmin/javascripts/pluginExtend.js +++ b/plugins/CorePluginsAdmin/javascripts/pluginExtend.js @@ -7,7 +7,7 @@ $(document).ready(function () { - $('.extendPlatform .uploadPlugin').click(function (event) { + $('.pluginslistActionBar .uploadPlugin').click(function (event) { event.preventDefault(); piwikHelper.modalConfirm('#installPluginByUpload', { diff --git a/plugins/CorePluginsAdmin/lang/en.json b/plugins/CorePluginsAdmin/lang/en.json index dc13e89f8d..6ce90f0e0f 100644 --- a/plugins/CorePluginsAdmin/lang/en.json +++ b/plugins/CorePluginsAdmin/lang/en.json @@ -14,23 +14,17 @@ "BackToExtendPiwik": "Back to Marketplace", "BeCarefulUsingPlugins": "Plugins that are not authored by Piwik team must be used with care: we did not review them.", "BeCarefulUsingThemes": "Themes that are not authored by Piwik team must be used with care: we did not review them.", - "ByDesigningOwnTheme": "by %sdesigning your own theme%s", - "ByInstallingNewPluginFromMarketplace": "by %sinstalling a new plugin from the Marketplace%s", - "ByInstallingNewThemeFromMarketplace": "by %sinstalling a new theme from the Marketplace%s", - "ByWritingOwnPlugin": "by %swriting your own plugin%s", "ByXDevelopers": "by %s developers", "Changelog": "Changelog", "ChangeSettingsPossible": "You can change %ssettings%s for this plugin.", "CorePluginTooltip": "Core plugins have no version since they are distributed with Piwik.", "Deactivate": "Deactivate", "Developer": "Developer", + "DevelopersLearnHowToDevelopPlugins": "Developers: Learn how you can extend and customize Piwik by %sdeveloping plugins or themes%s.", "DoMoreContactPiwikAdmins": "To install a new plugin or a new theme, please get in touch with your Piwik admins.", - "DownloadAndInstallPluginsFromMarketplace": "You may automatically download and install new Plugins from the %sMarketplace%s.", "EmailToEnquireUpdatedVersion": "Please email %1$s and enquire an updated version of %2$s.", - "EnjoyAnotherLookAndFeelOfThemes": "Enjoy another look & feel", "FeaturedPlugin": "Featured plugin", "GetEarlyAccessForPaidPlugins": "Note: all plugins are available for free at present; in the future we will enable Paid Plugins in the Marketplace (%scontact us%s for early access).", - "GetNewFunctionality": "Get new functionality", "History": "History", "Inactive": "Inactive", "InfoPluginUpdateIsRecommended": "Update your plugins now to benefit from the latest improvements.", @@ -42,7 +36,8 @@ "LastCommitTime": "(last commit %s)", "LastUpdated": "Last Updated", "LicenseHomepage": "License Homepage", - "MainDescription": "Plugins extend and expand the functionality of Piwik. Once a plugin is installed, you may activate it or deactivate it here.", + "PluginsExtendPiwik": "Plugins extend and expand the functionality of Piwik.", + "OncePluginIsInstalledYouMayActivateHere": "Once a plugin is installed, you may activate it or deactivate it here.", "Marketplace": "Marketplace", "MarketplaceSellPluginSubject": "Marketplace - Sell Plugin", "MenuPlatform": "Platform", @@ -55,8 +50,6 @@ "NoZipFileSelected": "Please select a ZIP file.", "NumDownloadsLatestVersion": "Latest version: %s Downloads", "NumUpdatesAvailable": "%s Update(s) available", - "OrByUploadingAPlugin": "or by %suploading a plugin%s", - "OrByUploadingATheme": "or by %suploading a theme%s", "Origin": "Origin", "OriginCore": "Core", "OriginThirdParty": "Third-party", @@ -91,6 +84,7 @@ "TeaserExtendPiwikByPlugin": "Extend Piwik by installing a new plugin", "TeaserExtendPiwikByTheme": "Enjoy another look & feel by installing a new theme", "TeaserExtendPiwikByUpload": "Extend Piwik by uploading a ZIP file", + "InstallingNewPluginViaMarketplaceOrUpload": "You may automatically install plugins from the Marketplace or %supload a plugin%s in .zip format.", "Theme": "Theme", "Themes": "Themes", "ThemesDescription": "Themes can change the appearance of Piwik user interface, and provide a completely new visual experience to enjoy your analytics reports.", diff --git a/plugins/CorePluginsAdmin/stylesheets/marketplace.less b/plugins/CorePluginsAdmin/stylesheets/marketplace.less index 7146c84217..119634da9d 100644 --- a/plugins/CorePluginsAdmin/stylesheets/marketplace.less +++ b/plugins/CorePluginsAdmin/stylesheets/marketplace.less @@ -214,6 +214,13 @@ } } +.pluginFooterMessage { + float:left; + margin-top:30px; + line-height: 2em; + font-style: italic; +} + .pluginslistNonSuperUserHint { margin-top: 30px; margin-bottom: 30px; @@ -239,6 +246,7 @@ .infoBox { margin: 0px 0px 20px 0px; + line-height: 1.5em; } } diff --git a/plugins/CorePluginsAdmin/templates/browsePlugins.twig b/plugins/CorePluginsAdmin/templates/browsePlugins.twig index 63845bf73d..9259081a0c 100644 --- a/plugins/CorePluginsAdmin/templates/browsePlugins.twig +++ b/plugins/CorePluginsAdmin/templates/browsePlugins.twig @@ -10,6 +10,9 @@ >{{ 'CorePluginsAdmin_TeaserExtendPiwikByPlugin'|translate }}</h2> <div class="infoBox"> + {{ 'CorePluginsAdmin_PluginsExtendPiwik'|translate }} + {{ 'CorePluginsAdmin_InstallingNewPluginViaMarketplaceOrUpload'|translate('<a href="#" class="uploadPlugin">','</a>')|raw }} + <br/> {{ 'CorePluginsAdmin_BeCarefulUsingPlugins'|translate }} </div> @@ -47,4 +50,11 @@ {{ 'CorePluginsAdmin_NoPluginsFound'|translate }} {% endif %} </div> + + <div class="pluginFooterMessage"> + {% set marketplaceSellPluginSubject = 'CorePluginsAdmin_MarketplaceSellPluginSubject'|translate %} + {{ 'CorePluginsAdmin_GetEarlyAccessForPaidPlugins'|translate("<a href='mailto:hello@piwik.org?subject=" ~ marketplaceSellPluginSubject ~ "'>", "</a>")|raw }} + <br/> + {{ 'CorePluginsAdmin_DevelopersLearnHowToDevelopPlugins'|translate('<a href="?module=Proxy&action=redirect&url=http://developer.piwik.org/plugins" target="_blank">', '</a>')|raw }} + </div> {% endblock %} diff --git a/plugins/CorePluginsAdmin/templates/browsePluginsActions.twig b/plugins/CorePluginsAdmin/templates/browsePluginsActions.twig index be1a69c798..1ccbafb057 100644 --- a/plugins/CorePluginsAdmin/templates/browsePluginsActions.twig +++ b/plugins/CorePluginsAdmin/templates/browsePluginsActions.twig @@ -1,3 +1,18 @@ +<div class="ui-confirm" id="installPluginByUpload"> + <h2>{{ 'CorePluginsAdmin_TeaserExtendPiwikByUpload'|translate }}</h2> + + <p class="description"> {{ 'CorePluginsAdmin_AllowedUploadFormats'|translate }} </p> + + <form enctype="multipart/form-data" + method="post" + id="uploadPluginForm" + action="{{ linkTo({'action':'uploadPlugin', 'nonce': installNonce}) }}"> + <input type="file" name="pluginZip"> + <br /> + <input class="startUpload" type="submit" value="{{ 'CorePluginsAdmin_UploadZipFile'|translate }}"> + </form> +</div> + <div class="sort"> <a href="{{ linkTo({'sort': 'popular', 'query': ''}) }}" {% if 'popular' == sort %}class="active"{% endif %}>{{ 'CorePluginsAdmin_SortByPopular'|translate }}</a> | diff --git a/plugins/CorePluginsAdmin/templates/browseThemes.twig b/plugins/CorePluginsAdmin/templates/browseThemes.twig index 2f834247a0..685ef4ebb3 100644 --- a/plugins/CorePluginsAdmin/templates/browseThemes.twig +++ b/plugins/CorePluginsAdmin/templates/browseThemes.twig @@ -9,6 +9,9 @@ >{{ 'CorePluginsAdmin_TeaserExtendPiwikByTheme'|translate }}</h2> <div class="infoBox"> + {{ 'CorePluginsAdmin_ThemesDescription'|translate }} + {{ 'CorePluginsAdmin_InstallingNewPluginViaMarketplaceOrUpload'|translate('<a href="#" class="uploadPlugin">','</a>')|raw }} + <br/> {{ 'CorePluginsAdmin_BeCarefulUsingThemes'|translate }} </div> diff --git a/plugins/CorePluginsAdmin/templates/extend.twig b/plugins/CorePluginsAdmin/templates/extend.twig deleted file mode 100644 index b95b6018c8..0000000000 --- a/plugins/CorePluginsAdmin/templates/extend.twig +++ /dev/null @@ -1,70 +0,0 @@ -{% extends 'admin.twig' %} - -{% import '@CorePluginsAdmin/macros.twig' as plugins %} - -{% block content %} - <div class="extendPlatform"> - - <div class="ui-confirm" id="installPluginByUpload"> - <h2>{{ 'CorePluginsAdmin_TeaserExtendPiwikByUpload'|translate }}</h2> - - <p class="description"> {{ 'CorePluginsAdmin_AllowedUploadFormats'|translate }} </p> - - <form enctype="multipart/form-data" - method="post" - id="uploadPluginForm" - action="{{ linkTo({'action':'uploadPlugin', 'nonce': installNonce}) }}"> - <input type="file" name="pluginZip"> - <br /> - <input class="startUpload" type="submit" value="{{ 'CorePluginsAdmin_UploadZipFile'|translate }}"> - </form> - </div> - - <div class="introduction"> - - <h2 piwik-enriched-headline - feature-name="{{ 'CorePluginsAdmin_Marketplace'|translate }}" - >{{ 'CorePluginsAdmin_TeaserExtendPiwik'|translate }}</h2> - - <p>{{ 'CorePluginsAdmin_DownloadAndInstallPluginsFromMarketplace'|translate("<a href='?module=Proxy&action=redirect&url=http://plugins.piwik.org/' target='_blank'>", "</a>")|raw }}</p> - - {% set marketplaceSellPluginSubject = 'CorePluginsAdmin_MarketplaceSellPluginSubject'|translate %} - <em>{{ 'CorePluginsAdmin_GetEarlyAccessForPaidPlugins'|translate("<a href='mailto:hello@piwik.org?subject=" ~ marketplaceSellPluginSubject ~ "'>", "</a>")|raw }}</em> - </div> - - <div> - <div class="byPlugins"> - <h3 class="header">{{ 'CorePluginsAdmin_GetNewFunctionality'|translate }}</h3> - <span class="callToAction">{{ 'CorePluginsAdmin_ByInstallingNewPluginFromMarketplace'|translate("<a href=" ~ linkTo({'action':'browsePlugins', 'sort': ''}) ~ ">", "</a>")|raw }}</span> - - <p> - <a href="{{ linkTo({'action':'browsePlugins', 'sort': ''}) }}"><img class="teaserImage" title="{{ 'CorePluginsAdmin_InstallNewPlugins'|translate }}" alt="{{ 'CorePluginsAdmin_InstallNewPlugins'|translate }}" src="plugins/CorePluginsAdmin/images/plugins.png"/></a> - </p> - - <span class="callToAction"> - {{ 'CorePluginsAdmin_ByWritingOwnPlugin'|translate('<a href="http://developer.piwik.org/guides/getting-started-part-1" target="_blank">', '</a>')|raw }} - {% if isSuperUser %} - <br/>{{ 'CorePluginsAdmin_OrByUploadingAPlugin'|translate('<a href="#" class="uploadPlugin">', '</a>')|raw }} - {% endif %} - </span> - - </div> - - <div class="byThemes"> - <h3 class="header">{{ 'CorePluginsAdmin_EnjoyAnotherLookAndFeelOfThemes'|translate }}</h3> - <span class="callToAction">{{ 'CorePluginsAdmin_ByInstallingNewThemeFromMarketplace'|translate("<a href=" ~ linkTo({'action':'browseThemes', 'sort': ''}) ~ ">", "</a>")|raw }}</span> - - <p> - <a href="{{ linkTo({'action':'browseThemes', 'sort': ''}) }}"><img class="teaserImage" alt="{{ 'CorePluginsAdmin_InstallNewThemes'|translate }}" title="{{ 'CorePluginsAdmin_InstallNewThemes'|translate }}" src="plugins/CorePluginsAdmin/images/themes.png"/></a> - </p> - - <span class="callToAction"> - {{ 'CorePluginsAdmin_ByDesigningOwnTheme'|translate('<a href="http://developer.piwik.org/guides/theming" target="_blank">', '</a>')|raw }} - {% if isSuperUser %} - <br />{{ 'CorePluginsAdmin_OrByUploadingATheme'|translate('<a href="#" class="uploadPlugin">', '</a>')|raw }} - {% endif %} - </span> - </div> - </div> - </div> -{% endblock %} diff --git a/plugins/CorePluginsAdmin/templates/plugins.twig b/plugins/CorePluginsAdmin/templates/plugins.twig index 4eeb7ee032..4c4b6b1192 100644 --- a/plugins/CorePluginsAdmin/templates/plugins.twig +++ b/plugins/CorePluginsAdmin/templates/plugins.twig @@ -15,7 +15,8 @@ <h2 piwik-enriched-headline>{{ 'CorePluginsAdmin_PluginsManagement'|translate }}</h2> - <p>{{ 'CorePluginsAdmin_MainDescription'|translate }} + <p>{{ 'CorePluginsAdmin_PluginsExtendPiwik'|translate }} + {{ 'CorePluginsAdmin_OncePluginIsInstalledYouMayActivateHere'|translate }} {% if not isPluginsAdminEnabled %} <br/>{{ 'CorePluginsAdmin_DoMoreContactPiwikAdmins'|translate }} diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI -Subproject 06f31df855f764978a35ad64c318ea57e09f384 +Subproject e5be7761c9bb082a9aa85385eb6c4e39b77ad5d |