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-13 01:30:42 +0300
committerGitHub <noreply@github.com>2017-05-13 01:30:42 +0300
commitb0c772bc0040ce038e16f96955e538d0a1531ed4 (patch)
treeb639e93a2d152fce2dbd872483b232b32fe64682 /plugins/CoreHome/templates
parent6af9851af0a91196361c8e392a067b22b0f6113c (diff)
parente2a5b2298548b545f757655bf51135456bb728a2 (diff)
Merge pull request #11685 from piwik/customsystemsummary
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