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 %} {% for item in object_list %}
<tr> <tr>
<td>{{ item.time }}</td> <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 <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 %}" 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> data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.nick }}</td>
{% endif %}
<td class="wrap">{{ item.msg }}</td> <td class="wrap">{{ item.msg }}</td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

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