diff options
| author | Aymeric Augustin | 2013-10-31 13:28:03 +0100 |
|---|---|---|
| committer | Aymeric Augustin | 2013-11-01 13:50:38 +0100 |
| commit | d4e5ef9e969b3cae675de2a602372ae7a639d0a2 (patch) | |
| tree | f9f2aee35483545a3fa8a0a386bffcfd5007de44 /debug_toolbar/templates | |
| parent | 30180ec9a3d82752e309f5d0f9c685dec097e40d (diff) | |
| download | django-debug-toolbar-d4e5ef9e969b3cae675de2a602372ae7a639d0a2.tar.bz2 | |
Add a checkbox to toggle panels from the frontend.
Fix #35.
Diffstat (limited to 'debug_toolbar/templates')
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/base.html | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index cce2144..d1dd0d1 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -14,16 +14,19 @@ {% endif %} {% for panel in panels %} <li class="djDebugPanelButton"> - {% if panel.has_content %} + <input type="checkbox" data-cookie="{{ panel.dom_id }}"{% if panel.enabled %} checked="checked"{% endif %} title="{% trans "Toogle Panel" %}" /> + {% if panel.has_content and panel.enabled %} <a href="{{ panel.url|default:"#" }}" title="{{ panel.title }}" class="{{ panel.dom_id }}"> {% else %} - <div class="contentless"> + <div class="contentless{% if panel.disabled %} disabled{% endif %}"> {% endif %} {{ panel.nav_title }} + {% if panel.enabled %} {% with panel.nav_subtitle as subtitle %} {% if subtitle %}<br /><small>{{ subtitle }}</small>{% endif %} {% endwith %} - {% if panel.has_content %} + {% endif %} + {% if panel.has_content and panel.enabled %} </a> {% else %} </div> @@ -36,7 +39,7 @@ <a title="{% trans "Show Toolbar" %}" id="djShowToolBarButton" href="#">«</a> </div> {% for panel in panels %} - {% if panel.has_content %} + {% if panel.has_content and panel.enabled %} <div id="{{ panel.dom_id }}" class="panelContent"> <div class="djDebugPanelTitle"> <a href="" class="djDebugClose">{% trans "Close" %}</a> |
