{% macro tablePluginUpdates(pluginsHavingUpdate, nonce, isTheme) %}
{% if isTheme %}{{ 'CorePluginsAdmin_Theme'|translate }}{% else %}{{ 'General_Plugin'|translate }}{% endif %} | {{ 'CorePluginsAdmin_Version'|translate }} | {{ 'General_Description'|translate }} | {{ 'CorePluginsAdmin_Status'|translate }} | {{ 'General_Action'|translate }} |
---|---|---|---|---|
{{ plugin.name }} | {% if plugin.repositoryChangelogUrl %} {{ plugin.currentVersion }} => {{ plugin.latestVersion }} {% else %} {{ plugin.currentVersion }} => {{ plugin.latestVersion }} {% endif %} | {{ plugin.description }} {{ _self.missingRequirementsPleaseUpdateNotice(plugin) }} | {% if plugin.isActivated %} {{ 'CorePluginsAdmin_Active'|translate }} {% else %} {{ 'CorePluginsAdmin_Inactive'|translate }} {% endif %} | {% if 0 == plugin.missingRequirements|length %} Update {% else %} - {% endif %} |
{{ 'CorePluginsAdmin_Origin'|translate }} {{ 'General_All'|translate }} | {{ 'CorePluginsAdmin_OriginCore'|translate }} | {{ 'CorePluginsAdmin_OriginThirdParty'|translate }} {{ 'CorePluginsAdmin_Status'|translate }} {{ 'General_All'|translate }} | {{ 'CorePluginsAdmin_Active'|translate }} | {{ 'CorePluginsAdmin_Inactive'|translate }} {% if isMarketplaceEnabled %} {% if isTheme %} {{ 'CorePluginsAdmin_InstallNewThemes'|translate }} {% else %} {{ 'CorePluginsAdmin_InstallNewPlugins'|translate }} {% endif %} {% endif %}
{% endmacro %} {% macro missingRequirementsPleaseUpdateNotice(plugin) %} {% if plugin.missingRequirements and 0 < plugin.missingRequirements|length %} {% for req in plugin.missingRequirements -%}{% set requirement = req.requirement|capitalize %} {% if 'Php' == requirement %} {% set requirement = 'PHP' %} {% endif %} {{ 'CorePluginsAdmin_MissingRequirementsNotice'|translate(requirement, req.actualVersion, req.requiredVersion) }}
{%- endfor %} {% endif %} {% endmacro %} {% macro missingRequirementsInfo(pluginName, metadata, missingRequirements, marketplacePluginNames) %} {% set causedBy = '' %} {% for dependency in missingRequirements %} {% set causedBy = causedBy ~ dependency.requirement|capitalize ~ ' ' ~ dependency.causedBy %} {% if not loop.last %} {% set causedBy = causedBy ~ ', ' %} {% endif %} {% endfor %} {{ 'CorePluginsAdmin_PluginRequirement'|translate(pluginName, causedBy) }} {% if metadata is defined and metadata.support is defined and metadata.support.email and pluginName not in marketplacePluginNames %} {{ 'CorePluginsAdmin_EmailToEnquireUpdatedVersion'|translate('' ~ metadata.support.email ~ '', pluginName)|raw }} {% endif %} {% endmacro %} {% macro tablePlugins(pluginsInfo, pluginNamesHavingSettings, activateNonce, deactivateNonce, uninstallNonce, isTheme, marketplacePluginNames, displayAdminLinks) %}{% if isTheme %}{{ 'CorePluginsAdmin_Theme'|translate }}{% else %}{{ 'General_Plugin'|translate }}{% endif %} | {{ 'General_Description'|translate }} | {{ 'CorePluginsAdmin_Status'|translate }} | {% if (displayAdminLinks) %}{{ 'General_Action'|translate }} | {% endif %}
---|---|---|---|
{% if not plugin.isCorePlugin and name in marketplacePluginNames -%}
{{ name }}
{%- else %}
{{ name }}
{% endif %}
({% if plugin.isCorePlugin %}{{ 'CorePluginsAdmin_OriginCore'|translate }}{% else %}v{{ plugin.info.version }}{% endif %})
{% if name in pluginNamesHavingSettings %}
{{ 'General_Settings'|translate }} {% endif %} |
{% if plugin.missingRequirements is defined and plugin.missingRequirements %}
{{ _self.missingRequirementsInfo(name, plugin.info, plugin.missingRequirements, marketplacePluginNames) }}
{% endif %}
{{ plugin.info.description|raw|nl2br }}
{% if plugin.info.homepage|default is not empty and plugin.info.homepage not in [
'http://piwik.org', 'http://www.piwik.org', 'http://piwik.org/', 'http://www.piwik.org/'
] %}
({{ 'CorePluginsAdmin_PluginHomepage'|translate|replace({' ': ' '})|raw }})
{% endif %}
{% if plugin.info.license is defined %}
{% if plugin.info.license_homepage is defined %}{% endif %}{{ plugin.info.license }}{% if plugin.info.license_homepage is defined %}{% endif %}
{% endif %}
{% if plugin.info.authors is defined %}
{% endif %}
|
{% if not isDefaultTheme -%}
{% if plugin.activated %}
{{ 'CorePluginsAdmin_Active'|translate }}
{% else %}
{{ 'CorePluginsAdmin_Inactive'|translate }}
{% if plugin.uninstallable and displayAdminLinks %} - {{ 'CorePluginsAdmin_ActionUninstall'|translate }}{% endif %} {% endif %} {%- endif %} |
{% if displayAdminLinks %}
{% if not isDefaultTheme -%} {% if plugin.invalid is defined or plugin.alwaysActivated %} - {% else %} {% if plugin.activated %} {{ 'CorePluginsAdmin_Deactivate'|translate }} {% elseif plugin.missingRequirements %} - {% else %} {{ 'CorePluginsAdmin_Activate'|translate }} {% endif %} {% endif %} {%- endif %} | {% endif %}