Add tooltips to channel tags shown in devhub (#4447)

This commit is contained in:
Andrew Williamson 2017-01-24 11:19:47 +00:00 коммит произвёл GitHub
Родитель e68bc913a2
Коммит c318ae3559
5 изменённых файлов: 25 добавлений и 8 удалений

Просмотреть файл

@ -55,7 +55,9 @@
{% if addon.has_listed_versions() %}
{% if addon.has_unlisted_versions() %}
<li class="distribution-tag-listed">
<span class="distribution-tag-listed">AMO</span>
<span class="distribution-tag-listed tooltip"
title="{{ _('Listed on this site after passing code review. Automatic updates are handled by this site.') }}"
>AMO</span>
</li>
{% endif %}
<li class="addon-listed-status">
@ -107,8 +109,10 @@
{% set latest_unlisted_version=addon.find_latest_version(channel=amo.RELEASE_CHANNEL_UNLISTED) %}
{% if latest_unlisted_version %}
{% if addon.has_listed_versions() %}
<li class="distribution-tag-unlisted"">
<span class="distribution-tag-unlisted">Self</span>
<li class="distribution-tag-unlisted">
<span class="distribution-tag-unlisted tooltip"
title="{{ _('Signed for self-distribution. Updates are handled by you.') }}"
>Self</span>
</li>
{% endif %}

Просмотреть файл

@ -66,7 +66,9 @@
{% if addon.current_version %}
<div class="DevHub-MyAddons-item-version-details">
{% if addon.has_unlisted_versions() %}
<span class="DevHub-MyAddons-item-channel-listed">{{ _('AMO') }}</span>
<span class="DevHub-MyAddons-item-channel-listed tooltip"
title="{{ _('Listed on this site after passing code review. Automatic updates are handled by this site.') }}"
>AMO</span>
{% endif %}
<span class="DevHub-MyAddons-item-version">
@ -83,7 +85,9 @@
{% if latest_unlisted_version %}
<div class="DevHub-MyAddons-item-version-details">
{% if addon.has_listed_versions() %}
<span class="DevHub-MyAddons-item-channel-unlisted">{{ _('Self-hosted') }}</span>
<span class="DevHub-MyAddons-item-channel-unlisted tooltip"
title="{{ _('Signed for self-distribution. Updates are handled by you.') }}"
>Self</span>
{% endif %}
<span class="DevHub-MyAddons-item-version">

Просмотреть файл

@ -69,7 +69,9 @@
{% endif %}
{% include 'devhub/new-landing/components/footer.html' %}
<div id="tooltip">
<span></span>
</div>
{% block site_js %}
{% endblock %}
</body>

Просмотреть файл

@ -13,9 +13,13 @@
{% if has_listed_versions and has_unlisted_versions %}
{% macro distro_tag(channel) %}
{% if channel == amo.RELEASE_CHANNEL_LISTED %}
<span class="distribution-tag-listed">AMO</span>
<span class="distribution-tag-listed tooltip"
title="{{ _('Listed on this site after passing code review. Automatic updates are handled by this site.') }}"
>AMO</span>
{% elif channel == amo.RELEASE_CHANNEL_UNLISTED %}
<span class="distribution-tag-unlisted">Self</span>
<span class="distribution-tag-unlisted tooltip"
title="{{ _('Signed for self-distribution. Updates are handled by you.') }}"
>Self</span>
{% endif %}
{% endmacro %}
{% else %}

Просмотреть файл

@ -125,3 +125,6 @@ h3 {
// Footer
@import 'footer';
// Tooltip
@import (less) '../../impala/tooltips.less.css';