Skip to content
Extraits de code Groupes Projets
Valider 6ec19d16 rédigé par Thomas Steur's avatar Thomas Steur Validation de GitHub
Parcourir les fichiers

Minor marketplace plugin formatting tweak for bundles (#12144)

* Minor marketplace plugin formatting tweak

* fix position of comma
parent 0e6780eb
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -7,6 +7,8 @@
{{ errorMessage }}
{% elseif plugin %}
{% set isBundle = plugin.isBundle is defined and plugin.isBundle %}
{% if plugin.versions is not empty and plugin.versions[plugin.versions|length - 1] %}
{% set latestVersion = plugin.versions[plugin.versions|length - 1] %}
{% else %}
......@@ -176,11 +178,15 @@
<p><br /></p>
<dl>
<dt>{{ 'CorePluginsAdmin_Version'|translate }}</dt>
<dd>{{ plugin.latestVersion }}</dd>
{% if not isBundle %}
<dt>{{ 'CorePluginsAdmin_Version'|translate }}</dt>
<dd>{{ plugin.latestVersion }}</dd>
{% endif %}
<dt>{{ 'Marketplace_PluginKeywords'|translate }}</dt>
<dd>{{ plugin.keywords|join(', ') }}</dd>
{% if plugin.lastUpdated %}
{% if plugin.lastUpdated and not isBundle %}
<dt>{{ 'Marketplace_LastUpdated'|translate }}</dt>
<dd>{{ plugin.lastUpdated }}</dd>
{% endif %}
......@@ -188,50 +194,54 @@
<dt>{{ 'General_Downloads'|translate }}</dt>
<dd title="{{ 'Marketplace_NumDownloadsLatestVersion'|translate(latestVersion.numDownloads|number_format) }}">{{ plugin.numDownloads }}</dd>
{% endif %}
<dt>{{ 'Marketplace_Developer'|translate }}</dt>
<dd>{{ marketplaceMacro.pluginDeveloper(plugin.owner) }}</dd>
{% if latestVersion and latestVersion.license is defined and latestVersion.license and latestVersion.license.name is defined and latestVersion.license.name %}
<dt>{{ 'Marketplace_License'|translate }}</dt>
<dd>
{% if latestVersion.license.url is defined and latestVersion.license.url %}
<a rel="noreferrer"
href="{{ latestVersion.license.url }}"
target="_blank">{{ latestVersion.license.name }}</a>
{% else %}
{{ latestVersion.license.name }}
{% endif %}
</dd>
{% endif %}
<dt>{{ 'Marketplace_Authors'|translate }}</dt>
<dd>{% for author in plugin.authors if author.name %}
{% spaceless %}
{% if author.homepage %}
<a target="_blank" rel="noreferrer" href="{{ author.homepage }}">{{ author.name }}</a>
{% elseif author.email %}
<a href="mailto:{{ author.email|escape('url') }}">{{ author.name }}</a>
{% else %}
{{ author.name }}
{% endif %}
{% if loop.index < plugin.authors|length %}
,
{% if not isBundle %}
<dt>{{ 'Marketplace_Developer'|translate }}</dt>
<dd>{{ marketplaceMacro.pluginDeveloper(plugin.owner) }}</dd>
{% if latestVersion and latestVersion.license is defined and latestVersion.license and latestVersion.license.name is defined and latestVersion.license.name %}
<dt>{{ 'Marketplace_License'|translate }}</dt>
<dd>
{% if latestVersion.license.url is defined and latestVersion.license.url %}
<a rel="noreferrer"
href="{{ latestVersion.license.url }}"
target="_blank">{{ latestVersion.license.name }}</a>
{% else %}
{{ latestVersion.license.name }}
{% endif %}
{% endspaceless %}
{% endfor %}
</dd>
</dd>
{% endif %}
<dt>{{ 'Marketplace_Authors'|translate }}</dt>
<dd>{% for author in plugin.authors if author.name %}
{% spaceless %}
{% if author.homepage %}
<a target="_blank" rel="noreferrer" href="{{ author.homepage }}">{{ author.name }}</a>
{% elseif author.email %}
<a href="mailto:{{ author.email|escape('url') }}">{{ author.name }}</a>
{% else %}
{{ author.name }}
{% endif %}
{% if loop.index < plugin.authors|length %}
,
{% endif %}
{% endspaceless %}
{% endfor %}
</dd>
{% endif %}
<dt>{{ 'CorePluginsAdmin_Websites'|translate }}</dt>
<dd>
{% if plugin.homepage %}
<a target="_blank" rel="noreferrer" href="{{ plugin.homepage }}">{{ 'Marketplace_PluginWebsite'|translate }}</a>,
{% endif %}
<a target="_blank" rel="noreferrer" href="{{ plugin.homepage }}">{{ 'Marketplace_PluginWebsite'|translate }}</a>
{%- endif -%}
{% if plugin.changelog is defined and plugin.changelog and plugin.changelog.url is defined and plugin.changelog.url %}
<a target="_blank" rel="noreferrer" href="{{ plugin.changelog.url }}">{{ 'CorePluginsAdmin_Changelog'|translate }}</a>,
{% endif %}
{%- if plugin.changelog is defined and plugin.changelog and plugin.changelog.url is defined and plugin.changelog.url -%}
{%- if plugin.homepage %}, {% endif %}
<a target="_blank" rel="noreferrer" href="{{ plugin.changelog.url }}">{{ 'CorePluginsAdmin_Changelog'|translate }}</a>
{%- endif -%}
<a target="_blank" href="{{ plugin.repositoryUrl }}">GitHub</a>
{%- if plugin.repositoryUrl %}, <a target="_blank" href="{{ plugin.repositoryUrl }}">GitHub</a>{% endif %}
</dd>
{% if plugin.activity and plugin.activity.numCommits %}
......
......@@ -25,29 +25,31 @@
{% endif %}
<ul class="metadata">
<li>
{% if plugin.latestVersion %}
{{ 'CorePluginsAdmin_Version'|translate }}: {{ plugin.latestVersion }}
{% endif %}
{% if plugin.isBundle is not defined or not plugin.isBundle %}
<li>
{% if plugin.latestVersion %}
{{ 'CorePluginsAdmin_Version'|translate }}: {{ plugin.latestVersion }}
{% endif %}
{% if plugin.canBeUpdated %}
<a class="update-available"
{% if plugin.changelog is defined and plugin.changelog and plugin.changelog.url is defined and plugin.changelog.url %}
target="_blank" href="{{ plugin.changelog.url|e('html_attr') }}"
{% else %}
href="#" piwik-plugin-name="{{ plugin.name }}"
{% endif %}
title="{{ 'Marketplace_PluginUpdateAvailable'|translate(plugin.currentVersion, plugin.latestVersion) }}">
{{ 'Marketplace_NewVersion'|translate }}</a>
{% if plugin.canBeUpdated %}
<a class="update-available"
{% if plugin.changelog is defined and plugin.changelog and plugin.changelog.url is defined and plugin.changelog.url %}
target="_blank" href="{{ plugin.changelog.url|e('html_attr') }}"
{% else %}
href="#" piwik-plugin-name="{{ plugin.name }}"
{% endif %}
title="{{ 'Marketplace_PluginUpdateAvailable'|translate(plugin.currentVersion, plugin.latestVersion) }}">
{{ 'Marketplace_NewVersion'|translate }}</a>
{% endif %}
</li>
{% if plugin.lastUpdated %}
<li>{{ 'Marketplace_Updated'|translate }}: {{ plugin.lastUpdated }}</li>
{% endif %}
</li>
{% if plugin.lastUpdated %}
<li>{{ 'Marketplace_Updated'|translate }}: {{ plugin.lastUpdated }}</li>
{% endif %}
{% if plugin.numDownloads %}
<li>{{ 'General_Downloads'|translate }}: {{ plugin.numDownloads }}</li>
{% if plugin.numDownloads %}
<li>{{ 'General_Downloads'|translate }}: {{ plugin.numDownloads }}</li>
{% endif %}
<li>{{ 'Marketplace_Developer'|translate }}: {{ marketplaceMacro.pluginDeveloper(plugin.owner) }}</li>
{% endif %}
<li>{{ 'Marketplace_Developer'|translate }}: {{ marketplaceMacro.pluginDeveloper(plugin.owner) }}</li>
</ul>
{% macro moreDetailsLink(plugin) %}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter