Add forums to link bar. #383 veekun-promotions/2010112001 veekun-promotions/2010112601 veekun-promotions/2010120701
authorEevee <git@veekun.com>
Fri, 12 Nov 2010 05:51:45 +0000 (21:51 -0800)
committerEevee <git@veekun.com>
Fri, 12 Nov 2010 05:51:45 +0000 (21:51 -0800)
splinext/forum/__init__.py

index 806795a..8d2115a 100644 (file)
@@ -1,6 +1,7 @@
 from pkg_resources import resource_filename
 
 from pylons import session, tmpl_context as c
 from pkg_resources import resource_filename
 
 from pylons import session, tmpl_context as c
+from routes import url_for as url
 
 from spline.lib.plugin import PluginBase
 from spline.lib.plugin import PluginBase, PluginLink, Priority
 
 from spline.lib.plugin import PluginBase
 from spline.lib.plugin import PluginBase, PluginLink, Priority
@@ -28,6 +29,11 @@ class ForumPlugin(PluginBase):
             forum = splinext.forum.controllers.forum.ForumController,
         )
 
             forum = splinext.forum.controllers.forum.ForumController,
         )
 
+    def links(self):
+        return [
+            PluginLink(u'Forums', url(controller='forum', action='forums')),
+        ]
+
     def hooks(self):
         hooks = [
             ('routes_mapping',    Priority.NORMAL,      add_routes_hook),
     def hooks(self):
         hooks = [
             ('routes_mapping',    Priority.NORMAL,      add_routes_hook),