Flip nickname and channel only if type is self

This commit is contained in:
Mark Veidemanis 2022-08-03 07:20:30 +01:00
parent 60270d9636
commit d6f47d0841
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 8 additions and 0 deletions

View File

@ -7,9 +7,15 @@
{% for item in object_list %}
<tr>
<td>{{ item.time }}</td>
{% if query is True and item.type == 'self' %}
<td
class="has-tooltip-right {% if item.online is True %}has-text-success{% elif item.online is False %}has-text-danger{% else %}has-text-warning{% endif %}"
data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.channel }}</td>
{% else %}
<td
class="has-tooltip-right {% if item.online is True %}has-text-success{% elif item.online is False %}has-text-danger{% else %}has-text-warning{% endif %}"
data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.nick }}</td>
{% endif %}
<td class="wrap">{{ item.msg }}</td>
</tr>
{% endfor %}

View File

@ -306,6 +306,8 @@ class DrilldownContextModal(APIView):
"mtype": query_params["mtype"],
"nick": query_params["nick"],
}
if nicks:
context["query"] = True
return render(request, self.template_name, context)