1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 22:47:43 +00:00
Files
matomo/plugins/CoreHome/templates/_headerMessage.twig
Michal Kleiner 1b2e4fa640 Hide update/version info when auto-update disabled (#21384)
Let auto-update enabled control the whole logic

The isAutoUpdateEnabled flag actually means the instance can talk to Matomo servers at all, so there wouldn't be any checks
if it was false anyway.
2023-10-17 08:00:30 +13:00

43 خطوط
2.0 KiB
Twig

{% set isPiwikDemo %}{{ piwikUrl == 'http://demo.matomo.org/' or piwikUrl == 'https://demo.matomo.org/' or piwikUrl == 'https://demo.matomo.cloud/' or piwikUrl == 'http://demo.matomo.cloud/' }}{% endset %}
{% set updateCheck %}
<span id="updateCheckLinkContainer">
<span class="icon icon-fixed icon-reload"></span>
{{ (lastUpdateCheckFailed|default(false) ? 'General_ErrorTryAgain' : 'CoreHome_CheckForUpdates')|translate }}
</span>
{% endset %}
{% if
isAutoUpdateEnabled and (
(latest_version_available and not isPiwikDemo and hasSomeViewAccess and not isUserIsAnonymous and showUpdateNotificationToUser)
or (
isSuperUser
and (
(isManualUpdateCheck is defined and isManualUpdateCheck and lastUpdateCheckFailed is defined and lastUpdateCheckFailed)
or (isAdminArea is defined and isAdminArea)
)
)
) %}
<div
vue-entry="CoreHome.VersionInfoHeaderMessage"
last-update-check-failed="{{ lastUpdateCheckFailed|default(false)|json_encode }}"
latest-version-available="{{ latest_version_available|default(null)|json_encode }}"
is-multi-server-environment="{{ isMultiServerEnvironment|default(false)|json_encode }}"
is-piwik-demo="{{ isPiwikDemo|default(false)|json_encode }}"
is-super-user="{{ isSuperUser|default(false)|json_encode }}"
is-admin-area="{{ isAdminArea|default(false)|json_encode }}"
is-internet-enabled="{{ isInternetEnabled|default(false)|json_encode }}"
update-check="{{ updateCheck|default|json_encode }}"
has-some-view-access="{{ hasSomeViewAccess|default(false)|json_encode }}"
is-anonymous="{{ isUserIsAnonymous|default(false)|json_encode }}"
contact-email="{{ contactEmail|json_encode }}"
piwik-version="{{ piwik_version|default(null)|json_encode }}"
class="borderedControl piwikTopControl"
></div>
<span class="icon icon-arrowup"></span>
<div style="clear:right"></div>
{% else %}
<span class="icon icon-arrowup"></span>
{% endif %}