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:
authorKate Butler <kate@innocraft.com>2019-08-05 06:20:40 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2019-08-05 06:20:40 +0300
commit1aefe69b03edc69efc3d27e77b4cafaf0e9e7ca1 (patch)
tree3dcf5726f53ccb2b5105a65c499b736a88357f51 /plugins/CoreHome
parent2aa7c822b17e62dfde9fd2cd4c608e5a6e71d439 (diff)
Quick links widget (#14689)
* Quick links widget * Add new widget to widget metadata test reference file * Update test * Move quicklinks widget and add icons for each item * Update reference screenshots
Diffstat (limited to 'plugins/CoreHome')
-rw-r--r--plugins/CoreHome/Widgets/QuickLinks.php26
-rw-r--r--plugins/CoreHome/lang/en.json3
-rw-r--r--plugins/CoreHome/templates/quickLinks.twig15
3 files changed, 43 insertions, 1 deletions
diff --git a/plugins/CoreHome/Widgets/QuickLinks.php b/plugins/CoreHome/Widgets/QuickLinks.php
new file mode 100644
index 0000000000..9f543ff51b
--- /dev/null
+++ b/plugins/CoreHome/Widgets/QuickLinks.php
@@ -0,0 +1,26 @@
+<?php
+
+
+namespace Piwik\Plugins\CoreHome\Widgets;
+
+
+use Piwik\Piwik;
+use Piwik\Widget\Widget;
+use Piwik\Widget\WidgetConfig;
+
+class QuickLinks extends Widget
+{
+ public static function configure(WidgetConfig $config)
+ {
+ $config->setCategoryId('About Matomo');
+ $config->setName('CoreHome_QuickLinks');
+ $config->setOrder(16);
+ $config->setIsEnabled(Piwik::hasUserSuperUserAccess());
+ }
+
+ public function render()
+ {
+ return $this->renderTemplate('quickLinks');
+ }
+
+} \ No newline at end of file
diff --git a/plugins/CoreHome/lang/en.json b/plugins/CoreHome/lang/en.json
index 1c6970ce51..00ce74d0b4 100644
--- a/plugins/CoreHome/lang/en.json
+++ b/plugins/CoreHome/lang/en.json
@@ -106,6 +106,7 @@
"StandardReport": "Standard report",
"FlattenReport": "Flatten report",
"ReportWithMetadata": "Report with metadata",
- "SeeAvailableVersions": "See Available Versions"
+ "SeeAvailableVersions": "See Available Versions",
+ "QuickLinks": "Quick Links"
}
}
diff --git a/plugins/CoreHome/templates/quickLinks.twig b/plugins/CoreHome/templates/quickLinks.twig
new file mode 100644
index 0000000000..4924351660
--- /dev/null
+++ b/plugins/CoreHome/templates/quickLinks.twig
@@ -0,0 +1,15 @@
+<div class="widgetBody quickLinks">
+ <div class="quickLink">
+ <span class="icon icon-open-source">&nbsp;</span>
+ <a href="{{ linkTo({'module': 'SitesManager', 'action': 'index', 'showaddsite': '1'}) }}" class="itemLabel">
+ {{ 'SitesManager_AddSite'|translate|e }}
+ </a>
+ </div>
+ <div class="quickLink">
+ <span class="icon icon-user-add">&nbsp;</span>
+ <a href="{{ linkTo({'module': 'UsersManager', 'action': 'index', 'showadduser': '1'}) }}" class="itemLabel">
+ {{ 'UsersManager_AddUser'|translate|e }}
+ </a>
+ </div>
+ <br />
+</div> \ No newline at end of file