3 sys.path.append(os.path.join(os.path.dirname(__file__),'markdownext'))
6 from forum.modules import get_modules_script, ui
8 get_modules_script('settings')
9 get_modules_script('startup')
13 import forum.subscriptions
16 from django.utils.translation import ugettext as _
17 from django.core.urlresolvers import reverse
18 from forum.templatetags.extra_tags import get_score_badge
21 ui.register_multi(ui.HEADER_LINKS,
22 ui.UiLinkObject(_('faq'), 'faq', weight=400),
23 ui.UiLinkObject(_('about'), 'about', weight=300),
26 text=lambda c: c['request'].user.is_authenticated() and _('logout') or _('login'),
27 url=lambda c: c['request'].user.is_authenticated() and reverse('logout') or reverse('auth_signin'),
31 user_level=ui.LoggedInUserUiObject(),
32 text=lambda c: c['request'].user.username,
33 url=lambda c: c['request'].user.get_profile_url(),
34 post_code=lambda c: get_score_badge(c['request'].user),
38 user_level=ui.SuperuserUiObject(),
39 text=_('administration'),
40 url=lambda c: reverse('admin_index'),
46 ui.register_multi(ui.PAGE_TOP_TABS,
47 ui.UiTopPageTabObject('questions', _('questions'), 'questions', weight=0),
48 ui.UiTopPageTabObject('tags', _('tags'), 'tags', weight=100),
49 ui.UiTopPageTabObject('users', _('users'), 'users', weight=200),
50 ui.UiTopPageTabObject('badges', _('badges'), 'badges', weight=300),
51 ui.UiTopPageTabObject('unanswered', _('unanswered questions'), 'unanswered', weight=400),
54 #register.header_link(lambda c: (_('faq'), reverse('faq')))