templates: always wrap tables in div.table-container (fixes #22795)

django-tables2 < 1.1 only wrap table if the there are multiple pages.
This commit is contained in:
Benjamin Dauvergne 2018-03-26 22:55:17 +02:00
parent 89adb5b9e0
commit 49cc5185b2
3 changed files with 13 additions and 1 deletions

View File

@ -44,7 +44,14 @@
<div class="cell">
<h2>{% if site_title %}{{ site_title }}{% else %}{% trans "Portfolio" %}{% endif %}</h2>
<div id="user-files">
{% if not table.page %}
<div class="table-container">
{% endif %}
{% render_table table "fargo/table.html" %}
{% if not table.page %}
</div>
{% endif %}
<form id="send-file" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.non_field_errors }}

View File

@ -5,7 +5,13 @@
{% block bodyclasses %}fargo-popup fargo-pick-popup{% endblock %}
{% block content %}
{% if not table.page %}
<div class="table-container">
{% endif %}
{% render_table table "fargo/pick_table.html" %}
{% if not table.page %}
</div>
{% endif %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.non_field_errors }}

View File

@ -1,5 +1,4 @@
{% extends "fargo/base.html" %}
{% load render_table from django_tables2 %}
{% load i18n %}