--- a/web/views/startup.py Sat Sep 26 11:44:35 2009 +0200
+++ b/web/views/startup.py Mon Sep 28 12:37:01 2009 +0200
@@ -21,6 +21,7 @@
__regid__ = 'manage'
title = _('manage')
http_cache_manager = httpcache.EtagHTTPCacheManager
+ add_etype_links = ()
def display_folders(self):
return False
@@ -68,6 +69,16 @@
self.w(u'<h4>%s</h4>\n' % self._cw._('Browse by category'))
self._cw.vreg['views'].select('tree', self._cw).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._cw._('Startup views'))
self.startupviews_table()