--- a/web/views/startup.py Mon Sep 28 11:06:18 2009 +0200
+++ b/web/views/startup.py Mon Sep 28 11:09:40 2009 +0200
@@ -21,6 +21,7 @@
id = 'manage'
title = _('manage')
http_cache_manager = httpcache.EtagHTTPCacheManager
+ add_etype_links = ()
@classmethod
def vreg_initialization_completed(cls):
@@ -78,6 +79,16 @@
self.w(u'<h4>%s</h4>\n' % self.req._('Browse by category'))
self.vreg['views'].select('tree', self.req).render(w=self.w)
+ def create_links(self):
+ self.w(u'<ul class="createLink">')
+ for etype in self.add_etype_links:
+ eschema = self.schema.eschema(etype)
+ if eschema.has_perm(self.req, 'add'):
+ self.w(u'<li><a href="%s">%s</a></li>' % (
+ self.req.build_url('add/%s' % eschema),
+ self.req.__('add a %s' % eschema).capitalize()))
+ self.w(u'</ul>')
+
def startup_views(self):
self.w(u'<h4>%s</h4>\n' % self.req._('Startup views'))
self.startupviews_table()