From f4d0f529a31ec4904501c43b2bd847b440fd5c08 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 21 Sep 2008 10:47:05 +1000 Subject: A couple of small HTML and presentation cleanups. - Don't display the headings of the detailed usage table for the cache panel unless there's actually some content to display. - Use pluralisation filter on the template paths to avoid "path(s)". - If there are no templates used or no template paths, wrap "None" in a paragraph tag. --- debug_toolbar/templates/debug_toolbar/panels/cache.html | 3 ++- debug_toolbar/templates/debug_toolbar/panels/templates.html | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'debug_toolbar') diff --git a/debug_toolbar/templates/debug_toolbar/panels/cache.html b/debug_toolbar/templates/debug_toolbar/panels/cache.html index 21ea173..0dad9b1 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/cache.html +++ b/debug_toolbar/templates/debug_toolbar/panels/cache.html @@ -31,6 +31,7 @@ {{ cache.get_many }} +{% if cache.calls %}

Breakdown

@@ -51,4 +52,4 @@ {% endfor %} -
\ No newline at end of file +{% endif %} diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index 575d507..a0e1c1c 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -1,4 +1,4 @@ -

Template path(s):

+

Template path{{ template_dirs|length|pluralize }}:

{% if template_dirs %}
    {% for template in template_dirs %} @@ -6,7 +6,7 @@ {% endfor %}
{% else %} - None +

None

{% endif %}

Templates Used

{% if templates %} @@ -21,5 +21,5 @@ {% endfor %} {% else %} - None +

None

{% endif %} -- cgit v1.2.3