From 174c0f8bd975263ef00b325cfd9067d7b2ae4f7b Mon Sep 17 00:00:00 2001 From: Adam Hinz Date: Thu, 20 Jun 2013 10:12:38 -0400 Subject: [PATCH] Provide a horizontal scroll bar if there are too many DBH Classes --- static/css/polygons.css | 3 ++- templates/polygons/edit.html | 41 +++++++++++++++++++----------------- templates/polygons/view.html | 30 ++++++++++++++------------ 3 files changed, 40 insertions(+), 34 deletions(-) diff --git a/static/css/polygons.css b/static/css/polygons.css index 4ae0a96c..646f6df8 100644 --- a/static/css/polygons.css +++ b/static/css/polygons.css @@ -6,8 +6,9 @@ input { width: 100%; } -#polygontable { +.table-container { overflow: auto; + width: 95%; } /** CSS for OTM is screwy... we're just going to give diff --git a/templates/polygons/edit.html b/templates/polygons/edit.html index b142c139..53ccb5e5 100644 --- a/templates/polygons/edit.html +++ b/templates/polygons/edit.html @@ -5,27 +5,30 @@

Polygon #{{ polygonobj.pk }}

- - - - {% for cl in classes %} - +
+
Species{{ cl.label }}
+ + + {% for cl in classes %} + + {% endfor %} + + + {% for row in polygon %} + + {% for item in row %} + {% if forloop.first %} + + {% else %} + + {% endif %} + {% endfor %} + + {% endfor %} - - - {% for row in polygon %} - - {% for item in row %} - {% if forloop.first %} - - {% else %} - - {% endif %} - {% endfor %} - - - {% endfor %}
Species{{ cl.label }}
{{ item.1 }}Remove
{{ item.1 }}Remove
+ + Cancel
diff --git a/templates/polygons/view.html b/templates/polygons/view.html index f315aa29..34d2247a 100644 --- a/templates/polygons/view.html +++ b/templates/polygons/view.html @@ -7,20 +7,22 @@

Polygon #{{ polygonobj.pk }}

{% endif %} - - - - {% for cl in classes %} - +
+
Species{{ cl.label }}
+ + + {% for cl in classes %} + + {% endfor %} + + {% for row in polygon %} + + {% for item in row %} + + {% endfor %} + {% endfor %} - - {% for row in polygon %} - - {% for item in row %} - - {% endfor %} - - {% endfor %} -
Species{{ cl.label }}
{{ item.1 }}
{{ item.1 }}
+ + {% endblock %}