Total number of menu notifications
This commit is contained in:
Родитель
76d27fe2a7
Коммит
3a2bc81659
|
@ -1,7 +1,8 @@
|
|||
{% extends "mobile/base.html" %}
|
||||
{% set num_new_challenges = 0 %}
|
||||
{% set num_new_challenges = 2 %}
|
||||
{% set num_new_badges = 11 %}
|
||||
|
||||
{% set num_notifications = num_new_challenges + num_new_badges %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="wrapper">
|
||||
|
@ -26,23 +27,25 @@
|
|||
<div id="menu" class="closed">
|
||||
<hr id="menu-hr">
|
||||
<div id="menu-header" class="closed">
|
||||
<div id="notifications">13</div>
|
||||
{% if num_notifications %}
|
||||
<div id="notifications">{{ num_notifications }}</div>
|
||||
{% endif %}
|
||||
{{ _('Menu') }}
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="{{ url('mobile.boost') }}">{{ _('Boost your Spark') }}</a></li>
|
||||
<li><a href="{{ url('mobile.stats') }}">{{ _('Stats') }}</a></li>
|
||||
<li><a href="{{ url('mobile.challenges') }}">{{ _('Challenges') }}
|
||||
{% if num_new_challenges > 0 %}
|
||||
{% if num_new_challenges %}
|
||||
{# L10n: {n} is the number of recently completed challenges. #}
|
||||
<span>{{ ngettext('+{n} new','+{n} new', num_new_challenges)|fe(n=num_new_challenges) }}</span>
|
||||
<span>{{ ngettext('+{n} new','+{n} new', num_new_challenges)|f(n=num_new_challenges) }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="{{ url('mobile.badges') }}">{{ _('Badges') }}
|
||||
{% if num_new_badges > 0 %}
|
||||
{% if num_new_badges %}
|
||||
{# L10n: {n} is the number of recently obtained badges. #}
|
||||
<span>{{ ngettext('+{n} new','+{n} new', num_new_badges)|fe(n=num_new_badges) }}</span>
|
||||
<span>{{ ngettext('+{n} new','+{n} new', num_new_badges)|f(n=num_new_badges) }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
|
|
Загрузка…
Ссылка в новой задаче