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
+3 -1
View File
@@ -2,6 +2,7 @@ from django.utils.translation import ugettext_lazy as _
from permissions.api import register_permissions
from main.api import register_tool
FILESYSTEM_SERVING_RECREATE_LINKS = 'recreate_links'
@@ -10,5 +11,6 @@ register_permissions('filesystem_serving', [
{'name': FILESYSTEM_SERVING_RECREATE_LINKS, 'label':_(u'Recreate filesystem links.')},
])
filesystem_serving_recreate_all_links = {'text': _('recreate index links'), 'view': 'recreate_all_links', 'famfam': 'page_link', 'permissions': {'namespace': 'filesystem_serving', 'permissions': [FILESYSTEM_SERVING_RECREATE_LINKS]}, 'description': _(u'Deletes and creates from scratch all the file system indexing links.')}
filesystem_serving_recreate_all_links = {'text': _('recreate index links'), 'view': 'recreate_all_links', 'famfam': 'page_link', 'permissions': {'namespace': 'filesystem_serving', 'permissions': [FILESYSTEM_SERVING_RECREATE_LINKS]}}
register_tool(filesystem_serving_recreate_all_links, namespace='filesystem_serving', title=_(u'Filesystem'))