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,71 @@
{%- set subtablesAreDisabled = properties.show_goals_columns|default(false)
and properties.disable_subtable_when_show_goals|default(false) -%}
{%- set showingEmbeddedSubtable = properties.show_embedded_subtable is not empty
and idSubtable|default(false) -%}
{% if error is defined %}
{{ error.message }}
{% else %}
{%- if not showingEmbeddedSubtable -%}
<table cellspacing="0" class="dataTable">
{% include "@CoreHome/_dataTableHead.twig" %}
<tbody>
{%- endif -%}
{% if showingEmbeddedSubtable and dataTable.getRowsCount() == 0 %}
{% if clientSideParameters is not defined or clientSideParameters.filter_pattern_recursive is not defined or not clientSideParameters.filter_pattern_recursive %}
<tr class="nodata">
<td colspan="{{ properties.columns_to_display|length }}">{{ 'CoreHome_CategoryNoData'|translate }}</td>
</tr>
{% endif %}
{% else %}
{%- for rowId, row in dataTable.getRows() -%}
{%- set rowHasSubtable = not subtablesAreDisabled and row.getIdSubDataTable() and properties.subtable_controller_action is not null -%}
{%- set rowSubtableId = row.getMetadata('idsubdatatable_in_db')|default(row.getIdSubDataTable()) -%}
{%- set isSummaryRow = rowId == constant('Piwik\\DataTable::ID_SUMMARY_ROW') -%}
{%- set shouldHighlightRow = isSummaryRow and properties.highlight_summary_row -%}
{# display this row if it doesn't have a subtable or if we don't replace the row with the subtable #}
{%- set showRow = subtablesAreDisabled
or not rowHasSubtable
or not properties.show_expanded|default(false)
or not properties.replace_row_with_subtable|default(false) -%}
{% if showRow %}
<tr {% if rowHasSubtable %}id="{{ rowSubtableId }}"{% endif %}
{% if row.getMetadata('segment') is not false %} data-segment-filter="{{ row.getMetadata('segment')|e('html_attr') }}"{% endif %}
{% if row.getMetadata('url') is not false %} data-url-label="{{ row.getMetadata('url')|rawSafeDecoded }}"{% endif %}
data-row-metadata="{{ row.getMetadata|json_encode|e('html_attr') }}"
class="{{ row.getMetadata('css_class') }} {% if rowHasSubtable %}subDataTable{% endif %}{% if shouldHighlightRow %} highlight{% endif %}{% if isSummaryRow %} summaryRow{% endif %}"
{% if rowHasSubtable %}title="{{ 'CoreHome_ClickRowToExpandOrContract'|translate }}"{% endif %}>
{% for column in properties.columns_to_display %}
{% set cellAttributes = visualization.getCellHtmlAttributes(row, column) %}
<td {% if cellAttributes is not empty %}{% for name, value in cellAttributes %}{{ name|e('html') }}="{{ value|e('html_attr') }}" {% endfor %}{% endif %}>
{% include "@CoreHome/_dataTableCell.twig" with properties %}
</td>
{% endfor %}
</tr>
{% endif %}
{# display subtable if present and showing expanded datatable #}
{% if properties.show_expanded|default(false) and rowHasSubtable %}
{% include "@CoreVisualizations/_dataTableViz_htmlTable.twig" with {'dataTable': row.getSubtable(), 'idSubtable': rowSubtableId} %}
{% endif %}
{%- endfor -%}
{% if dataTable.getTotalsRow and properties.show_totals_row %}
{% set row = dataTable.getTotalsRow %}
{% set rowId = 'totalsRow' %}
<tr class="{{ row.getMetadata('css_class') }} totalsRow"
title="Total values for this table">
{% for column in properties.columns_to_display %}
<td>
{% include "@CoreHome/_dataTableCell.twig" with properties %}
</td>
{% endfor %}
</tr>
{% endif %}
{% endif %}
{%- if not showingEmbeddedSubtable -%}
</tbody>
</table>
{%- endif -%}
{% endif %}

View File

@@ -0,0 +1,3 @@
<div alt="{{ 'Mobile_StaticGraph'|translate }}" class="jqplot-graph">
<div class="piwik-graph" data-data="{{ visualization.getGraphData(dataTable, properties)|json_encode }}"></div>
</div>

View File

@@ -0,0 +1,48 @@
{% import '@CoreVisualizations/macros.twig' as macros %}
{% if not isWidget %}
<div class="card"><div class="card-content">
{% endif %}
{% if title is not empty %}<h2 class="card-title"
{% if titleAttributes is not empty %}{% for attribute, value in titleAttributes %}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
>{{ title }}</h2>{% endif %}
{% if not isWidget %}
<div class="row">
<div class="col m6">
{% endif %}
{% for key, sparkline in sparklines %}
{% if key is even %}
{{ macros.singleSparkline(sparkline, allMetricsDocumentation, areSparklinesLinkable) }}
{% endif %}
{% endfor %}
{% if not isWidget %}
<br style="clear:left"/>
</div>
<div class="col m6">
{% endif %}
{% for key, sparkline in sparklines %}
{% if key is odd %}
{{ macros.singleSparkline(sparkline, allMetricsDocumentation, areSparklinesLinkable) }}
{% endif %}
{% endfor %}
<br style="clear:left"/>
{% if not isWidget %}
</div>
</div>
{% endif %}
{% if areSparklinesLinkable %}
{% include "_sparklineFooter.twig" %}
{% endif %}
{% if footerMessage is not empty %}
<div class='datatableFooterMessage'>{{ footerMessage | raw }}</div>
{% endif %}
{% if not isWidget %}
</div></div>
{% endif %}

View File

@@ -0,0 +1,17 @@
<div class="tagCloud">
{% for word,value in cloudValues %}
<span title="{{ value.word|rawSafeDecoded }} ({{ value.value }} {{ properties.translations[cloudColumn]|default(cloudColumn) }})" class="word size{{ value.size }}
{# we strike tags with 0 hits #}
{% if value.value == 0 %}valueIsZero{% endif %}">
{% if labelMetadata[value.word].url is not sameas(false) %}
<a href="{{ labelMetadata[value.word].url }}" rel="noreferrer noopener" target="_blank">
{% endif %}
{% if labelMetadata[value.word].logo is not sameas(false) %}
<img src="{{ labelMetadata[value.word].logo }}" width="{{ value.logoWidth }}" />
{% else %}
{{ value.wordTruncated|rawSafeDecoded }}
{% endif %}
{% if labelMetadata[value.word].url is not sameas(false) %}</a>{% endif %}
</span>
{% endfor %}
</div>

View File

@@ -0,0 +1,37 @@
{% macro singleSparkline(sparkline, allMetricsDocumentation, areSparklinesLinkable) %}
<div class="sparkline {% if areSparklinesLinkable is defined and not areSparklinesLinkable %}notLinkable{% endif %}">
{% if sparkline.url %}{{ sparkline(sparkline.url)|raw }}{% endif %}
<div>
{% for metric in sparkline.metrics %}
<span {% if allMetricsDocumentation[metric.column] is defined and allMetricsDocumentation[metric.column] %}title="{{ allMetricsDocumentation[metric.column] }}"{% endif %}>
{% if '%s' in metric.description -%}
{{ metric.description|translate("<strong>"~metric.value~"</strong>")|raw }}
{%- else %}
<strong>{{ metric.value }}</strong> {{ metric.description }}
{%- endif %}{% if not loop.last %}, {% endif %}
</span>
{% endfor %}
{% if sparkline.evolution is defined %}
{% set evolutionPretty = sparkline.evolution.percent %}
{% if sparkline.evolution.percent < 0 %}
{% set evolutionClass = 'negative-evolution' %}
{% set evolutionIcon = 'arrow_down.png' %}
{% elseif sparkline.evolution.percent == 0 %}
{% set evolutionClass = 'neutral-evolution' %}
{% set evolutionIcon = 'stop.png' %}
{% else %}
{% set evolutionClass = 'positive-evolution' %}
{% set evolutionIcon = 'arrow_up.png' %}
{% set evolutionPretty = '+' ~ sparkline.evolution.percent %}
{% endif %}
<span class="metricEvolution" title="{{ sparkline.evolution.tooltip }}"><img
style="padding-right:4px" src="plugins/MultiSites/images/{{ evolutionIcon }}"/>
<strong class="{{ evolutionClass }}">{{ evolutionPretty }}</strong></span>
{% endif %}
</div>
</div>
{% endmacro %}