Refactored the tools menu and added method for apps to register tools themselves

This commit is contained in:
Roberto Rosario
2011-05-03 21:58:55 -04:00
parent ae35e89549
commit 438e8c89a9
10 changed files with 87 additions and 48 deletions
@@ -1,18 +1,5 @@
{% load permission_tags %}
<span class="nowrap">
{% for link in object_navigation_links %}
{% if link.permissions %}
{% check_permissions request.user link.permissions.namespace link.permissions.permissions %}
{% if permission %}
{% if as_li %}<li>{% endif %}
<a class="{{ link.class }}" href="{{ link.url }}">{% if link.famfam %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text|capfirst }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %}
{% if as_li %}</li>{% endif %}
{% endif %}
{% else %}
{% if as_li %}<li>{% endif %}
<a class="{{ link.class }}" href="{{ link.url }}">{% if link.famfam %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text|capfirst }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %}
{% if as_li %}</li>{% endif %}
{% endif %}
{% include "generic_subnavigation.html" %}
{% endfor %}
</span>