From f691eef9fffb7a7f1d74f90d24f790a8292a75ce Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 26 Mar 2018 22:55:17 +0200 Subject: [PATCH] templates: always wrap tables in div.table-container (fixes #22795) django-tables2 < 1.1 only wrap table if the there are multiple pages. --- fargo/templates/fargo/home.html | 7 +++++++ fargo/templates/fargo/pick.html | 6 ++++++ fargo/templates/fargo/upload.html | 1 - 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/fargo/templates/fargo/home.html b/fargo/templates/fargo/home.html index f4cff30..8fa78b3 100644 --- a/fargo/templates/fargo/home.html +++ b/fargo/templates/fargo/home.html @@ -44,7 +44,14 @@

{% if site_title %}{{ site_title }}{% else %}{% trans "Portfolio" %}{% endif %}

+ {% if not table.page %} +
+ {% endif %} {% render_table table "fargo/table.html" %} + {% if not table.page %} +
+ {% endif %} +
{% csrf_token %} {{ form.non_field_errors }} diff --git a/fargo/templates/fargo/pick.html b/fargo/templates/fargo/pick.html index aaa7071..bdf9ecc 100644 --- a/fargo/templates/fargo/pick.html +++ b/fargo/templates/fargo/pick.html @@ -5,7 +5,13 @@ {% block bodyclasses %}fargo-popup fargo-pick-popup{% endblock %} {% block content %} + {% if not table.page %} +
+ {% endif %} {% render_table table "fargo/pick_table.html" %} + {% if not table.page %} +
+ {% endif %} {% csrf_token %} {{ form.non_field_errors }} diff --git a/fargo/templates/fargo/upload.html b/fargo/templates/fargo/upload.html index c60b855..4ba1312 100644 --- a/fargo/templates/fargo/upload.html +++ b/fargo/templates/fargo/upload.html @@ -1,5 +1,4 @@ {% extends "fargo/base.html" %} -{% load render_table from django_tables2 %} {% load i18n %} -- 2.14.2