PDF rausgenommen

This commit is contained in:
aschwarz
2023-01-23 11:03:31 +01:00
parent 82d562a322
commit a6523903eb
28078 changed files with 4247552 additions and 2 deletions

View File

@@ -0,0 +1,73 @@
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\Widgetize;
use Piwik\Common;
use Piwik\FrontController;
use Piwik\Piwik;
use Piwik\View;
/**
*
*/
class Controller extends \Piwik\Plugin\Controller
{
public function index()
{
$view = new View('@Widgetize/index');
$this->setGeneralVariablesView($view);
return $view->render();
}
public function iframe()
{
$this->init();
$controllerName = Common::getRequestVar('moduleToWidgetize');
$actionName = Common::getRequestVar('actionToWidgetize');
if ($controllerName == 'API') {
throw new \Exception("Widgetizing API requests is not supported for security reasons. Please change query parameter 'moduleToWidgetize'.");
}
$shouldEmbedEmpty = false;
/**
* Triggered to detect whether a widgetized report should be wrapped in the widgetized HTML or whether only
* the rendered output of the controller/action should be printed. Set `$shouldEmbedEmpty` to `true` if
* your widget renders the full HTML itself.
*
* **Example**
*
* public function embedIframeEmpty(&$shouldEmbedEmpty, $controllerName, $actionName)
* {
* if ($controllerName == 'Dashboard' && $actionName == 'index') {
* $shouldEmbedEmpty = true;
* }
* }
*
* @param string &$shouldEmbedEmpty Defines whether the iframe should be embedded empty or wrapped within the widgetized html.
* @param string $controllerName The name of the controller that will be executed.
* @param string $actionName The name of the action within the controller that will be executed.
*/
Piwik::postEvent('Widgetize.shouldEmbedIframeEmpty', array(&$shouldEmbedEmpty, $controllerName, $actionName));
if ($shouldEmbedEmpty) {
$view = new View('@Widgetize/iframe_empty');
} else {
$view = new View('@Widgetize/iframe');
}
$this->setGeneralVariablesView($view);
$view->setXFrameOptions('allow');
$view->content = FrontController::getInstance()->fetchDispatch($controllerName, $actionName);
return $view->render();
}
}

View File

@@ -0,0 +1,24 @@
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\Widgetize;
use Piwik\Menu\MenuAdmin;
use Piwik\Piwik;
class Menu extends \Piwik\Plugin\Menu
{
public function configureAdminMenu(MenuAdmin $menu)
{
$tooltip = Piwik::translate('Widgetize_TopLinkTooltip');
$urlParams = $this->urlForAction('index', array('segment' => false));
$menu->addPlatformItem('General_Widgets', $urlParams, 6, $tooltip);
}
}

View File

@@ -0,0 +1,52 @@
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\Widgetize;
class Widgetize extends \Piwik\Plugin
{
/**
* @see Piwik\Plugin::registerEvents
*/
public function registerEvents()
{
return array(
'AssetManager.getJavaScriptFiles' => 'getJsFiles',
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
);
}
public function getJsFiles(&$jsFiles)
{
$jsFiles[] = "libs/jquery/jquery.truncate.js";
$jsFiles[] = "libs/bower_components/jquery.scrollTo/jquery.scrollTo.min.js";
$jsFiles[] = "plugins/Morpheus/javascripts/piwikHelper.js";
$jsFiles[] = "plugins/CoreHome/javascripts/dataTable.js";
$jsFiles[] = "plugins/Dashboard/javascripts/widgetMenu.js";
$jsFiles[] = "plugins/Widgetize/angularjs/widget-preview/widget-preview.directive.js";
$jsFiles[] = "plugins/Widgetize/angularjs/export-widget/export-widget.controller.js";
}
public function getStylesheetFiles(&$stylesheets)
{
$stylesheets[] = "plugins/Widgetize/stylesheets/widgetize.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/coreHome.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/dataTable.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/cloud.less";
$stylesheets[] = "plugins/Dashboard/stylesheets/dashboard.less";
}
public function getClientSideTranslationKeys(&$translations)
{
$translations[] = 'Widgetize_OpenInNewWindow';
$translations[] = 'Dashboard_LoadingWidget';
}
}

