Projet

Général

Profil

0001-templates-always-wrap-tables-in-div.table-container-.patch

Benjamin Dauvergne, 26 mars 2018 22:57

Télécharger (2,06 ko)

Voir les différences:

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(-)
fargo/templates/fargo/home.html
44 44
  <div class="cell">
45 45
  <h2>{% if site_title %}{{ site_title }}{% else %}{% trans "Portfolio" %}{% endif %}</h2>
46 46
  <div id="user-files">
47
    {% if not table.page %}
48
       <div class="table-container">
49
    {% endif %}
47 50
    {% render_table table "fargo/table.html" %}
51
    {% if not table.page %}
52
       </div>
53
    {% endif %}
54
     
48 55
    <form id="send-file" method="post" enctype="multipart/form-data">
49 56
      {% csrf_token %}
50 57
      {{ form.non_field_errors }}
fargo/templates/fargo/pick.html
5 5
{% block bodyclasses %}fargo-popup fargo-pick-popup{% endblock %}
6 6

  
7 7
{% block content %}
8
    {% if not table.page %}
9
       <div class="table-container">
10
    {% endif %}
8 11
    {% render_table table "fargo/pick_table.html" %}
12
    {% if not table.page %}
13
       </div>
14
    {% endif %}
9 15
    <form method="post" enctype="multipart/form-data">
10 16
      {% csrf_token %}
11 17
      {{ form.non_field_errors }}
fargo/templates/fargo/upload.html
1 1
{% extends "fargo/base.html" %}
2
{% load render_table from django_tables2 %}
3 2
{% load i18n %}
4 3

  
5 4

  
6
-