horizon/horizon/templates/horizon/common
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
..
fields Horizon Forms should allow themable number spinners 2017-06-28 15:50:27 -07:00
_breadcrumb.html Drop Django 1.7 support 2015-11-16 11:55:38 +00:00
_data_table.html Fix `_data_table.html` weird conditional. 2021-03-16 08:48:17 -03:00
_data_table_action.html Show instance resize and rebuild actions in red 2017-07-12 17:47:27 -07:00
_data_table_cell.html Branding: Workflow cancel btn should be themable 2016-03-14 12:48:11 -07:00
_data_table_pagination.html Fix pofile for pseudo translations 2017-08-15 13:14:15 -05:00
_data_table_pagination_with_pages.html Add pages menu to volume backups pagination 2020-05-28 16:21:45 +00:00
_data_table_row.html Inline Table editing 2013-12-03 09:35:24 +01:00
_data_table_row_action_row.html Replace the glyphicons with font awesome icons 2014-12-01 14:36:38 -07:00
_data_table_row_actions_dropdown.html Fix "_data_table_action.html" template usage 2019-09-10 06:02:46 +00:00
_data_table_row_actions_row.html Add support for row actions to detail pages 2014-10-07 14:36:41 +02:00
_data_table_table_actions.html Fix "_data_table_action.html" template usage 2019-09-10 06:02:46 +00:00
_data_table_view.html Add default common template to python table views 2017-01-05 08:59:35 +00:00
_datepicker.html Fix translation tag for datepicker 2017-07-31 14:05:16 +09:00
_datepicker_form.html Datepicker should inherit from theme 2017-07-06 18:57:02 +00:00
_detail.html Use breadcrumb nav across Horizon 2016-05-05 23:12:59 +00:00
_detail_header.html the name needs to be word wrap 2019-01-07 14:29:44 +08:00
_detail_tab_group.html Fix alignment issues for nav-tabs and ul on details panels 2017-01-18 11:40:14 -08:00
_detail_table.html Adds support for tabs + tables. 2012-03-24 16:14:33 -07:00
_domain_page_header.html Fix session.domain_context_name existence check 2020-05-27 15:11:02 +10:00
_form_errors.html Fix unnecessary bullet point 2016-09-27 13:03:59 +09:00
_form_field.html Horizon Forms should allow themable number spinners 2017-06-28 15:50:27 -07:00
_form_field_decorator.html Horizon Radio Buttons are now themeable. 2016-08-04 18:00:43 +00:00
_form_field_required.html "Required" fields are no longer visually indicated 2016-02-09 11:51:34 -07:00
_form_fields.html Add templates for bootstrap's horizontal forms 2014-09-08 10:38:16 +02:00
_formset_table.html Update Twitter Bootstrap to version 3 2014-07-28 16:13:21 +02:00
_formset_table_row.html Unify the syntax used for the {% ... %} delimter in Jinja2 templates 2015-01-19 20:58:15 +01:00
_horizontal_field.html Horizon Forms should allow themable number spinners 2017-06-28 15:50:27 -07:00
_horizontal_fields.html Add templates for bootstrap's horizontal forms 2014-09-08 10:38:16 +02:00
_keystone_provider_selector.html Keystone to Keystone Federation Drop Down 2017-01-19 14:59:01 -06:00
_limit_summary.html usage: Categorize Limit Summary by service 2018-04-20 05:34:33 +09:00
_modal.html Revert "Add the 'fade' class to Python modals, for animation" 2017-03-28 23:44:22 +00:00
_modal_form.html Fix 'Manage Volume Attachments' -> 'Cancel' button appearance 2016-03-15 19:51:26 +03:00
_modal_form_add_members.html Unify the syntax used for the {{ ... }} delimter in Jinja2 templates 2015-01-19 09:42:24 +00:00
_page_header.html Add dropdown actions to detail page 2014-10-07 14:34:35 +02:00
_region_selector.html Branding: Nav icon spacing should use css 2016-02-07 16:50:36 +00:00
_resource_browser.html Switch to use python-swiftclient instead of cloudfiles. 2012-08-13 16:48:06 -07:00
_sidebar.html Improve Horizon nav sidebar 2016-11-23 16:17:13 +00:00
_sidebar_module.html Unifies the project packaging into one set of modules. 2012-02-29 00:20:13 -08:00
_tab_group.html Fix alignment issues for nav-tabs and ul on details panels 2017-01-18 11:40:14 -08:00
_usage_summary.html Datepicker should inherit from theme 2017-07-06 18:57:02 +00:00
_workflow.html Close modals with ESC key 2017-03-02 15:04:33 +00:00
_workflow_base.html Refactored the templates code 2013-05-20 13:32:30 +04:00
_workflow_step.html Modal fixes - 2 columns, padding, header, membership 2014-12-08 12:01:59 +01:00
_workflow_step_update_members.html Added Bootstrap and css for responsive page 2020-09-08 21:26:35 +00:00