View File

@@ -0,0 +1,29 @@
/*!
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
(function () {
angular.module('piwikApp').controller('ExportWidgetController', ExportWidgetController);
ExportWidgetController.$inject = ['piwik', '$window'];
function ExportWidgetController(piwik, $window) {
function getIframeCode(iframeUrl)
{
var url = iframeUrl.replace(/"/g, '&quot;');
return '<iframe src="' + url + '" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%"></iframe>';
}
// remember to keep controller very simple. Create a service/factory (model) if needed
var urlPath = $window.location.protocol + '//' + $window.location.hostname + ($window.location.port == '' ? '' : (':' + $window.location.port)) + $window.location.pathname;
this.dashboardUrl = urlPath + '?module=Widgetize&action=iframe&moduleToWidgetize=Dashboard&actionToWidgetize=index&idSite=' + piwik.idSite + '&period=week&date=yesterday';
this.dashboardCode = getIframeCode(this.dashboardUrl);
this.allWebsitesDashboardUrl = urlPath + '?module=Widgetize&action=iframe&moduleToWidgetize=MultiSites&actionToWidgetize=standalone&idSite=' + piwik.idSite + '&period=week&date=yesterday';
this.allWebsitesDashboardCode = getIframeCode(this.allWebsitesDashboardUrl);
}
})();

View File

@@ -0,0 +1,99 @@
/*!
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
/**
* Usage:
* <div piwik-widget-preview>
*/
(function () {
angular.module('piwikApp').directive('piwikWidgetPreview', piwikWidgetPreview);
piwikWidgetPreview.$inject = ['piwik', '$window'];
function piwikWidgetPreview(piwik, $window){
function getEmbedUrl(parameters, exportFormat) {
var copyParameters = {};
for (var variableName in parameters) {
copyParameters[variableName] = parameters[variableName];
}
copyParameters['moduleToWidgetize'] = parameters['module'];
copyParameters['actionToWidgetize'] = parameters['action'];
delete copyParameters['action'];
delete copyParameters['module'];
var sourceUrl;
sourceUrl = $window.location.protocol + '//' + $window.location.hostname + ($window.location.port == '' ? '' : (':' + $window.location.port)) + $window.location.pathname + '?';
sourceUrl += "module=Widgetize" +
"&action=" + exportFormat +
"&" + piwik.helper.getQueryStringFromParameters(copyParameters) +
"&idSite=" + piwik.idSite +
"&period=" + piwik.period +
"&date=" + piwik.broadcast.getValueFromUrl('date') +
"&disableLink=1&widget=1";
return sourceUrl;
}
return {
restrict: 'A',
controller: function () {
var self = this;
this.getInputFormWithHtml = function (inputId, htmlEmbed) {
return '<pre piwik-select-on-focus readonly="true" id="' + inputId + '">' + this.htmlentities(htmlEmbed) + '</pre>';
};
this.htmlentities = function (s) {
return piwik.helper.escape(piwik.helper.htmlEntities(s));
};
this.callbackAddExportButtonsUnderWidget = function (widgetUniqueId, loadedWidgetElement) {
widgetsHelper.getWidgetObjectFromUniqueId(widgetUniqueId, function(widget) {
var widgetParameters = widget['parameters'];
var exportButtonsElement = $('<span id="exportButtons">');
var urlIframe = getEmbedUrl(widgetParameters, "iframe");
// We first build the HTML code that will load the widget in an IFRAME
var widgetIframeHtml = '<div id="widgetIframe">' +
'<iframe width="100%" height="350" src="' + urlIframe + '" scrolling="no" frameborder="0" marginheight="0" marginwidth="0">' +
'</iframe>' +
'</div>';
// Add the input field containing the widget in an Iframe
$(exportButtonsElement).append(
'<div id="embedThisWidgetIframe">' +
'<label for="embedThisWidgetIframeInput">&rsaquo; Embed Iframe</label>' +
'<div id="embedThisWidgetIframeInput">' +
self.getInputFormWithHtml('iframeEmbed', widgetIframeHtml) +
'</div>' +
'</div>' +
'<div> <label for="embedThisWidgetDirectLink">&rsaquo; Direct Link</label>' +
'<div id="embedThisWidgetDirectLink"> ' + self.getInputFormWithHtml('directLinkEmbed', urlIframe) + ' - <a href="' + urlIframe + '" rel="noreferrer noopener" target="_blank">' + _pk_translate('Widgetize_OpenInNewWindow') + '</a></div>'
+ '</div>'
);
// Finally we append the content to the parent widget DIV
$(loadedWidgetElement)
.parent()
.append(exportButtonsElement);
piwik.helper.compileAngularComponents(exportButtonsElement);
});
}
},
compile: function (element, attrs) {
return function (scope, element, attrs, controller) {
element.widgetPreview({
onPreviewLoaded: controller.callbackAddExportButtonsUnderWidget
});
};
}
};
}
})();

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "فتح في نافذة جديدة"
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Адкрыць у новым акне"
}
}

