mirror of
https://github.com/pretix/pretix.git
synced 2026-09-15 16:34:42 +00:00
Fixes post-review
This commit is contained in:
@@ -313,4 +313,4 @@ class DeviceLastSeen(models.Model):
|
|||||||
@property
|
@property
|
||||||
def is_recent(self):
|
def is_recent(self):
|
||||||
# pretixSCAN/pretixPOS sync every 5 minutes, so 7 minutes can be considered "offline"
|
# pretixSCAN/pretixPOS sync every 5 minutes, so 7 minutes can be considered "offline"
|
||||||
return self.last_seen - now() < timedelta(minutes=7)
|
return now() - self.last_seen < timedelta(minutes=7)
|
||||||
|
|||||||
@@ -118,18 +118,10 @@
|
|||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>
|
<td>
|
||||||
{% if d.last_seen and d.last_seen.is_recent %}
|
<span class="fa fa-fw {% if d.last_seen and d.last_seen.is_recent %}fa-check-circle text-success{% else %}fa-circle text-danger{% endif %}"
|
||||||
<span class="fa fa-check-circle text-success"
|
data-toggle="tooltip"
|
||||||
data-toggle="tooltip"
|
title="{% if d.last_seen %}{% blocktrans with time=d.last_seen.last_seen|date:"SHORT_DATETIME_FORMAT" %}Last seen: {{ time }}{% endblocktrans %}{% else %}{% trans "No recent contact" %}{% endif %}"
|
||||||
title="{% if d.last_seen %}{% blocktrans with time=d.last_seen.last_seen|date:"SHORT_DATETIME_FORMAT" %}Last seen: {{ time }}{% endblocktrans %}{% else %}{% trans "No recent contact" %}{% endif %}"
|
></span>
|
||||||
></span>
|
|
||||||
{% else %}
|
|
||||||
<span class="fa fa-circle text-danger"
|
|
||||||
data-toggle="tooltip"
|
|
||||||
title="{% if d.last_seen %}{% blocktrans with time=d.last_seen.last_seen|date:"SHORT_DATETIME_FORMAT" %}Last seen: {{ time }}{% endblocktrans %}{% else %}{% trans "No recent contact" %}{% endif %}"
|
|
||||||
></span>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ d.device_id }}
|
{{ d.device_id }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user