horizon/horizon/templates/horizon
Rafael Weingärtner 3e4d0ad77e Fix `_data_table.html` weird conditional.
While troubleshooting a problem with pagination I noticed the
following conditional in `horizon/templates/horizon/common/_data_table.html`:

```
      {% if table.number_of_pages is defined %}
        {% include "horizon/common/_data_table_pagination.html" %}
      {% else %}
        {% include "horizon/common/_data_table_pagination_with_pages.html" %}
      {% endif %}
```

At first sight, it looks wrong. I mean, if there are
number_of_pages, we should use `_data_table_pagination_with_pages.html`.
However, this conditional solves to `True` if
table.number_of_pages is NOT defined, and then it solves to `False`,
if it is defined. It is a very weird (to me) behavior.

Therefore, I am suggesting to use a more readable and understandable
conditional in this patch.

We can simply use `if table.number_of_pages is None`, which will
behave as expected; if there are not number of pages, we use the
traditional paging, and then, if there are number of pages, we use
the paged data table approach.

Change-Id: I933b1f9399f40569c7661c1db5776d468917b966
2021-03-16 08:48:17 -03:00
..
client_side Set unique identifier for Django messages 2020-09-23 16:00:43 +03:00
common Fix `_data_table.html` weird conditional. 2021-03-16 08:48:17 -03:00
jasmine Fix Jasmine Spec Runner for Django messages patch 2020-09-25 10:38:16 -05:00
_messages.html Set unique identifier for Django messages 2020-09-23 16:00:43 +03:00
_nav_list.html Basic Tabs now inherit from a Bootstrap Theme 2015-11-17 08:05:03 -07:00
_script_i18n.html Drop Django 1.7 support 2015-11-16 11:55:38 +00:00
_sidebar.html Replace dict.iteritems() with dict.items() in horizon 2017-08-01 08:31:49 +08:00
_subnav_list.html Replace dict.iteritems() with dict.items() in horizon 2017-08-01 08:31:49 +08:00