View File

@@ -0,0 +1,6 @@
{
"Widgetize": {
"OpenInNewWindow": "Отвори в нов прозорец",
"TopLinkTooltip": "Запазете Matomo докладите като джаджи и вградете таблото във вашето приложение като iframe."
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "নতুন উইন্ডোতে খুলুন"
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Otvori u novom prozoru"
}
}

View File

@@ -0,0 +1,6 @@
{
"Widgetize": {
"OpenInNewWindow": "Obrir en una nova finestra",
"TopLinkTooltip": "Exporteu informes i ginys de Matomo i incrusteu el Tauler de Control a la vostra aplicació com un iframe."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Otevřít nové okno",
"PluginDescription": "Zobrazte jakékoliv hlášení z Matomou na vašich stránkách pomocí jednoduchého vkládacího HTML tagu.",
"TopLinkTooltip": "Exportujte své Matomo hlášení jako widgety a použijte eje e vaší aplikaci jako iframe."
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Agor mewn ffenestr newydd"
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Åbn i et nyt vindue",
"PluginDescription": "Viser alle Matomo rapport på webstedet eller app med et simpel indlejrings HTML-tag.",
"TopLinkTooltip": "Eksporter Matomo rapporter som moduler og indlejre dit kontrolpanel i din applikation som en iframe."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "In neuem Fenster öffnen",
"PluginDescription": "Zeigt sämtliche Matomo Berichte in Ihrer Website oder App mit einem einfachen Embed HTML tag an.",
"TopLinkTooltip": "Exportieren Sie Berichte als Widgets und binden Sie das Dashboard in Ihrer Applikation als iframe ein."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Άνοιγμα σε νέο παράθυρο",
"PluginDescription": "Εμφάνιση οποιασδήποτε αναφοράς του Matomo στον ιστοτόπο σας ή στην εφαρμογή του κινητού με ενσωμάτωση μιας απλής σήμανσης HTML.",
"TopLinkTooltip": "Εξαγωγή Αναφορών του Matomo ως Μικροεφαρμογές και ενσωμάτωση του Κεντρικού Πίνακα στην εφαρμογή σας ως πλαίσιο."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Open in a new window",
"PluginDescription": "Display any Matomo report in your website or app with a simple Embed HTML tag.",
"TopLinkTooltip": "Export Matomo Reports as Widgets and embed the Dashboard in your app as an iframe."
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Fermi en novan fenestron"
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Abrir en una nueva ventana"
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Abrir en una nueva ventana",
"PluginDescription": "Mostrar un informe Matomo en su sitio de internet o aplicación con una simple etiqueta HTML incrustada.",
"TopLinkTooltip": "Exportar los informes de Matomo como una aplicación (widget) e incrustar el panel en su aplicación como un elemento iframe."
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Ava uues aknas"
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "باز کردن در یک پنجره جدید"
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Avaa uudessa ikkunassa",
"PluginDescription": "Näytä mikä tahansa Matomon raporteista verkkosivullasi tai ohjelmassa yksinkertaisella HTML-koodinpätkällä.",
"TopLinkTooltip": "Vie Matomon raportteja vimpaimiksi ja lisää työpöytä ohjelmaan iframena."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Ouvrir dans une nouvelle fenêtre",
"PluginDescription": "Affichez n'importe quel rapport Matomo sur votre site web avec une simple balise HTML.",
"TopLinkTooltip": "Exporter les rapports Matomo en tant que gadget et incorporer le tableau de bord dans votre application en tant qu'iframe."
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Abrir en nova Xanela"
}
}

