from django.utils.html import strip_tags\r
from django.utils.encoding import smart_unicode\r
from django.utils.safestring import mark_safe\r
+from django.conf import settings as django_settings\r
from django.core.urlresolvers import reverse\r
from django import template\r
from forum.actions import *\r
(copy and " copy" or " ")\r
return {'text': text, 'url': url, 'classes': classes, 'title': title}\r
\r
-@register.inclusion_tag('node/post_controls.html')\r
+\r
+moderation_enabled = False\r
+for m in django_settings.MODULE_LIST:\r
+ if m.__name__.endswith('moderation'):\r
+ moderation_enabled = True\r
+\r
+@register.inclusion_tag('node/post_controls.html' if not moderation_enabled else "modules/moderation/node/post_controls.html")\r
def post_controls(post, user):\r
controls = []\r
menu = []\r