Implement user and channel tags for intersections

modern-tables
Mark Veidemanis 2 years ago
parent f0c548db6f
commit a56042376c
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -101,6 +101,11 @@
<i class="fa-solid fa-user" aria-hidden="true"></i>
</span>
{{ user }}
{% if channel in num_users %}
<span class="tag">
{{ num_chans|index:user }}
</span>
{% endif %}
</a>
{% endfor %}
</div>
@ -112,6 +117,11 @@
<i class="fa-solid fa-hashtag" aria-hidden="true"></i>
</span>
{{ channel }}
{% if nick in num_chans %}
<span class="tag">
{{ num_users|index:channel }}
</span>
{% endif %}
</a>
{% endfor %}
</div>

@ -2,6 +2,7 @@ from django import template
register = template.Library()
@register.filter
def index(h, key):
return h[key]
return h[key]

Loading…
Cancel
Save