View File

@@ -0,0 +1,6 @@
{
"Widgetize": {
"OpenInNewWindow": "פתיחה בחלון חדש",
"TopLinkTooltip": "ייצוא דוחות Matomo כוידג׳טים והטמעת לוח הבקרה באפליקציה שלך כ-iframe."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "एक नई विंडो में खोलें",
"PluginDescription": "एक साधारण एम्बेड HTML टैग के साथ अपनी वेबसाइट या अनुप्रयोग में किसी भी Matomo रिपोर्ट प्रदर्शित करें।",
"TopLinkTooltip": "निर्यात Matomo विजेट के रूप में रिपोर्ट और एक iframe के रूप में अपने एप्लिकेशन में डैशबोर्ड एम्बेड।"
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Otvori u novom prozoru"
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Megnyitás új ablakban"
}
}

View File

@@ -0,0 +1,6 @@
{
"Widgetize": {
"OpenInNewWindow": "Buka di jendela baru",
"TopLinkTooltip": "Ekspor Laporan Matomo sebagai gawit dan sematkan dalam Penel Kendali di aplikasi Anda sebagai binkai pendam."
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Opna í nýjum glugga"
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Apri in una nuova finestra",
"PluginDescription": "Mostra ogni report di Matomo nel tuo sito o nell'app con un semplice tag HTML.",
"TopLinkTooltip": "Esporta i Reports di Matomo come Widgets e includi la Dashboard nella tua app come iFrame."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "新しいウィンドウで開く",
"PluginDescription": "単純な埋め込み HTML タグを使用して Web サイトやアプリで任意の Matomo のレポートを表示します。",
"TopLinkTooltip": "Matomo レポートをウィジェットとしてエクスポートし、ダッシュボードを iframe としてご利用のアプリケーションに埋め込んでください。"
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "ახალ ფანჯარაში გახსნა"
}
}

View File

@@ -0,0 +1,6 @@
{
"Widgetize": {
"OpenInNewWindow": "새 창에서 열기",
"TopLinkTooltip": "Matomo 보고서를 위젯으로 내보내고 당신의 애플리케이션 대시보드에 IFRAME으로 삽입할 수 있습니다."
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Atverti naujame lange"
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Atvērt jaunā logā"
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Åpne i nytt vindu",
"PluginDescription": "Vis alle Matomo-rapporter du vil på ditt nettsted eller i din app med en enkel embed HTML-tagg.",
"TopLinkTooltip": "Eksporter Matomo-rapporter som widgeter og bygg dem inn kontrollpanelet i din app som en iframe."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "In een nieuw venster openen",
"PluginDescription": "Toon elk Matomo rapport in je website of app eenvoudig met een Embed HTML tag.",
"TopLinkTooltip": "Exporteer Matomo Rapporten als Widgets en voeg het dashboard toe in je app als een iframe."
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Opne i nytt vindage"
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Otwórz w nowym oknie",
"PluginDescription": "Wyświetl dowolny raport Matomo na swojej stronie lub w aplikacji przy pomocy prostego Zagnieżdżonego HTML'a.",
"TopLinkTooltip": "Eksportuj raporty Matomo jako widżety i zagnieżdżaj Pulpit w swoich aplikacjach jako iframe."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Abrir em uma nova janela",
"PluginDescription": "Exibe qualquer relatório Matomo no seu site ou aplicativo com uma simples tag HTML Embed.",
"TopLinkTooltip": "Exportar relatórios Matomo como widgets do Dashboard e incorporar em seu aplicativo como um iframe."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Abrir numa nova janela",
"PluginDescription": "Mostra qualquer relatório do Matomo no seu site ou aplicação com uma simples tag HTML incorporável.",
"TopLinkTooltip": "Exporte relatórios do Matomo como Widgets e incorpore o painel da sua aplicação como uma iframe."
}
}

