On n'affiche pas de badge si pas d'événement
This commit is contained in:
parent
0da2a9995d
commit
4de99f328c
@ -79,11 +79,14 @@ def show_badge_moderate():
|
|||||||
Q(other_versions__representative__isnull=True)).values("start_day").\
|
Q(other_versions__representative__isnull=True)).values("start_day").\
|
||||||
count()
|
count()
|
||||||
|
|
||||||
return mark_safe('<a href="' + reverse_lazy('moderate') + '" ' +
|
if nb == 0:
|
||||||
' data-placement="bottom" '
|
return ""
|
||||||
' data-tooltip="' + str(nb) + ' événements à modérer (7 jours)"' +
|
else:
|
||||||
' class="badge" aria-label="modérer">' +
|
return mark_safe('<a href="' + reverse_lazy('moderate') + '" ' +
|
||||||
picto_from_name("target") + ' ' + str(nb) + '</a>')
|
' data-placement="bottom" '
|
||||||
|
' data-tooltip="' + str(nb) + ' événements à modérer (7 jours)"' +
|
||||||
|
' class="badge" aria-label="modérer">' +
|
||||||
|
picto_from_name("target") + ' ' + str(nb) + '</a>')
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag
|
@register.simple_tag
|
||||||
|
Loading…
x
Reference in New Issue
Block a user