Disable empty log sources
This commit is contained in:
parent
7fe6c91bed
commit
9f490febdf
1 changed files with 4 additions and 0 deletions
|
@ -10,9 +10,13 @@
|
|||
<nav class="panel">
|
||||
<p class="panel-heading">{% trans "logs_title" %}</p>
|
||||
{% for source in sources %}
|
||||
{% if source.first_date %}
|
||||
{% with date=source.first_date %}
|
||||
<a class="panel-block{% if source.source__id == current_source.id %} is-active has-text-weight-semibold{% endif %}" href="{% url 'log_day' source=source.source__slug year=date.year month=date.month day=date.day %}">{{ source.source__name }}</a>
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<a class="panel-block has-text-grey-light is-italic">{{ source.source__name }}</a>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
<a class="panel-block">{% trans "logs_no_logs_available" %}</a>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue