diff options
| author | Rob Hudson | 2008-09-09 14:48:36 -0700 |
|---|---|---|
| committer | Rob Hudson | 2008-09-09 14:48:36 -0700 |
| commit | 76a9d548f4f09cb1c54b0bc467a9a61c6d91fd96 (patch) | |
| tree | c61a3bfb3f3878226851089ad36ceea46cc32430 /debug_toolbar/templates | |
| parent | cba0d3712c17d8607f8e56901db392aa84ac8b40 (diff) | |
| download | django-debug-toolbar-76a9d548f4f09cb1c54b0bc467a9a61c6d91fd96.tar.bz2 | |
Adding a `has_content` boolean to panels to avoid issues with checking if
content exists and displaying it in the templates.
Diffstat (limited to 'debug_toolbar/templates')
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/base.html | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index 7488b92..637e04d 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -41,7 +41,7 @@ <li id="djDebugButton">DEBUG</li> {% for panel in panels %} <li> - {% if panel.content %} + {% if panel.has_content %} <a href="{{ panel.url|default:"#" }}" onclick="djDebugToggle('{{ panel.dom_id }}')" title="{{ panel.title }}" class="{{ panel.dom_id }}">{{ panel.title }}</a> {% else %} {{ panel.title }} @@ -51,15 +51,13 @@ </ul> </div> {% for panel in panels %} - {% with panel.content as content %} - {% if content %} - <div id="{{ panel.dom_id }}" class="panelContent"> - <div class="title"> - <a href="" onclick="djDebugClose()" class="close">Close</a> - </div> - {{ content|safe }} + {% if panel.has_content %} + <div id="{{ panel.dom_id }}" class="panelContent"> + <div class="title"> + <a href="" onclick="djDebugClose()" class="close">Close</a> </div> - {% endif %} - {% endwith %} + {{ panel.content|safe }} + </div> + {% endif %} {% endfor %} </div> |