View File

@@ -0,0 +1,6 @@
{
"Widgetize": {
"OpenInNewWindow": "Deschide intr-o fereastra noua",
"TopLinkTooltip": "Exporta Rapoarte Matomo ca Widgets și încorporeaza tabloul de bord în aplicația ca un iframe."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Открыть в новом окне",
"PluginDescription": "Показать отчёт Matomo на вебсайте или в приложении с помощью простого встраиваемого HTML тега.",
"TopLinkTooltip": "Экспортируйте аналитику Matomo в виде виджетов и установите их на своем сайте или веб-сервисе как iframe."
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Otvoriť v novom okne"
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "Odpri v novem oknu"
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Hape në dritare të re",
"PluginDescription": "Shfaqni çfarëdo raporti Matomo në sajtin apo aplikacionin tuaj, përmes një etikete të thjeshtë Embed HTML.",
"TopLinkTooltip": "Eksportoni Raporte Matomo si Widget-e dhe bëjeni Pultin pjesë të aplikacionit tuaj si një iframe."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Otvori u novom prozoru",
"PluginDescription": "Prikaz bilo kog Matomo izveštaja na vašem sajtu pomoću jednostavnog HTML taga.",
"TopLinkTooltip": "Prikaži Matomo izveštaje kao vidžete i ugradi konzolu u svoju aplikaciju kao iframe."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Öppna i ett nytt fönster",
"PluginDescription": "Visa alla Matomo rapporter på din webbplats eller app med hjälp av enkel kod (en HTML-tagg).",
"TopLinkTooltip": "Exportera rapporter från Matomo som Widgets och bädda in instrumentpanelen i din app som en iframe."
}
}

View File

@@ -0,0 +1,5 @@
{
"Widgetize": {
"OpenInNewWindow": "เปิดในหน้าต่างใหม่"
}
}

View File

@@ -0,0 +1,6 @@
{
"Widgetize": {
"OpenInNewWindow": "Bukas sa isang bagong window",
"TopLinkTooltip": "i-export ang ulat ng Matomo bilang isang Widget at ilagay sa Dashboard ng iyong app bilang iframe."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Yeni pencerede açılsın",
"PluginDescription": "Basit bir Embed HTML kod imi ekleyerek istediğiniz Matomo raporunun web sitenizde ya da uygulamanızda görüntülenmesini sağlayabilirsiniz.",
"TopLinkTooltip": "Matomo Raporlarını, uygulamanızın panosuna iFrame olarak ekleyebileceğiniz gereçler olarak dışa aktarabilirsiniz."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "Відкрити в новому вікні",
"PluginDescription": "Показати звіт Matomo на вебсайті або в додатку за допомогою простого вбудованого HTML тега.",
"TopLinkTooltip": "Експортуйте аналітику Matomo у вигляді віджетів і встановіть їх на своєму сайті або веб-сервісі як iframe."
}
}

View File

@@ -0,0 +1,6 @@
{
"Widgetize": {
"OpenInNewWindow": "Mở trong một cửa sổ mới",
"TopLinkTooltip": "Xuất các báo cáo Matomo như các Widget và nhúng Bảng điều khiển trong ứng dụng của bạn như một iframe."
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "打开一个新窗口",
"PluginDescription": "在你的网站显示Matomo报告或者嵌入HTML标签中在app中显示",
"TopLinkTooltip": "小工具形式导出 Matomo 报表,将面板以 iframe 形式嵌入你的app中。"
}
}

View File

@@ -0,0 +1,7 @@
{
"Widgetize": {
"OpenInNewWindow": "在新視窗開啟",
"PluginDescription": "在你的網站或應用程式中以簡單的 HTML 嵌入程式碼顯示任何 Matomo 報表。",
"TopLinkTooltip": "將 Matomo 報表以小工具匯出,並於你的應用程式中以 iframe 嵌入展示板。"
}
}

View File

