PDF rausgenommen
This commit is contained in:
82
msd2/tracking/piwik/plugins/Overlay/templates/index.twig
Normal file
82
msd2/tracking/piwik/plugins/Overlay/templates/index.twig
Normal file
@ -0,0 +1,82 @@
|
||||
{% extends 'dashboard.twig' %}
|
||||
|
||||
{% block head %}
|
||||
{{ parent() }}
|
||||
<script type="text/javascript" src="plugins/Overlay/javascripts/Piwik_Overlay.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="plugins/Overlay/stylesheets/overlay.css" />
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="overlay-sidebar-container">
|
||||
<a id="overlayTitle" href="https://matomo.org/docs/page-overlay/" rel="noreferrer noopener" target="_blank">
|
||||
{{ 'Overlay_Overlay'|translate }}
|
||||
<span class="icon-info2"></span>
|
||||
</a>
|
||||
|
||||
<div id="overlayDateRangeSelection">
|
||||
|
||||
<span class="icon icon-calendar"></span>
|
||||
<select id="overlayDateRangeSelect" name="overlayDateRangeSelect">
|
||||
<option value="day;today">{{ 'Intl_Today'|translate }}</option>
|
||||
<option value="day;yesterday">{{ 'Intl_Yesterday'|translate }}</option>
|
||||
<option value="week;today">{{ 'General_CurrentWeek'|translate }}</option>
|
||||
<option value="month;today">{{ 'General_CurrentMonth'|translate }}</option>
|
||||
<option value="year;today">{{ 'General_CurrentYear'|translate }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="overlayErrorNotLoading">
|
||||
<p>
|
||||
<span>{{ 'Overlay_ErrorNotLoading'|translate }}</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if ssl %}
|
||||
{{ 'Overlay_ErrorNotLoadingDetailsSSL'|translate }}
|
||||
{% else %}
|
||||
{{ 'Overlay_ErrorNotLoadingDetails'|translate }}
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://matomo.org/docs/page-overlay/#toc-page-overlay-troubleshooting" rel="noreferrer noopener" target="_blank">
|
||||
{{ 'Overlay_ErrorNotLoadingLink'|translate }}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="overlayLocation"> </div>
|
||||
|
||||
<div id="overlayLoading">{{ 'General_Loading'|translate }}</div>
|
||||
|
||||
<div id="overlaySidebar"></div>
|
||||
|
||||
<a id="overlayRowEvolution"><span class="icon icon-evolution"></span>{{ 'General_RowEvolutionRowActionTooltipTitle'|translate }}</a>
|
||||
<a id="overlayTransitions"><span class="icon icon-transition"></span>{{ 'General_TransitionsRowActionTooltipTitle'|translate }}</a>
|
||||
<a id="overlaySegmentedVisitorLog"><span class="icon icon-visitor-profile"></span>{{ 'Live_RowActionTooltipTitle'|translate }}</a>
|
||||
|
||||
{{ postEvent('Template.afterOverlaySidebar') }}
|
||||
</div>
|
||||
|
||||
<div id="overlayMain">
|
||||
<iframe id="overlayIframe" src="" frameborder="0"></iframe>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
broadcast._isInit = true;
|
||||
$(function () {
|
||||
Piwik_Overlay.siteUrls = {{ siteUrls|json_encode|raw }};
|
||||
|
||||
var iframeSrc = 'index.php?module=Overlay&action=startOverlaySession&idSite={{ idSite }}&period={{ period }}&date={{ rawDate }}&segment={{ segment }}';
|
||||
if (piwik.shouldPropagateTokenAuth) {
|
||||
iframeSrc += '&token_auth=' + piwik.token_auth;
|
||||
}
|
||||
|
||||
Piwik_Overlay.init(iframeSrc, '{{ idSite }}', '{{ period }}', '{{ rawDate }}', '{{ segment }}');
|
||||
|
||||
window.Piwik_Overlay_Translations = {
|
||||
domain: "{{ 'Overlay_Domain'|translate }}"
|
||||
};
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@ -0,0 +1,24 @@
|
||||
{% extends 'dashboard.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ 'Overlay_Overlay'|translate }}</h1>
|
||||
|
||||
<div id="overlayNoFrame">
|
||||
|
||||
<script type="text/javascript">
|
||||
var newLocation = 'index.php?module=Overlay&action=startOverlaySession&idSite={{ idSite }}&period={{ period }}&date={{ date }}&segment={{ segment }}';
|
||||
if (piwik.shouldPropagateTokenAuth) {
|
||||
newLocation += '&token_auth=' + piwik.token_auth;
|
||||
}
|
||||
|
||||
var locationParts = window.location.href.split('#');
|
||||
if (locationParts.length > 1) {
|
||||
var url = broadcast.getParamValue('l', locationParts[1]);
|
||||
url = Overlay_Helper.decodeFrameUrl(url);
|
||||
newLocation += '#' + url;
|
||||
}
|
||||
window.location.href = newLocation;
|
||||
</script>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
@ -0,0 +1,15 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
// go up two iframes to find the piwik window
|
||||
var piwikWindow = window.parent.parent;
|
||||
// notify piwik of location change
|
||||
// the location has been passed as the hash part of the url from the overlay session
|
||||
piwikWindow.Piwik_Overlay.setCurrentUrl(window.location.hash.substring(1));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,30 @@
|
||||
<div> <!-- Wrapper is needed that the html can be jQueryfied -->
|
||||
|
||||
<!-- This div is removed by JS and the content is put in the location div -->
|
||||
<div class="overlayLocation">
|
||||
<strong>{{ 'Overlay_Location'|translate }}:</strong>
|
||||
<span data-normalized-url="{{ normalizedUrl }}" data-label="{{ label }}">
|
||||
{{ location }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="overlaySegment">
|
||||
<strong>{{ 'General_Segment'|translate }}:</strong>
|
||||
<span>{{ segmentDescription }}</span>
|
||||
</div>
|
||||
|
||||
{% if data|length > 0 %}
|
||||
<h2 class="overlayMainMetrics">{{ 'General_MainMetrics'|translate }}</h2>
|
||||
<ul class="overlayMetrics">
|
||||
{% for metric in data %}
|
||||
<li class="overlayMetric">
|
||||
<span class="overlayMetricValue">{{ metric.value|raw }}</span> {{ metric.name }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<input type="hidden" value="{{ segment }}" id="segment" />
|
||||
{% else %}
|
||||
<!-- note: the class overlayNoData is used in Piwik_Overlay.js -->
|
||||
<div class="overlayNoData">{{ 'Overlay_NoData'|translate }}</div>
|
||||
{% endif %}
|
||||
</div>
|
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<title></title>
|
||||
<meta name="generator" content="Matomo - free/libre analytics platform"/>
|
||||
{% include "@CoreHome/_favicon.twig" %}
|
||||
{% include "@CoreHome/_applePinnedTabIcon.twig" %}
|
||||
<link rel="stylesheet" type="text/css" href="plugins/Overlay/stylesheets/showErrorWrongDomain.css" />
|
||||
</head>
|
||||
<body>
|
||||
<p><strong>{{ message|raw }}</strong></p>
|
||||
|
||||
<p>{{ troubleshoot|raw }}</p>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,49 @@
|
||||
<html><head><title></title></head><body>
|
||||
<script type="text/javascript">
|
||||
function handleProtocol(url) {
|
||||
if ({% if isHttps %}true{% else %}false{% endif %}) {
|
||||
return url.replace(/http:\/\//i, "https://");
|
||||
} else {
|
||||
return url.replace(/https:\/\//i, "http://");
|
||||
}
|
||||
}
|
||||
|
||||
if (window.location.hash) {
|
||||
var match = false;
|
||||
var parser = document.createElement('a');
|
||||
|
||||
var urlToRedirect = window.location.hash.substr(1);
|
||||
parser.href = urlToRedirect;
|
||||
var hostToRedirect = parser.hostname;
|
||||
|
||||
var knownUrls = {{ knownUrls|raw }};
|
||||
for (var i = 0; i < knownUrls.length; i++) {
|
||||
parser.href = knownUrls[i];
|
||||
var testHost = parser.hostname;
|
||||
if (hostToRedirect == testHost) {
|
||||
match = true;
|
||||
if (navigator.appName == "Microsoft Internet Explorer") {
|
||||
// internet explorer loses the referrer if we use window.location.href=X
|
||||
var referLink = document.createElement("a");
|
||||
referLink.href = handleProtocol(urlToRedirect);
|
||||
document.body.appendChild(referLink);
|
||||
referLink.click();
|
||||
} else {
|
||||
window.location.href = handleProtocol(urlToRedirect);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!match) {
|
||||
var idSite = window.location.href.match(/idSite=([0-9]+)/i)[1];
|
||||
window.location.href = "index.php?module=Overlay&action=showErrorWrongDomain"
|
||||
+ "&idSite=" + idSite
|
||||
+ "&url=" + encodeURIComponent(urlToRedirect);
|
||||
}
|
||||
}
|
||||
else {
|
||||
window.location.href = handleProtocol("{{ mainUrl|e('js') }}");
|
||||
};
|
||||
</script>
|
||||
</body></html>
|
Reference in New Issue
Block a user