Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2017-05-10 06:14:16 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2017-05-10 06:14:16 +0300
commit859810aeda6bcf9ad8a939a857ea97a42e0666a5 (patch)
treeb2c2e7eb5066ad55811365ba5350b65058d24f53 /plugins/CoreHome/templates
parentc7a9367d4ecead103086728761e85d44c3d9f6bb (diff)
Let plugins customize the system summary widget
Diffstat (limited to 'plugins/CoreHome/templates')
-rw-r--r--plugins/CoreHome/templates/getSystemSummary.twig48
1 files changed, 23 insertions, 25 deletions
diff --git a/plugins/CoreHome/templates/getSystemSummary.twig b/plugins/CoreHome/templates/getSystemSummary.twig
index 264162c180..aeaa07caed 100644
--- a/plugins/CoreHome/templates/getSystemSummary.twig
+++ b/plugins/CoreHome/templates/getSystemSummary.twig
@@ -1,28 +1,26 @@
<div class="widgetBody systemSummary">
- <div>
- <span class="icon icon-user"></span>
- <a href="{{ linkTo({'module': 'UsersManager', 'action': 'index'}) }}">{{ 'General_NUsers'|translate(numUsers) }}</a>
- </div>
- <div>
- <span><span class="icon icon-segment"></span> {{ 'CoreHome_SystemSummaryNSegments'|translate(numSegments) }}</span>
- </div>
- <div>
- <a href="{{ linkTo({'module': 'SitesManager', 'action': 'index'}) }}">{{ 'CoreHome_SystemSummaryNWebsites'|translate(numWebsites) }}</a>
- </div>
- <div>
- <a href="{{ linkTo({'module': 'CorePluginsAdmin', 'action': 'plugins'}) }}">{{ 'CoreHome_SystemSummaryNActivatedPlugins'|translate(numPlugins) }}</a>
- </div>
- <div>
- <span>{{ 'CoreHome_SystemSummaryPiwikVersion'|translate }}:</span>
- <span class="piwik-version">{{ piwikVersion }}</span>
- </div>
- <div>
- <span>{{ 'CoreHome_SystemSummaryMysqlVersion'|translate }}:</span>
- <span>{{ mySqlVersion }}</span>
- </div>
- <div>
- <span>{{ 'CoreHome_SystemSummaryPhpVersion'|translate }}:</span>
- <span>{{ phpVersion }}</span>
- </div>
+ {% 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> \ No newline at end of file