@@ -0,0 +1,50 @@
.widgetize {
width: 100%;
font-size: 13px;
.top_controls {
padding-bottom: 16px;
margin-top: 16px;
}
#widgetPreview {
margin-top: 16px;
}
}
.widgetize .formEmbedCode {
font-size: 11px;
text-decoration: none;
background-color: #FBFDFF;
border: 1px solid #ECECEC;
width: 220px;
}
.widgetize label {
color: @theme-color-text-lighter;
line-height: 18px;
margin-right: 5px;
font-weight: bold;
padding-bottom: 100px;
}
#embedThisWidgetIframe {
margin-top: 16px;
}
body>.widget {
margin: 10px 7px;
overflow: visible;
strong {
font-weight: 700;
}
}
body.widgetized {
background-color: @theme-color-widget-exported-background-base;
#pageFooter {
margin-bottom: 0;
}
}

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html id="ng-app" ng-app="piwikApp">
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex,nofollow">
<meta name="google" content="notranslate">
{% include "_jsGlobalVariables.twig" %}
<!--[if lt IE 9]>
<script language="javascript" type="text/javascript" src="libs/jqplot/excanvas.min.js"></script>
<![endif]-->
{% include "_jsCssIncludes.twig" %}
</head>
<body ng-app="app" class="widgetized">
<div piwik-popover-handler></div>
<div class="widget">
{{ content|raw }}
</div>
<div id="pageFooter">
{{ postEvent('Template.pageFooter') }}
</div>
</body>
</html>

View File

@@ -0,0 +1 @@
{{ content|raw }}

View File

@@ -0,0 +1,62 @@
{% extends 'admin.twig' %}
{% set title %}{{ 'General_Widgets'|translate }}{% endset %}
{% block topcontrols %}
{% include "@CoreHome/_siteSelectHeader.twig" %}
{% include "@CoreHome/_periodSelect.twig" %}
{% endblock %}
{% block content %}
<div>
<div class="widgetize" ng-controller="ExportWidgetController as exportWidget">
<div piwik-content-intro>
<h2 piwik-enriched-headline>{{ title|e('html_attr') }}</h2>
<p>With Matomo, you can <a rel="noreferrer noopener" target="_blank" href="https://matomo.org/docs/embed-piwik-report/">export your Web Analytics reports</a> on your blog, website, or intranet dashboard... in one click.</p>
</div>
<div piwik-content-block content-title="Authentication">
<p>
If you want your widgets to be viewable by everybody, you first have to set the 'view' permissions
to the anonymous user in the <a href='index.php?module=UsersManager' rel='noreferrer noopener' target='_blank'>Users Management section</a>.
<br/>Alternatively, if you are publishing widgets on a password protected or private page,
you don't necessarily have to allow 'anonymous' to view your reports. In this case, you can add the secret token_auth parameter (found in the
<a href='{{ linkTo({'module':'API','action':'listAllAPI'}) }}' rel='noreferrer noopener' target='_blank'>API page</a>) in the widget URL.
</p>
</div>
<div piwik-content-block content-title="Widgetize dashboards">
<p>You can also display the full Matomo dashboard in your application or website in an IFRAME
(<a ng-href='{{ '{{ exportWidget.dashboardUrl }}'|raw }}' rel='noreferrer noopener' target='_blank' >see example</a>).
The date parameter can be set to a specific calendar date, "today", or "yesterday". The period parameter can be set to "day", "week", "month", or
"year".
The language parameter can be set to the language code of a translation, such as language=fr.
For example, for idSite=1 and date=yesterday, you can write:
<br />
<pre piwik-select-on-focus ng-bind="exportWidget.dashboardCode"> </pre>
<br />
You can also widgetize the all websites dashboard in an IFRAME
(<a ng-href='{{ '{{ exportWidget.allWebsitesDashboardUrl }}'|raw }}' rel='noreferrer noopener' target='_blank' id='linkAllWebsitesDashboardUrl'>see example</a>)
<br />
<pre piwik-select-on-focus ng-bind="exportWidget.allWebsitesDashboardCode"> </pre>
</p>
</div>
<div piwik-content-block content-title="Widgetize reports">
<p>Select a report, and copy paste in your page the embed code below the widget:
<div piwik-widget-preview></div>
<br class="clearfix" />
</div>
</div>
</div>
{% include "@Dashboard/_widgetFactoryTemplate.twig" %}
{% endblock %}