Implement user and channel tags for intersections
This commit is contained in:
parent
f0c548db6f
commit
a56042376c
|
@ -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…
Reference in New Issue