use "is-empty" filter in views to catch empty collections (existing way didn't work anyway)
This commit is contained in:
parent
b583d5f52a
commit
decd84534c
|
@ -32,7 +32,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="file-list-container">
|
<div class="file-list-container">
|
||||||
{% if files %}
|
{% if not files|is-empty %}
|
||||||
<table class="table table-hover table-condensed">
|
<table class="table table-hover table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{% extends "blarg/views/templates/base.html" %}
|
{% extends "blarg/views/templates/base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if not posts %}
|
|
||||||
|
{% if posts|is-empty %}
|
||||||
<div>
|
<div>
|
||||||
<p class="text-center">There are no posts.</p>
|
<p class="text-center">There are no posts.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in a new issue