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 From 864fde8eab5074a89281873e75e8a9a97fc7109d Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Wed, 24 Sep 2008 10:52:06 +1000 Subject: The start of some work to make the CSS play nicely with others. Right now, if you use the debug toolbar in a site that also uses YUI's grid system, all the text will be centre-aligned. So this commit pushes it back to left-aligned. There are still some more workaround stylings required here (spacing, font un-breakage, etc), but this solves the most immediate problem. --- debug_toolbar/media/toolbar.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debug_toolbar') diff --git a/debug_toolbar/media/toolbar.css b/debug_toolbar/media/toolbar.css index 7d2ad82..7fd5cc5 100644 --- a/debug_toolbar/media/toolbar.css +++ b/debug_toolbar/media/toolbar.css @@ -1,8 +1,8 @@ -#djDebugToolbar {height:30px; background:orange; color:#000; z-index:100000000; border:1px solid #06171D; border-width:1px 0;} +#djDebugToolbar {height:30px; background:orange; color:#000; z-index:100000000; border:1px solid #06171D; border-width:1px 0; text-align: left;} #djDebugToolbar ul {margin:0; padding:0 10px; list-style:none;} #djDebugToolbar li {display:inline; width:auto; position:relative; float:none; margin:0 10px 0 0; padding:0; height:20px; line-height:30px; padding:8px 10px 8px 0; border-right: 1px solid #06171D;} #djDebugToolbar #djDebugButton {color:red; font-weight:bold;} -#djDebug * {margin:0; padding:0; float:none; position:static; } +#djDebug * {margin:0; padding:0; float:none; position:static; text-align: left;} #djDebug .panelContent {display:none; position:absolute; margin:0; padding:5px; top:35px; width:auto; left:5px; right:5px; bottom:5px; background:white; color:black; border:1px solid black; z-index:1000000; overflow:auto;} #djDebug .panelContent p {padding: 0 5px;} #djDebug .panelContent p, #djDebug .panelContent table, #djDebug .panelContent ul, #djDebug .panelContent dl {margin:5px 0;} -- cgit v1.2.3