sidebars now only display in their given type area

This commit is contained in:
Jake Dahn
2011-08-01 17:10:33 -07:00
parent a051c85d7d
commit 14bf66c642
3 changed files with 11 additions and 4 deletions

View File

@@ -6,5 +6,12 @@ register = template.Library()
@register.inclusion_tag('_sidebar_module.html')
def initiate_module_sidebar():
return {'modules': [module[1] for module in signals.dash_apps_detection()] }
def dash_sidebar_modules():
if signals.dash_apps_detection()[0][1]['type'] == "dash":
return {'modules': [module[1] for module in signals.dash_apps_detection()] }
@register.inclusion_tag('_sidebar_module.html')
def syspanel_sidebar_modules():
if signals.dash_apps_detection()[0][1]['type'] == "syspanel":
return {'modules': [module[1] for module in signals.dash_apps_detection()] }

View File

@@ -15,6 +15,6 @@
</ul>
{% endif %}
{% initiate_module_sidebar %}
{% dash_sidebar_modules %}
</div>

View File

@@ -13,6 +13,6 @@
<li><a {% if current_sidebar == "quotas" %} class="active" {% endif %} href="{% url syspanel_quotas %}">Quotas</a></li>
</ul>
{% initiate_module_sidebar %}
{% syspanel_sidebar_modules %}
</div>