PDF rausgenommen
This commit is contained in:
@ -0,0 +1,87 @@
|
||||
{% set fontStyle = "color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, 'Helvetica Neue', sans-serif;"%}
|
||||
{% set styleTableHeader = "border-bottom:1px solid rgb(231,231,231);font-size: 15px;text-align: left;font-weight:normal;padding:13px 0 13px 10px;" ~ fontStyle %}
|
||||
{% set styleTableCell = "border-bottom:1px solid rgb(231,231,231);font-size: 15px;padding:17px 15px;" ~ fontStyle %}
|
||||
|
||||
<h2 id="{{ reportId }}" style=" {{fontStyle}} font-size: {{ emailStyles.reportTitleTextSize }}pt; font-weight:normal; margin:45px 0 30px 0;">
|
||||
{{ reportName }}
|
||||
</h2>
|
||||
|
||||
{% if reportRows is empty %}
|
||||
{{ 'CoreHome_ThereIsNoDataForThisReport'|translate }}
|
||||
{% else %}
|
||||
{% if displayGraph %}
|
||||
<img alt=""
|
||||
{% if renderImageInline %}
|
||||
src="data:image/png;base64,{{ generatedImageGraph }}"
|
||||
{% else %}
|
||||
src="cid:{{ reportId }}"
|
||||
{% endif %}
|
||||
height="{{ graphHeight }}"
|
||||
width="{{ graphWidth }}"
|
||||
margin="0 auto"/>
|
||||
{% endif %}
|
||||
|
||||
{% if displayGraph and displayTable %}
|
||||
<br/>
|
||||
<br/>
|
||||
{% endif %}
|
||||
|
||||
{% if displayTable %}
|
||||
<table style="border-collapse:collapse; border:1px solid rgb(231,231,231); padding:5px;">
|
||||
<thead style="background-color: {{ emailStyles.tableBgColor }};">
|
||||
{% for columnId, columnName in reportColumns %}
|
||||
<th style="{{ styleTableHeader }}{% if columnId == 'label' %}{% else %} text-align:right;{% endif %}">
|
||||
{{ columnName }}
|
||||
</th>
|
||||
{% endfor %}
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set cycleValues=['background-color: '~emailStyles.tableBgColor,''] %}
|
||||
{% set cycleIndex=1 %}
|
||||
{% for rowId,row in reportRows %}
|
||||
{% set rowMetrics=row.columns %}
|
||||
|
||||
{% if reportRowsMetadata[rowId] is defined %}
|
||||
{% set rowMetadata=reportRowsMetadata[rowId].columns %}
|
||||
{% else %}
|
||||
{% set rowMetadata=null %}
|
||||
{% endif %}
|
||||
<tr style="{{ cycle(cycleValues, cycleIndex) }};">
|
||||
{% set cycleIndex=cycleIndex+1 %}
|
||||
{% for columnId, columnName in reportColumns %}
|
||||
<td style="padding:17px 15px;{% if columnId == 'label' %}{% else %} text-align:right;{% endif %};{{styleTableCell}}">
|
||||
{% if columnId == 'label' %}
|
||||
{% if rowMetrics[columnId] is defined %}
|
||||
{% if rowMetadata.logo is defined %}
|
||||
<img height="16px" src='{{ currentPath }}{{ rowMetadata.logo }}'
|
||||
{%- if 'plugins/Morpheus/icons/dist/flags' in rowMetadata.logo %} style="border: 1px solid lightgray; "{% endif -%}
|
||||
>
|
||||
|
||||
{% endif %}
|
||||
{% if rowMetadata.url is defined %}
|
||||
<a style="color: {{ emailStyles.reportTextColor }};" href='{% if rowMetadata.url|slice(0,4) not in ['http','ftp:'] %}http://{% endif %}{{ rowMetadata.url }}'>
|
||||
{% endif %}
|
||||
{{ rowMetrics[columnId] | raw }}{# labels are escaped by SafeDecodeLabel filter in core/API/Response.php #}
|
||||
{% if rowMetadata.url is defined %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if rowMetrics[columnId] is empty %}
|
||||
0
|
||||
{% else %}
|
||||
{{ rowMetrics[columnId]|number(2) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
<p style="width: 100%; text-align:center;">
|
||||
<a style="{{ fontStyle }}; text-decoration:none; font-size: 9pt;" href="#reportTop">
|
||||
{{ 'ScheduledReports_TopOfReport'|translate }} ↑
|
||||
</a></p>
|
||||
{% endif %}
|
@ -0,0 +1 @@
|
||||
{% include "@CoreHome/_htmlEmailFooter.twig" %}
|
@ -0,0 +1,37 @@
|
||||
{% include "@CoreHome/_htmlEmailHeader.twig" %}
|
||||
|
||||
<h2 style='{{fontStyle}} color:#37474f; line-height:30px; margin:25px 0 15px 0;'>
|
||||
{{'ScheduledReports_EmailHello'|translate}}
|
||||
</h2>
|
||||
|
||||
<p style='{{styleParagraph}}{{fontStyle}}'>
|
||||
{% if isAttachedFile is defined and isAttachedFile %}
|
||||
{{ 'ScheduledReports_PleaseFindAttachedFile'|translate(frequency, reportTitle) }}
|
||||
{% else %}
|
||||
{{'ScheduledReports_PleaseFindBelow'|translate(period,reportTitle)}}
|
||||
{% endif %}
|
||||
<br />{{ description }}
|
||||
<br />{{ 'General_DateRange'|translate }} {{ prettyDate }}
|
||||
<br />{{ 'ScheduledReports_SentFromX'|translate(piwikUrl) }}
|
||||
</p>
|
||||
|
||||
{% if displaySegment %}
|
||||
<p style="{{styleParagraph}}{{fontStyle}}">
|
||||
{{ 'ScheduledReports_CustomVisitorSegment'|translate }} {{ segmentName }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if reportMetadata|length > 1 %}
|
||||
<h2 style="{{fontStyle}}font-weight:normal; font-size: {{ emailStyles.reportTitleTextSize }}pt;">
|
||||
{{ 'ScheduledReports_TableOfContent'|translate }}
|
||||
</h2>
|
||||
<ul>
|
||||
{% for metadata in reportMetadata %}
|
||||
<li style="{{ styleParagraphText }}">
|
||||
<a href="#{{ metadata.uniqueId }}" style="text-decoration:none; color: {{ emailStyles.reportTextColor }};">
|
||||
{{ metadata.name }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
@ -0,0 +1,42 @@
|
||||
<div id="bottomAd" style="font-size: 2px;"> </div>
|
||||
<script type="text/javascript">
|
||||
if ('undefined' === (typeof hasBlockedContent) || hasBlockedContent !== false) {
|
||||
{# if hasBlockedContent was "false" most likely nothing was blocked #}
|
||||
(function () {
|
||||
{# most likely jQuery is not available, have to use vanilla JS here #}
|
||||
var body = document.getElementsByTagName('body');
|
||||
|
||||
if (!body || !body[0]) {
|
||||
return;
|
||||
}
|
||||
|
||||
var bottomAd = document.getElementById('bottomAd');
|
||||
var wasMostLikelyCausedByAdblock = false;
|
||||
|
||||
if (!bottomAd) {
|
||||
wasMostLikelyCausedByAdblock = true;
|
||||
} else if (bottomAd.style && bottomAd.style.display === 'none') {
|
||||
wasMostLikelyCausedByAdblock = true;
|
||||
} else if ('undefined' !== (typeof bottomAd.clientHeight) && bottomAd.clientHeight === 0) {
|
||||
wasMostLikelyCausedByAdblock = true;
|
||||
}
|
||||
|
||||
if (wasMostLikelyCausedByAdblock) {
|
||||
var shouldGetHiddenElement = document.getElementById("should-get-hidden");
|
||||
var warning = document.createElement('p');
|
||||
warning.innerText = '{{ 'CoreHome_AdblockIsMaybeUsed'|translate|e('js') }}';
|
||||
|
||||
if (shouldGetHiddenElement) {
|
||||
shouldGetHiddenElement.appendChild(warning);
|
||||
} else {
|
||||
body[0].insertBefore(warning, body[0].firstChild);
|
||||
warning.style.color = 'red';
|
||||
warning.style.fontWeight = 'bold';
|
||||
warning.style.marginLeft = '16px';
|
||||
warning.style.marginBottom = '16px';
|
||||
warning.style.fontSize = '20px';
|
||||
}
|
||||
}
|
||||
})();
|
||||
}
|
||||
</script>
|
@ -0,0 +1,5 @@
|
||||
<{{ componentName|e('html') }}
|
||||
{% for key, value in componentParameters %}
|
||||
{{ key|e('html') }}="{{ value|e('html_attr') }}"
|
||||
{% endfor %}
|
||||
/>
|
@ -0,0 +1,4 @@
|
||||
{% if isCustomLogo and customFavicon is defined and customFavicon %}
|
||||
{% else %}
|
||||
<link rel="mask-icon" href="plugins/CoreHome/images/applePinnedTab.svg" color="#3450A3">
|
||||
{% endif %}
|
@ -0,0 +1,97 @@
|
||||
{% if properties.show_visualization_only %}
|
||||
{% include visualizationTemplate %}
|
||||
{%- else -%}
|
||||
|
||||
{% set isDataTableEmpty = (dataTable is empty or dataTableHasNoData|default(false)) %}
|
||||
|
||||
{% set showCardAsContentBlock = (properties.show_as_content_block and properties.show_title and not isWidget) %}
|
||||
{% set showOnlyTitleWithoutCard = not showCardAsContentBlock and properties.title and properties.show_title %}
|
||||
|
||||
{% if showCardAsContentBlock %}
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
{% if properties.title %}
|
||||
<h2 class="card-title"
|
||||
{% if properties.title_edit_entity_url %}edit-url="{{ properties.title_edit_entity_url }}"{% endif %}
|
||||
piwik-enriched-headline
|
||||
>{{ properties.title }}</h2>
|
||||
{% endif %}
|
||||
{% elseif showOnlyTitleWithoutCard %}
|
||||
<div>
|
||||
<h2>{{ properties.title }}</h2>
|
||||
{% endif %}
|
||||
|
||||
{% set showCardTableIsEmpty = not properties.show_as_content_block and isDataTableEmpty and not isWidget %}
|
||||
{% if showCardTableIsEmpty %}
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
{% endif %}
|
||||
|
||||
{% set summaryRowId = constant('Piwik\\DataTable::ID_SUMMARY_ROW') %}{# ID_SUMMARY_ROW #}
|
||||
{% set isSubtable = javascriptVariablesToSet.idSubtable is defined and javascriptVariablesToSet.idSubtable != 0 %}
|
||||
<div class="dataTable {{ visualizationCssClass }} {{ properties.datatable_css_class|default('') }} {% if isSubtable %}subDataTable{% endif %}"
|
||||
data-table-type="{{ properties.datatable_js_type }}"
|
||||
data-report="{{ properties.report_id }}"
|
||||
data-report-metadata="{{ reportMetdadata|json_encode|e('html_attr') }}"
|
||||
data-props="{% if clientSideProperties is empty %}{}{% else %}{{ clientSideProperties|json_encode }}{% endif %}"
|
||||
data-params="{% if clientSideParameters is empty %}{}{% else %}{{ clientSideParameters|json_encode }}{% endif %}">
|
||||
|
||||
{% if properties.description %}
|
||||
<div class="card-description">{{ properties.description }}</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="reportDocumentation">
|
||||
{% if properties.documentation|default is not empty %}<p ng-bind-html="{{ properties.documentation|json_encode|e('html_attr') }}"></p>{% endif %}
|
||||
{% if reportLastUpdatedMessage is defined and reportLastUpdatedMessage %}<span class='helpDate'>{{ reportLastUpdatedMessage|raw }}</span>{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="dataTableWrapper">
|
||||
{% if error is defined %}
|
||||
{{ error.message }}
|
||||
{% else %}
|
||||
{% if properties.show_header_message is defined and properties.show_header_message is not empty %}
|
||||
<div class='datatableHeaderMessage'>{{ properties.show_header_message | raw }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if isDataTableEmpty %}
|
||||
<div class="pk-emptyDataTable">
|
||||
{% if showReportDataWasPurgedMessage is defined and showReportDataWasPurgedMessage %}
|
||||
{{ 'CoreHome_DataForThisReportHasBeenPurged'|translate(deleteReportsOlderThan) }}
|
||||
{% elseif properties.no_data_message %}
|
||||
{{ properties.no_data_message|raw }}
|
||||
{% else %}
|
||||
{{ 'CoreHome_ThereIsNoDataForThisReport'|translate }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% include visualizationTemplate %}
|
||||
{% endif %}
|
||||
|
||||
{% if properties.show_footer %}
|
||||
{% include "@CoreHome/_dataTableFooter.twig" %}
|
||||
{% endif %}
|
||||
|
||||
{% include "@CoreHome/_dataTableJS.twig" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if notifications is not empty and notifications|length %}
|
||||
{% for notificationId, n in notifications %}
|
||||
|
||||
{{ n.message|notification({'id': notificationId, 'type': n.type, 'title': n.title, 'noclear': n.hasNoClear, 'context': n.context, 'raw': n.raw}, false) }}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if showCardTableIsEmpty %}
|
||||
</div></div>
|
||||
{% endif %}
|
||||
|
||||
{% if showCardAsContentBlock %}
|
||||
</div></div>
|
||||
{% elseif showOnlyTitleWithoutCard %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{%- endif %}
|
@ -0,0 +1,147 @@
|
||||
{% set randomIdForDropdown = random(999999) %}
|
||||
|
||||
{% if properties.show_footer and properties.show_footer_icons %}
|
||||
|
||||
<a class='dropdown-button dropdownConfigureIcon dataTableAction'
|
||||
href='javascript:;'
|
||||
data-activates='dropdownConfigure{{ randomIdForDropdown }}'><span class="icon-configure"></span></a>
|
||||
|
||||
{% set activeFooterIcon = '' %}
|
||||
{% set numIcons = 0 %}
|
||||
{% set visualizationIcons %}
|
||||
<ul id='dropdownVisualizations{{ randomIdForDropdown }}' class='dropdown-content dataTableFooterIcons'>
|
||||
{% for footerIconGroup in footerIcons %}
|
||||
{% for footerIcon in footerIconGroup.buttons if footerIcon.icon %}
|
||||
<li>
|
||||
{% set numIcons = numIcons + 1 %}
|
||||
{% set isActiveEcommerceView = clientSideParameters.abandonedCarts is defined and
|
||||
((footerIcon.id == 'ecommerceOrder' and clientSideParameters.abandonedCarts == 0) or
|
||||
(footerIcon.id == 'ecommerceAbandonedCart' and clientSideParameters.abandonedCarts == 1)) %}
|
||||
<a class="{{ footerIconGroup.class }} tableIcon {% if clientSideParameters.viewDataTable == footerIcon.id or isActiveEcommerceView %}activeIcon{% set activeFooterIcon = footerIcon.icon %}{% endif %}"
|
||||
data-footer-icon-id="{{ footerIcon.id }}">
|
||||
{% if footerIcon.icon starts with 'icon-' %}
|
||||
<span title="{{ footerIcon.title }}" class="{{ footerIcon.icon }}"></span>
|
||||
{% else %}
|
||||
<img width="16" height="16" title="{{ footerIcon.title }}" src="{{ footerIcon.icon }}"/>
|
||||
{% endif %}
|
||||
{% if footerIcon.title is defined %}<span>{{ footerIcon.title }}</span>{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li class="divider"></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endset %}
|
||||
|
||||
{% if properties.show_periods %}
|
||||
<a class="dropdown-button dataTableAction activatePeriodsSelection"
|
||||
href="javascript:;"
|
||||
title="{{ 'CoreHome_ChangePeriod'|translate|e('html_attr') }}"
|
||||
data-activates="dropdownPeriods{{ randomIdForDropdown }}">
|
||||
<span class="icon-calendar"></span>
|
||||
</a>
|
||||
<ul id='dropdownPeriods{{ randomIdForDropdown }}' class='dropdown-content dataTablePeriods'>
|
||||
{% for selectablePeriod in properties.selectable_periods %}
|
||||
<li>
|
||||
<a data-period="{{ selectablePeriod }}" class="tableIcon {% if (clientSideParameters.period|default('')) == selectablePeriod %}activeIcon"{% endif %}"><span>{{ properties.translations[selectablePeriod]|default(selectablePeriod) }}</span></a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if activeFooterIcon and numIcons > 1 %}
|
||||
<a class="dropdown-button dataTableAction activateVisualizationSelection"
|
||||
href="javascript:;"
|
||||
data-activates="dropdownVisualizations{{ randomIdForDropdown }}">
|
||||
{% if activeFooterIcon starts with 'icon-' %}
|
||||
<span title="{{ 'CoreHome_ChangeVisualization'|translate|e('html_attr') }}" class="{{ activeFooterIcon }}"></span>
|
||||
{% else %}
|
||||
<img title="{{ 'CoreHome_ChangeVisualization'|translate|e('html_attr') }}" width="16" height="16" src="{{ activeFooterIcon }}"/>
|
||||
{% endif %}
|
||||
</a>
|
||||
{{ visualizationIcons|raw }}
|
||||
{% endif %}
|
||||
|
||||
{% if properties.show_export %}
|
||||
{% set requestParams = properties.request_parameters_to_modify|json_encode %}
|
||||
|
||||
{% set formats = {"CSV":"CSV","TSV":"TSV (Excel)","XML":"XML","JSON":"Json","PHP":"PHP","HTML":"HTML"} %}
|
||||
{% if properties.show_export_as_rss_feed %}
|
||||
{% set formats = formats|merge({"RSS": "RSS"}) %}
|
||||
{% endif %}
|
||||
|
||||
<a class="dataTableAction activateExportSelection" piwik-report-export
|
||||
report-title="{{ properties.title|e('html_attr') }}" request-params="{{ requestParams|e('html_attr') }}"
|
||||
api-method="{{ properties.apiMethodToRequestDataTable }}" report-formats="{{ formats|json_encode|e('html_attr') }}"
|
||||
href='javascript:;' title="{{ 'General_ExportThisReport'|translate|e('html_attr') }}"
|
||||
><span class="icon-export"></span></a>
|
||||
{% endif %}
|
||||
|
||||
{% if properties.show_export_as_image_icon %}
|
||||
<a class="dataTableAction tableIcon" href="javascript:;" id="dataTableFooterExportAsImageIcon"
|
||||
onclick="$(this).closest('.dataTable').find('div.jqplot-target').trigger('piwikExportAsImage'); return false;"
|
||||
title="{{ 'General_ExportAsImage'|translate }}">
|
||||
<span class="icon-image"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if isPluginLoaded('Annotations') and not properties.hide_annotations_view %}
|
||||
<a class='dataTableAction annotationView'
|
||||
href='javascript:;' title="{{ 'Annotations_Annotations'|translate|e('html_attr') }}"
|
||||
><span class="icon-annotation"></span></a>
|
||||
{% endif %}
|
||||
|
||||
{% if properties.show_search %}
|
||||
<a class='dropdown-button dataTableAction searchAction'
|
||||
href='javascript:;' title="{{ 'General_Search'|translate|e('html_attr') }}"
|
||||
><span class="icon-search"></span>
|
||||
<span class="icon-close" title="{{ 'CoreHome_CloseSearch'|translate|e('html_attr') }}"></span>
|
||||
<input id="widgetSearch_{{ properties.report_id }}"
|
||||
title="{{ 'CoreHome_DataTableHowToSearch'|translate|e('html_attr') }}"
|
||||
type="text"
|
||||
class="dataTableSearchInput browser-default" />
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if properties.datatable_actions|default is not empty %}
|
||||
{% for action in properties.datatable_actions %}
|
||||
<a class='dataTableAction {{ action.id|e('html_attr') }}'
|
||||
href='javascript:;' title="{{ action.title|e('html_attr') }}"
|
||||
>
|
||||
{% if action.icon starts with 'icon-' %}
|
||||
<span class="{{ action.icon }}"></span>
|
||||
{% else %}
|
||||
<img width="16" height="16" title="{{ action.title }}" src="{{ action.icon }}"/>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<ul id='dropdownConfigure{{ randomIdForDropdown }}' class='dropdown-content tableConfiguration'>
|
||||
{% if properties.show_flatten_table %}
|
||||
{% if clientSideParameters.flat is defined and clientSideParameters.flat == 1 %}
|
||||
<li>
|
||||
<div class="configItem dataTableIncludeAggregateRows"></div>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<div class="configItem dataTableFlatten"></div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if not isDataTableEmpty and properties.show_totals_row|default(0) %}
|
||||
<li>
|
||||
<div class="configItem dataTableShowTotalsRow"></div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if properties.show_exclude_low_population %}
|
||||
<li>
|
||||
<div class="configItem dataTableExcludeLowPopulation"></div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if properties.show_pivot_by_subtable|default is not empty %}
|
||||
<li>
|
||||
<div class="configItem dataTablePivotBySubtable"></div>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
@ -0,0 +1,58 @@
|
||||
{% spaceless %}
|
||||
{% set tooltipIndex = column ~ '_tooltip' %}
|
||||
{% if row.getMetadata(tooltipIndex) %}<span class="cell-tooltip" data-tooltip="{{ row.getMetadata(tooltipIndex) }}">{% endif %}
|
||||
{% if not row.getIdSubDataTable() and column=='label' and row.getMetadata('url') %}
|
||||
<a rel="noreferrer noopener"
|
||||
target="_blank"
|
||||
href='{% if row.getMetadata('url')|slice(0,4) not in ['http','ftp:'] %}http://{% endif %}{{ row.getMetadata('url')|rawSafeDecoded }}'>
|
||||
{% if not row.getMetadata('logo') %}
|
||||
<img class="link" width="10" height="9"
|
||||
src="plugins/Morpheus/images/link.png"/>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% set totals = dataTable.getMetadata('totals') %}
|
||||
{% if column in properties.report_ratio_columns and column in totals|keys -%}
|
||||
{% set labelColumn = columns_to_display|first %}
|
||||
{% set reportTotal = totals[column] %}
|
||||
{% if siteSummary is defined and siteSummary is not empty and siteSummary.getFirstRow %}
|
||||
{% set siteTotal = siteSummary.getFirstRow.getColumn(column) %}
|
||||
{% else %}
|
||||
{% set siteTotal = 0 %}
|
||||
{% endif %}
|
||||
{% set rowPercentage = row.getColumn(column)|percentage(reportTotal, 1) %}
|
||||
{% set metricTitle = translations[column]|default(column) %}
|
||||
{% set reportLabel = row.getColumn(labelColumn)|truncate(40)|rawSafeDecoded %}
|
||||
|
||||
{% set reportRatioTooltip = 'General_ReportRatioTooltip'|translate(reportLabel, rowPercentage|e('html_attr'), reportTotal|e('html_attr'), metricTitle|e('html_attr'), translations[labelColumn]|default(labelColumn)|e('html_attr')) %}
|
||||
|
||||
{% if siteTotal and siteTotal > reportTotal %}
|
||||
{% set totalPercentage = row.getColumn(column)|percentage(siteTotal, 1) %}
|
||||
{% set totalRatioTooltip = 'General_TotalRatioTooltip'|translate(totalPercentage, siteTotal|number(2,0), metricTitle) %}
|
||||
{% else %}
|
||||
{% set totalRatioTooltip = '' %}
|
||||
{% endif %}
|
||||
|
||||
<span class="ratio"
|
||||
title="{{ reportRatioTooltip|raw }} {{ totalRatioTooltip|e('html_attr') }}"
|
||||
> {{ rowPercentage }}</span>
|
||||
{%- endif %}
|
||||
|
||||
{% if column=='label' %}
|
||||
{% import 'macros.twig' as piwik %}
|
||||
|
||||
<span class='label{% if row.getMetadata('is_aggregate') %} highlighted{% endif %}'
|
||||
{% if properties is defined and properties.tooltip_metadata_name is not empty %}title="{{ row.getMetadata(properties.tooltip_metadata_name) }}"{% endif %}>
|
||||
{{ piwik.logoHtml(row.getMetadata(), row.getColumn('label')) }}
|
||||
{% if row.getMetadata('html_label_prefix') %}<span class='label-prefix'>{{ row.getMetadata('html_label_prefix') | raw }} </span>{% endif -%}
|
||||
{% endif %}<span class="value">
|
||||
{%- if row.getColumn(column) or (column=='label' and row.getColumn(column) is same as("0")) %}{% if column=='label' %}{{- row.getColumn(column)|rawSafeDecoded -}}{% else %}{% if row.getMetadata('html_column_' ~ column ~ '_prefix') %}<span class='column-prefix'>{{ row.getMetadata('html_column_' ~ column ~ '_prefix') | raw }}</span>{% endif -%}{{- row.getColumn(column)|number(2,0)|rawSafeDecoded -}}{% if row.getMetadata('html_column_' ~ column ~ '_suffix') %}<span class='column-suffix'>{{ row.getMetadata('html_column_' ~ column ~ '_suffix') | raw }}</span>{% endif -%}{% endif %}
|
||||
{%- else -%}-
|
||||
{%- endif -%}</span>
|
||||
{% if column=='label' %}{%- if row.getMetadata('html_label_suffix') %}<span class='label-suffix'>{{ row.getMetadata('html_label_suffix') | raw }}</span>{% endif -%}</span>{% endif %}
|
||||
{% if not row.getIdSubDataTable() and column=='label' and row.getMetadata('url') %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if row.getMetadata(tooltipIndex) %}</span>{% endif %}
|
||||
|
||||
{% endspaceless %}
|
@ -0,0 +1,53 @@
|
||||
<div class="dataTableFeatures">
|
||||
<div class="dataTableFooterNavigation">
|
||||
|
||||
{% if not isDataTableEmpty and (properties.show_offset_information or properties.show_pagination_control) %}
|
||||
<div class="row dataTablePaginationControl">
|
||||
{% if properties.show_pagination_control %}
|
||||
<span class="dataTablePrevious">‹ {% if clientSideParameters.dataTablePreviousIsFirst is defined %}{{ 'General_First'|translate }}{% else %}{{ 'General_Previous'|translate }}{% endif %}</span>
|
||||
|
||||
{% endif %}
|
||||
{% if properties.show_offset_information %}
|
||||
<span class="dataTablePages"></span>
|
||||
{% endif %}
|
||||
{% if properties.show_pagination_control %}
|
||||
<span class="dataTableNext">{{ 'General_Next'|translate }} ›</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col s9 m9 dataTableControls">
|
||||
{% include "@CoreHome/_dataTableActions.twig" %}
|
||||
</div>
|
||||
|
||||
{% if not isDataTableEmpty and (properties.show_footer_icons and properties.show_pagination_control or properties.show_limit_control) %}
|
||||
<div class="col s3 m3 limitSelection"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if (properties.related_reports is not empty) and properties.show_related_reports %}
|
||||
<div class="row datatableRelatedReports">
|
||||
{{ properties.related_reports_title|raw }}
|
||||
<ul style="list-style:none;{% if properties.related_reports|length == 1 %}display:inline-block;{% endif %}}">
|
||||
<li><span href="{{ properties.self_url }}" style="display:none;">{{ properties.title }}</span></li>
|
||||
|
||||
{% for reportUrl,reportTitle in properties.related_reports %}
|
||||
<li><span href="{{ reportUrl }}">{{ reportTitle }}</span></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<span class="loadingPiwik" style="display:none;"><img src="plugins/Morpheus/images/loading-blue.gif"/> {{ 'General_LoadingData'|translate }}</span>
|
||||
|
||||
{% if properties.show_footer_message is defined and properties.show_footer_message is not empty %}
|
||||
<div class='datatableFooterMessage'>{{ properties.show_footer_message | raw }}</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<span class="loadingPiwikBelow" style="display:none;"><img src="plugins/Morpheus/images/loading-blue.gif"/> {{ 'General_LoadingData'|translate }}</span>
|
||||
|
||||
<div class="dataTableSpacer"></div>
|
@ -0,0 +1,18 @@
|
||||
<thead>
|
||||
<tr>
|
||||
{% for column in properties.columns_to_display %}
|
||||
<th class="{% if properties.enable_sort %}sortable{% endif %} {% if loop.first %}first{% elseif loop.last %}last{% endif %}" id="{{ column }}">
|
||||
{% if properties.metrics_documentation[column]|default is not empty %}
|
||||
<div class="columnDocumentation">
|
||||
<div class="columnDocumentationTitle">
|
||||
<span class="icon-help"></span>
|
||||
{{ properties.translations[column]|default(column)|rawSafeDecoded }}
|
||||
</div>
|
||||
{{ properties.metrics_documentation[column]|rawSafeDecoded|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="thDIV" class="thDIV">{{ properties.translations[column]|default(column)|rawSafeDecoded }}</div>
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
@ -0,0 +1,5 @@
|
||||
<script type="text/javascript" defer="defer">
|
||||
$(document).ready(function () {
|
||||
require('piwik/UI/DataTable').initNewDataTables();
|
||||
});
|
||||
</script>
|
58
msd2/tracking/piwik/plugins/CoreHome/templates/_donate.twig
Normal file
58
msd2/tracking/piwik/plugins/CoreHome/templates/_donate.twig
Normal file
@ -0,0 +1,58 @@
|
||||
<div class="piwik-donate-call">
|
||||
<div class="piwik-donate-message">
|
||||
{% if msg is defined %}
|
||||
{{ msg }}
|
||||
{% else %}
|
||||
<p>{{ 'CoreHome_DonateCall1'|translate }}</p>
|
||||
<p><strong>{{ 'CoreHome_DonateCall2'|translate }}</strong></p>
|
||||
<p>{{ 'CoreHome_DonateCall3'|translate('<strong>','</strong>', '<a target="_blank" rel="nofollow" href="https://matomo.org/recommends/premium-plugins/"><strong>', '</strong></a>')|raw }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<span id="piwik-worth">{{ 'CoreHome_HowMuchIsPiwikWorth'|translate }}</span>
|
||||
|
||||
<div class="donate-form-instructions">({{ 'CoreHome_DonateFormInstructions'|translate }})</div>
|
||||
|
||||
<form action="index.php?module=CoreHome&action=redirectToPaypal&idSite=1" method="post" target="_blank">
|
||||
<div class="piwik-donate-slider">
|
||||
<div class="slider-range">
|
||||
<div class="slider-position"></div>
|
||||
</div>
|
||||
<div style="display:inline-block;float:right;">
|
||||
<div class="slider-donate-amount">$30/{{ 'Intl_Year_Short'|translate }}</div>
|
||||
|
||||
<img class="slider-smiley-face" width="40" height="40" src="plugins/Morpheus/images/smileyprog_1.png"/>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="os0" value="Option 1"/>
|
||||
</div>
|
||||
|
||||
<div class="donate-submit">
|
||||
<input type="image" src="plugins/Morpheus/images/paypal_subscribe.png" border="0" name="submit"
|
||||
title="{{ 'CoreHome_SubscribeAndBecomePiwikSupporter'|translate }}"/>
|
||||
<a class="donate-spacer">{{ 'CoreHome_MakeOneTimeDonation'|translate }}</a>
|
||||
<a href="index.php?module=CoreHome&action=redirectToPaypal&idSite=1&onetime=true"
|
||||
rel="noreferrer noopener" target="_blank" class="donate-one-time">{{ 'CoreHome_MakeOneTimeDonation'|translate }}</a>
|
||||
</div>
|
||||
|
||||
<!-- to cache images -->
|
||||
<img style="display:none;" src="plugins/Morpheus/images/smileyprog_0.png"/>
|
||||
<img style="display:none;" src="plugins/Morpheus/images/smileyprog_1.png"/>
|
||||
<img style="display:none;" src="plugins/Morpheus/images/smileyprog_2.png"/>
|
||||
<img style="display:none;" src="plugins/Morpheus/images/smileyprog_3.png"/>
|
||||
<img style="display:none;" src="plugins/Morpheus/images/smileyprog_4.png"/>
|
||||
</form>
|
||||
{% if footerMessage is defined %}
|
||||
<div class="form-description">
|
||||
{{ footerMessage }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
// Note: this will cause problems if more than one donate form is on the page
|
||||
$('.piwik-donate-slider').each(function () {
|
||||
$(this).trigger('piwik:changePosition', {position: 1});
|
||||
});
|
||||
});
|
||||
</script>
|
@ -0,0 +1,6 @@
|
||||
{% if isCustomLogo and customFavicon is defined and customFavicon %}
|
||||
<link rel="shortcut icon" href="{{ customFavicon }}"/>
|
||||
{% else %}
|
||||
<link rel="shortcut icon" href="plugins/CoreHome/images/favicon.png"/>
|
||||
<link rel="icon" type='image/png' sizes='256x256' href="plugins/CoreHome/images/applogo_256.png"/>
|
||||
{% endif %}
|
@ -0,0 +1,58 @@
|
||||
{# testing, remove test_ from var names #}
|
||||
{% set test_latest_version_available="4.0.0" %}
|
||||
{% set test_piwikUrl='https://demo.matomo.org/' %}
|
||||
{% set isPiwikDemo %}{{ piwikUrl == 'http://demo.matomo.org/' or piwikUrl == 'https://demo.matomo.org/' }}{% endset %}
|
||||
|
||||
{% set updateCheck %}
|
||||
<span id="updateCheckLinkContainer">
|
||||
<span class="icon icon-fixed icon-reload"></span>
|
||||
{{ 'CoreHome_CheckForUpdates'|translate }}
|
||||
</span>
|
||||
{% endset %}
|
||||
|
||||
{% if (latest_version_available and not isPiwikDemo and hasSomeViewAccess and not isUserIsAnonymous and showUpdateNotificationToUser) or (isSuperUser and isAdminArea is defined and isAdminArea) %}
|
||||
<div piwik-expand-on-hover
|
||||
id="header_message"
|
||||
class="piwikSelector borderedControl {% if not latest_version_available %}header_info{% else %}{% endif %} piwikTopControl {% if latest_version_available %}update_available{% endif %}"
|
||||
>
|
||||
|
||||
{% if latest_version_available and not isPiwikDemo %}
|
||||
<a class="title" href="?module=CoreUpdater&action=newVersionAvailable" style="cursor:pointer;">
|
||||
{{ 'General_NewUpdatePiwikX'|translate(latest_version_available) }}
|
||||
<span class="icon-warning"></span>
|
||||
</a>
|
||||
{% elseif isSuperUser and isAdminArea is defined and isAdminArea %}
|
||||
{% if isInternetEnabled %}
|
||||
<a class="title">{{ updateCheck|raw }}</a>
|
||||
{% else %}
|
||||
<a class="title" href="https://matomo.org/changelog/" target="_blank" rel="noreferrer noopener">
|
||||
<span id="updateCheckLinkContainer">
|
||||
{{ 'CoreHome_SeeAvailableVersions'|translate }}
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="dropdown positionInViewport">
|
||||
{% if latest_version_available and isSuperUser %}
|
||||
{% if isMultiServerEnvironment %}
|
||||
{{ 'CoreHome_OneClickUpdateNotPossibleAsMultiServerEnvironment'|translate("<a rel='noreferrer noopener' href='https://builds.matomo.org/piwik-" ~ latest_version_available ~ ".zip'>","</a>")|raw }}
|
||||
{% else %}
|
||||
{{ 'General_PiwikXIsAvailablePleaseUpdateNow'|translate(latest_version_available,"<br /><a href='index.php?module=CoreUpdater&action=newVersionAvailable'>","</a>","<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/changelog/'>","</a>")|raw }}
|
||||
{% endif %}
|
||||
<br />
|
||||
{% elseif latest_version_available and not isPiwikDemo and hasSomeViewAccess and not isUserIsAnonymous %}
|
||||
{% set updateSubject = 'General_NewUpdatePiwikX'|translate(latest_version_available)|e('url') %}
|
||||
{{ 'General_PiwikXIsAvailablePleaseNotifyPiwikAdmin'|translate("<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/'>Piwik</a> <a target='_blank' rel='noreferrer noopener' href='https://matomo.org/changelog/'>" ~ latest_version_available ~ "</a>", "<a href='mailto:" ~ superUserEmails ~ "?subject=" ~ updateSubject ~ "'>", "</a>")|raw }}
|
||||
<br />
|
||||
{% endif %}
|
||||
|
||||
{{ 'General_YouAreCurrentlyUsing'|translate(piwik_version) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="icon icon-arrowup"></span>
|
||||
<div style="clear:right"></div>
|
||||
{% else %}
|
||||
<span class="icon icon-arrowup"></span>
|
||||
{% endif %}
|
@ -0,0 +1,28 @@
|
||||
{% set fontStyle %}color:{{ themeStyles.colorText|e('html_attr') }};font-family:{{ themeStyles.fontFamilyBase|e('html_attr') }};{% endset %}
|
||||
{% set styleParagraph = 'font-size:15px;line-height:24px;margin:0 0 16px;' %}
|
||||
{% set footerParagraphStyle %}{{styleParagraph}}{{fontStyle}}text-align:center;font-size:13px; color:#666;{% endset %}
|
||||
{% set hasHorizontalRule = not hasWhiteLabel or unsubscribeLink|default is not empty %}
|
||||
|
||||
{% if hasHorizontalRule %}
|
||||
<hr style=" border: 0; margin-top: 50px; height: 1px; background-image: linear-gradient(to right, rgba(231, 231, 231, 0), rgba(231, 231, 231, 1), rgba(2311, 2311, 231, 0));">
|
||||
{% else %}
|
||||
<br/>
|
||||
{% endif %}
|
||||
|
||||
{% if not hasWhiteLabel %}
|
||||
<p style='{{ footerParagraphStyle }}padding-top:30px;margin-bottom:0;'>
|
||||
{{'General_PoweredBy'|translate}}
|
||||
<a style="color:#439fe0;" href="https://matomo.org/" title="Matomo Analytics">Matomo Analytics</a>
|
||||
<br />
|
||||
{{ 'CoreHome_LeadingAnalyticsPlatformRespectsYourPrivacy'|translate }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if unsubscribeLink|default is not empty %}
|
||||
{% set unsubLink %}<a style="color:#439fe0;" href="{{ unsubscribeLink|e('html_attr') }}">{{ 'ScheduledReports_Unsubscribe'|translate }}</a>{% endset %}
|
||||
<p style='{{ footerParagraphStyle }}{% if hasWhiteLabel %}padding-top:30px;{% endif %}'>{{ 'ScheduledReports_UnsubscribeFooter'|translate(unsubLink)|raw }}.</p>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,34 @@
|
||||
<html style="background-color:#edecec">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<meta name="generator" content="Matomo Analytics">
|
||||
</head>
|
||||
|
||||
<body style="{{fontStyle|raw}} line-height: 24px; margin:0 auto; max-width:1000px; background-color:rgb(255, 255, 255);box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.75);">
|
||||
|
||||
<a name="reportTop"></a>
|
||||
|
||||
<table style="width:100%; background-color: {{ themeStyles.colorHeaderBackground|e('html_attr') }}; color: {{ themeStyles.colorHeaderText|e('html_attr') }}; padding:10px 0; margin: 0 0 25px 0; height:64px;">
|
||||
<tr>
|
||||
<td>
|
||||
<a style="{{ fontStyle|raw }}; font-size:16px;padding:0 15px;color: {{ themeStyles.colorHeaderText|e('html_attr') }};height: 22px;display: inline-block;vertical-align: inherit;" rel="noreferrer noopener" target="_blank" href="{{ piwikUrl }}">
|
||||
{% if isCustomLogo and logoHeader %}
|
||||
<img src="{{ logoHeader }}" height="20px" width="auto" />
|
||||
{% else %}
|
||||
<img src="{{ piwikUrl }}/plugins/Morpheus/images/logo-email.png" height="20px" width="auto" alt="{{ emailStyles.brandNameLong|e('html_attr') }}" />
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
<td align="right">
|
||||
{% if idSite|default is not empty %}
|
||||
<a style="{{ fontStyle|raw }}; font-size:16px; padding:0 15px; color: {{ themeStyles.colorHeaderText|e('html_attr') }}" {% if websiteName|default is not empty %}title="{{'Dashboard_TopLinkTooltip'|translate(websiteName)}}"{% endif %} target="_blank" href="{{ piwikUrl }}{{ linkTo({'module': 'CoreHome', 'action': 'redirectToCoreHomeIndex', 'idSite': idSite, 'period': period|default, 'date': date|default, 'token_auth': null, 'method': null, 'idReport': null, 'outputType': null, 'format': null})|raw }}">
|
||||
{{ 'Dashboard_Dashboard'|translate }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="margin:0 20px;">
|
@ -0,0 +1,22 @@
|
||||
{% import 'ajaxMacros.twig' as ajax %}
|
||||
<div class="pageWrap container-fluid">
|
||||
<a name="main"></a>
|
||||
{% include "@CoreHome/_notifications.twig" %}
|
||||
<div class="top_controls">
|
||||
{% include "@CoreHome/_periodSelect.twig" %}
|
||||
{{ postEvent("Template.nextToCalendar") }}
|
||||
{% render dashboardSettingsControl %}
|
||||
{% include "@CoreHome/_headerMessage.twig" %}
|
||||
{{ ajax.requestErrorDiv(emailSuperUser|default('')) }}
|
||||
</div>
|
||||
|
||||
{{ ajax.loadingDiv() }}
|
||||
|
||||
<div piwik-popover></div>
|
||||
|
||||
<div id="content" class="home">
|
||||
{% if content %}{{ content }}{% endif %}
|
||||
<div piwik-reporting-page ng-cloak></div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
@ -0,0 +1,3 @@
|
||||
<noscript>
|
||||
<div id="javascriptDisabled">{{ 'CoreHome_JavascriptDisabled'|translate('<a href="">','</a>')|raw }}</div>
|
||||
</noscript>
|
17
msd2/tracking/piwik/plugins/CoreHome/templates/_logo.twig
Normal file
17
msd2/tracking/piwik/plugins/CoreHome/templates/_logo.twig
Normal file
@ -0,0 +1,17 @@
|
||||
<span id="logo" class="logo brand-logo {% if centeredLogo is defined and centeredLogo %}center{% endif %}">
|
||||
{% if logoLink is not defined or logoLink is not empty %}
|
||||
<a href="{{ logoLink|default('index.php') }}" tabindex="-1"
|
||||
title="{% if isCustomLogo %}{{ 'General_PoweredBy'|translate }} {% endif %}Matomo # {{ 'General_OpenSourceWebAnalytics'|translate }}"
|
||||
>
|
||||
{% endif %}
|
||||
{% if hasSVGLogo %}
|
||||
<img src='{{ logoSVG }}?matomo' tabindex="3"
|
||||
alt="{% if isCustomLogo %}{{ 'General_PoweredBy'|translate }} {% endif %}Matomo"
|
||||
class="{% if not isCustomLogo %}default-piwik-logo{% endif %}" />
|
||||
{% else %}
|
||||
<img src='{% if useLargeLogo|default(false) %}{{ logoLarge }}{% else %}{{ logoHeader }}{% endif %}?matomo' alt="{% if isCustomLogo %}{{ 'General_PoweredBy'|translate }} {% endif %}Matomo" />
|
||||
{% endif %}
|
||||
{% if logoLink is not defined or logoLink is not empty %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</span>
|
81
msd2/tracking/piwik/plugins/CoreHome/templates/_menu.twig
Normal file
81
msd2/tracking/piwik/plugins/CoreHome/templates/_menu.twig
Normal file
@ -0,0 +1,81 @@
|
||||
{% macro menu(menu, anchorlink, cssClass, currentModule, currentAction) %}
|
||||
<div id="secondNavBar" class="{{ cssClass }} z-depth-1">
|
||||
<ul class="navbar hide-on-med-and-down" aria-label="{{ 'CoreHome_MainNavigation'|translate|e('html_attr') }}" role="menu">
|
||||
{% for level1,level2 in menu %}
|
||||
|
||||
{% set hasSubmenuItem = false %}
|
||||
{% for name,urlParameters in level2 %}
|
||||
{% if name|slice(0,1) != '_' %}
|
||||
{% set hasSubmenuItem = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if hasSubmenuItem %}
|
||||
<li class="menuTab" role="menuitem">
|
||||
|
||||
<a class="item" tabindex="5">
|
||||
<span class="menu-icon {{ level2._icon|default('icon-arrow-right') }}"></span>{{ level1|translate }}
|
||||
<span class="hidden">
|
||||
{{ 'CoreHome_Menu'|translate }}
|
||||
</span>
|
||||
</a>
|
||||
<ul role="menu">
|
||||
{% for name,urlParameters in level2 %}
|
||||
{% if name|slice(0,1) != '_' %}
|
||||
<li {% if urlParameters._url.module is defined and urlParameters._url.module == currentModule and urlParameters._url.action is defined and urlParameters._url.action == currentAction %}class="active"{% endif %}
|
||||
role="menuitem"
|
||||
>
|
||||
<a class="item" tabindex="5" target="_self"
|
||||
title="{{ urlParameters._tooltip|default('')|translate|e('html_attr') }}"
|
||||
{% if urlParameters._onclick is defined and urlParameters._onclick %}
|
||||
onclick="{{ urlParameters._onclick|e('html_attr') }};return false;"
|
||||
{% endif %}
|
||||
{% if urlParameters._url %}
|
||||
href="index.php?{{ urlParameters._url|urlRewriteWithParameters|slice(1) }}"
|
||||
{% endif %}>
|
||||
{% if urlParameters._icon is defined and urlParameters._icon %}<span class="icon {{ urlParameters._icon|e('html_attr') }}" style="margin-right: 5px;"></span>{% endif %}
|
||||
{{ name|translate }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul id="mobile-left-menu" class="side-nav hide-on-large-only">
|
||||
{% for level1,level2 in menu %}
|
||||
|
||||
{% set hasSubmenuItem = false %}
|
||||
{% for name,urlParameters in level2 %}
|
||||
{% if name|slice(0,1) != '_' %}
|
||||
{% set hasSubmenuItem = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if hasSubmenuItem %}
|
||||
<li class="no-padding">
|
||||
<ul class="collapsible collapsible-accordion" piwik-side-nav="nav .activateLeftMenu">
|
||||
<li>
|
||||
<a class="collapsible-header">{{ level1|translate }}<i class="{{ level2._icon|default('icon-arrow-down') }}"></i></a>
|
||||
<div class="collapsible-body">
|
||||
<ul>
|
||||
{% for name,urlParameters in level2 %}
|
||||
{% if name|slice(0,1) != '_' %}
|
||||
<li>
|
||||
<a title="{{ urlParameters._tooltip|default('')|translate|e('html_attr') }}" target="_self"
|
||||
href="index.php?{{ urlParameters._url|urlRewriteWithParameters|slice(1) }}">{{ name|translate }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endmacro %}
|
@ -0,0 +1,9 @@
|
||||
<div id="notificationContainer">
|
||||
{% if notifications|length %}
|
||||
{% for notificationId, n in notifications %}
|
||||
|
||||
{{ n.message|notification({'id': notificationId, 'type': n.type, 'title': n.title, 'noclear': n.hasNoClear, 'context': n.context, 'raw': n.raw}, false) }}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
@ -0,0 +1,7 @@
|
||||
<div
|
||||
id="periodString"
|
||||
piwik-period-selector
|
||||
periods="{{ enabledPeriods|json_encode|e('html_attr') }}"
|
||||
class="borderedControl piwikTopControl"
|
||||
>
|
||||
</div>
|
@ -0,0 +1,4 @@
|
||||
<div class="ui-confirm" id="shortcuthelp">
|
||||
<h2>{{ 'CoreHome_ShortcutsAvailable'|translate }}</h2>
|
||||
<dl></dl>
|
||||
</div>
|
@ -0,0 +1,2 @@
|
||||
<h2 piwik-enriched-headline>{{ title }}</h2>
|
||||
{{ report|raw }}
|
@ -0,0 +1,3 @@
|
||||
<div piwik-content-block content-title="{{ title|translate|e('html_attr') }}">
|
||||
{{ content|raw }}
|
||||
</div>
|
@ -0,0 +1,3 @@
|
||||
<div class="top_bar_sites_selector piwikTopControl">
|
||||
<div piwik-siteselector show-selected-site="true" class="sites_autocomplete"></div>
|
||||
</div>
|
46
msd2/tracking/piwik/plugins/CoreHome/templates/_topBar.twig
Normal file
46
msd2/tracking/piwik/plugins/CoreHome/templates/_topBar.twig
Normal file
@ -0,0 +1,46 @@
|
||||
{{ postEvent("Template.beforeTopBar", userAlias, userLogin, topMenu) }}
|
||||
<ul class="right hide-on-med-and-down">
|
||||
{% macro menuItemLabel(label, icon) %}
|
||||
{% if icon is defined and icon and icon starts with 'icon-' %}
|
||||
<span class="navbar-icon {{ icon|striptags }}" aria-label="{{ label|translate|e('html_attr') }}"></span>
|
||||
{% else %}
|
||||
{{ label|translate }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro topMenuItem(label, icon, menu) %}
|
||||
{% if menu._html is defined %}
|
||||
{{ menu._html|raw }}
|
||||
{% else %}
|
||||
<a {% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %}
|
||||
{% if menu._url.module is defined %}
|
||||
id="topmenu-{{ menu._url.module|lower }}"
|
||||
href="index.php{{ menu._url|urlRewriteWithParameters }}"
|
||||
{% else %}
|
||||
href="{{ menu._url }}" rel="noreferrer noopener"
|
||||
{% endif %}
|
||||
target="_self" tabindex="3">{{ _self.menuItemLabel(label, icon) }}</a>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro isActiveItem(menu, currentModule, currentAction) %}{% if (menu and menu._url and menu._url.module is defined and menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}active{% endif %}{% endmacro %}
|
||||
|
||||
{% if topMenuModule is not defined %}
|
||||
{% set topMenuModule = currentModule %}
|
||||
{% set topMenuAction = currentAction %}
|
||||
{% endif %}
|
||||
|
||||
{% spaceless %}
|
||||
{% for label,menu in topMenu %}
|
||||
<li role="menuitem" class="{{ _self.isActiveItem(menu, topMenuModule, topMenuAction) }}">{{ _self.topMenuItem(label, menu._icon, menu) }}</li>
|
||||
{% endfor %}
|
||||
{% endspaceless %}
|
||||
</ul>
|
||||
<ul class="side-nav hide-on-large-only" id="mobile-top-menu">
|
||||
{% for label,menu in topMenu %}
|
||||
<li role="menuitem" class="{{ _self.isActiveItem(menu, topMenuModule, topMenuAction) }}"
|
||||
>{{ _self.topMenuItem(label, '', menu) }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="javascript:;" data-activates="mobile-left-menu" class="activateLeftMenu hide-on-large-only button-collapse" style="display:none;"><span class="icon-menu-hamburger"></span></a>
|
||||
<a href="javascript:;" data-activates="mobile-top-menu" class="activateTopMenu hide-on-large-only button-collapse"><span class="icon-more-verti"></span></a>
|
@ -0,0 +1,7 @@
|
||||
<nav>
|
||||
<div class="nav-wrapper">
|
||||
<a href="#main" tabindex="1" class="accessibility-skip-to-content">{{'CoreHome_SkipToContent'|translate}}</a>
|
||||
{% include "@CoreHome/_logo.twig" %}
|
||||
{% include "@CoreHome/_topBar.twig" %}
|
||||
</div>
|
||||
</nav>
|
@ -0,0 +1,9 @@
|
||||
<div class="{{ cssIdentifier }} {{ cssClass }}"
|
||||
{% for name,value in htmlAttributes %}
|
||||
{{ name }}="{{ value|e('html_attr') }}"
|
||||
{% endfor %}
|
||||
data-props="{{ clientSideProperties|json_encode }}"
|
||||
data-params="{{ clientSideParameters|json_encode }}">
|
||||
{% render implView with implOverride %}
|
||||
</div>
|
||||
<script>$(document).ready(function () { require('{{ jsNamespace }}').{{ jsClass }}.initElements(); });</script>
|
@ -0,0 +1,21 @@
|
||||
{# untrusted host warning #}
|
||||
{% if (isValidHost is defined and invalidHostMessage is defined and isValidHost == false) %}
|
||||
{% set invalidHostText %}
|
||||
<a class="btn btn-link" style="float:right;" href="https://matomo.org/faq/troubleshooting/#faq_171" rel="noreferrer noopener" target="_blank">
|
||||
<span class="icon-help"></span>
|
||||
{{ 'General_Help'|translate }}
|
||||
</a>
|
||||
<strong>{{ 'General_Warning'|translate }}: </strong>{{ invalidHostMessage|raw }}
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
{{ invalidHostMessageHowToFix|raw }}
|
||||
{% endset %}
|
||||
|
||||
<div style="clear:both;width:800px;">
|
||||
{{ invalidHostText|notification({'noclear': true, 'raw': true, 'context': 'warning'}) }}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
@ -0,0 +1 @@
|
||||
{% include "@CoreHome/_headerMessage.twig" %}
|
@ -0,0 +1,23 @@
|
||||
{% extends "dashboard.twig" %}
|
||||
{% import 'ajaxMacros.twig' as ajax %}
|
||||
|
||||
{% block topcontrols %}
|
||||
{% include "@CoreHome/_siteSelectHeader.twig" %}
|
||||
{% include "@CoreHome/_periodSelect.twig" %}
|
||||
{{ postEvent("Template.nextToCalendar") }}
|
||||
{% render dashboardSettingsControl %}
|
||||
{% include "@CoreHome/_headerMessage.twig" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ ajax.requestErrorDiv(emailSuperUser|default(''), areAdsForProfessionalServicesEnabled, currentModule) }}
|
||||
{{ ajax.loadingDiv() }}
|
||||
|
||||
<div id="content" class="home">
|
||||
{% if content %}{{ content }}{% endif %}
|
||||
<div piwik-reporting-page ng-cloak></div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -0,0 +1 @@
|
||||
{% include "@CoreHome/_donate.twig" %}
|
@ -0,0 +1,40 @@
|
||||
{% set seriesColorCount = constant("Piwik\\Plugins\\CoreVisualizations\\Visualizations\\JqplotGraph\\Evolution::SERIES_COLOR_COUNT") %}
|
||||
<div class="rowevolution multirowevolution">
|
||||
<div class="popover-title">{{ 'RowEvolution_MultiRowEvolutionTitle'|translate }}</div>
|
||||
<div class="graph">
|
||||
{{ graph | raw }}
|
||||
</div>
|
||||
<div class="metrics-container">
|
||||
<h2>{{ availableRecordsText|translate }}</h2>
|
||||
<table class="metrics" border="0" cellpadding="0" cellspacing="0">
|
||||
{% for i, metric in metrics %}
|
||||
<tr {% if metric.hide|default %}style="display:none"{% endif %}>
|
||||
<td class="sparkline">
|
||||
{{ metric.sparkline|raw }}
|
||||
</td>
|
||||
<td class="text">
|
||||
{% import 'macros.twig' as piwik %}
|
||||
{{ piwik.logoHtml(metric, "") }}
|
||||
<span class="evolution-graph-colors" data-name="series{{ (i % seriesColorCount) + 1 }}">
|
||||
{{- metric.label|raw -}}
|
||||
</span>
|
||||
<span class="details" title="{{ metric.minmax }}">{{ metric.details|raw }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<a href="#" class="rowevolution-startmulti">» {{ 'RowEvolution_PickAnotherRow'|translate }}</a>
|
||||
</div>
|
||||
{% if availableMetrics|length > 1 %}
|
||||
<div class="metric-selectbox">
|
||||
<h2>{{ 'RowEvolution_AvailableMetrics'|translate }}</h2>
|
||||
<select name="metric" class="multirowevoltion-metric">
|
||||
{% for metric, metricName in availableMetrics %}
|
||||
<option value="{{ metric }}"{% if selectedMetric == metric %} selected="selected"{% endif %}>
|
||||
{{ metricName }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
@ -0,0 +1,52 @@
|
||||
<div id="piwik-promo">
|
||||
<div id="piwik-promo-video">
|
||||
<div id="piwik-promo-thumbnail">
|
||||
<img src="plugins/Morpheus/images/video_play.png"/>
|
||||
</div>
|
||||
|
||||
<div id="piwik-promo-embed" style="display:none;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a id="piwik-promo-videos-link" href="https://matomo.org/blog/2012/12/piwik-how-to-videos/" rel="noreferrer noopener" target="_blank">
|
||||
{{ 'CoreHome_ViewAllPiwikVideoTutorials'|translate }}
|
||||
</a>
|
||||
|
||||
<div id="piwik-promo-share">
|
||||
<span>{{ 'CoreHome_ShareThis'|translate }}:</span>
|
||||
|
||||
{# facebook #}
|
||||
<a href="https://www.facebook.com/sharer.php?u={{ promoVideoUrl|url_encode }}" rel="noreferrer noopener" target="_blank">
|
||||
<img src="plugins/Morpheus/icons/dist/socials/facebook.com.png" width="16px" height="16px" />
|
||||
</a>
|
||||
|
||||
{# twitter #}
|
||||
<a href="https://twitter.com/share?text={{ shareText|url_encode }}&url={{ promoVideoUrl|url_encode }}" rel="noreferrer noopener" target="_blank">
|
||||
<img src="plugins/Morpheus/icons/dist/socials/twitter.com.png" width="16px" height="16px" />
|
||||
</a>
|
||||
|
||||
{# email #}
|
||||
<a href="mailto:?body={{ shareTextLong|url_encode(true) }}&subject={{ shareText|url_encode(true) }}" target="_blank">
|
||||
<img src="plugins/Morpheus/images/email.png" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="clear:both;"></div>
|
||||
|
||||
<div id="piwik-widget-footer" style="color:#666;">{{ 'CoreHome_CloseWidgetDirections'|translate }}</div>
|
||||
</div>
|
||||
|
||||
<script type="application/javascript">
|
||||
$(function () {
|
||||
$('#piwik-promo-thumbnail').click(function () {
|
||||
var promoEmbed = $('#piwik-promo-embed'),
|
||||
widgetWidth = $(this).closest('.widgetContent').width(),
|
||||
height = (266 * widgetWidth) / 421,
|
||||
embedHtml = '<iframe width="100%" height="' + height + '" src="https://www.youtube-nocookie.com/embed/OslfF_EH81g?autoplay=1&vq=hd720&wmode=transparent" frameborder="0" wmode="Opaque"></iframe>';
|
||||
|
||||
$(this).hide();
|
||||
promoEmbed.height(height).html(embedHtml);
|
||||
promoEmbed.show();
|
||||
});
|
||||
});
|
||||
</script>
|
@ -0,0 +1,39 @@
|
||||
{% set seriesColorCount = constant("Piwik\\Plugins\\CoreVisualizations\\Visualizations\\JqplotGraph\\Evolution::SERIES_COLOR_COUNT") %}
|
||||
<div class="rowevolution">
|
||||
<div class="popover-title">{{ popoverTitle | raw }}</div>
|
||||
<div class="graph">
|
||||
{{ graph|raw }}
|
||||
</div>
|
||||
<div class="metrics-container">
|
||||
<h2>{{ availableMetricsText|raw }}</h2>
|
||||
|
||||
<div class="alert alert-info">
|
||||
{{ 'RowEvolution_Documentation'|translate }}
|
||||
</div>
|
||||
<table class="metrics" border="0" cellpadding="0" cellspacing="0" data-thing="{{ seriesColorCount }}">
|
||||
{% for i, metric in metrics %}
|
||||
<tr data-i="{{ i }}" {% if metric.hide|default %}style="display:none"{% endif %}>
|
||||
<td class="sparkline">
|
||||
{{ metric.sparkline|raw }}
|
||||
</td>
|
||||
<td class="text">
|
||||
<span class="evolution-graph-colors" data-name="series{{ (i % seriesColorCount) + 1 }}">
|
||||
{{- metric.label|raw -}}
|
||||
</span>
|
||||
{% if metric.details %}:
|
||||
<span class="details" title="{{ metric.minmax }}">{{ metric.details|raw }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="compare-container">
|
||||
<h2>{{ 'RowEvolution_CompareRows'|translate }}</h2>
|
||||
|
||||
<div class="alert alert-info">
|
||||
{{ 'RowEvolution_CompareDocumentation'|translate|raw }}
|
||||
</div>
|
||||
<a href="#" class="rowevolution-startmulti">» {{ 'RowEvolution_PickARow'|translate }}</a>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,26 @@
|
||||
<div class="widgetBody systemSummary">
|
||||
{% for item in items %}
|
||||
{% if item is not empty %}
|
||||
<div class="systemSummaryItem {% if item.getKey %}{{ item.getKey }}{% endif %}">
|
||||
{% if item.getIcon %}<span class="icon {{ item.getIcon }}"></span>{% endif %}
|
||||
|
||||
{% if item.getUrlParams -%}
|
||||
<a href="{{ linkTo(item.getUrlParams) }}" class="itemLabel">
|
||||
{% else -%}
|
||||
<span class="itemLabel">
|
||||
{% endif -%}
|
||||
|
||||
{{ item.getLabel }}{% if item.getValue %}:{% endif %}
|
||||
|
||||
{%- if item.getUrlParams %}
|
||||
</a>
|
||||
{%- else %}
|
||||
</span>
|
||||
{%- endif %}
|
||||
|
||||
{% if item.getValue %}<span class="itemValue">{{ item.getValue }}</span>{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<br />
|
||||
</div>
|
@ -0,0 +1,21 @@
|
||||
<div>
|
||||
<div piwik-widget
|
||||
containerid="{{ containerId|e('html_attr') }}"
|
||||
widgetized="{% if isWidgetized %}true{% else %}false{% endif %}"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
var piwikWidget = $('[piwik-widget][containerid={{ containerId|e('js') }}]');
|
||||
var isExportedAsWidget = $('body > .widget').length;
|
||||
|
||||
if (!isExportedAsWidget) {
|
||||
angular.element(document).injector().invoke(function($compile) {
|
||||
var scope = angular.element(piwikWidget).scope();
|
||||
$compile(piwikWidget)(scope.$new());
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
Reference in New Issue
Block a user