diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2017-05-13 01:30:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-13 01:30:42 +0300 |
commit | b0c772bc0040ce038e16f96955e538d0a1531ed4 (patch) | |
tree | b639e93a2d152fce2dbd872483b232b32fe64682 /plugins/CoreHome/templates | |
parent | 6af9851af0a91196361c8e392a067b22b0f6113c (diff) | |
parent | e2a5b2298548b545f757655bf51135456bb728a2 (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.twig | 48 |
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 |