Improve log display for small displays

This commit is contained in:
Rodolphe Breard 2018-06-11 13:51:37 +02:00
parent 7dc976e347
commit 1b7152930d

View file

@ -58,22 +58,24 @@
</div>
{% endif %}
{% if entries and not filter_nsfw %}
<table class="table is-narrow is-striped">
<tbody>
{% for entry in entries %}
<tr>
{% if request.user.is_staff %}
<td>
<a href="{% url 'log_switch_entry' entry.pk %}?next={{ request.path_info }}">{% if entry.hidden %}<span class="has-text-danger"></span>{% else %}<span class="has-text-success"></span>{% endif %}</a>
</td>
{% endif %}
<td>{{ entry.created|date:"H:i:s" }}</td>
<td class="has-text-right{% if not entry.nick %} has-text-grey-light is-italic{% endif %}">{% if entry.nick %}{{ entry.nick }}{% else %}*{% endif %}</td>
<td{% if not entry.nick %} class="has-text-grey-light is-italic"{% endif %}>{{ entry.content|urlize }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="table-container">
<table class="table is-narrow is-striped is-fullwidth">
<tbody>
{% for entry in entries %}
<tr>
{% if request.user.is_staff %}
<td>
<a href="{% url 'log_switch_entry' entry.pk %}?next={{ request.path_info }}">{% if entry.hidden %}<span class="has-text-danger"></span>{% else %}<span class="has-text-success"></span>{% endif %}</a>
</td>
{% endif %}
<td>{{ entry.created|date:"H:i:s" }}</td>
<td class="has-text-right{% if not entry.nick %} has-text-grey-light is-italic{% endif %}">{% if entry.nick %}{{ entry.nick }}{% else %}*{% endif %}</td>
<td{% if not entry.nick %} class="has-text-grey-light is-italic"{% endif %}>{{ entry.content|urlize }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% elif entries %}
{% include "nsfw/alert.html" with next_url=current_url %}
{% endif %}