equal
deleted
inserted
replaced
19 |
19 |
20 class ManageView(StartupView): |
20 class ManageView(StartupView): |
21 __regid__ = 'manage' |
21 __regid__ = 'manage' |
22 title = _('manage') |
22 title = _('manage') |
23 http_cache_manager = httpcache.EtagHTTPCacheManager |
23 http_cache_manager = httpcache.EtagHTTPCacheManager |
|
24 add_etype_links = () |
24 |
25 |
25 def display_folders(self): |
26 def display_folders(self): |
26 return False |
27 return False |
27 |
28 |
28 def call(self, **kwargs): |
29 def call(self, **kwargs): |
65 self.w(u'<br/><a href="%s">%s</a>\n' % (xml_escape(href), label)) |
66 self.w(u'<br/><a href="%s">%s</a>\n' % (xml_escape(href), label)) |
66 |
67 |
67 def folders(self): |
68 def folders(self): |
68 self.w(u'<h4>%s</h4>\n' % self._cw._('Browse by category')) |
69 self.w(u'<h4>%s</h4>\n' % self._cw._('Browse by category')) |
69 self._cw.vreg['views'].select('tree', self._cw).render(w=self.w) |
70 self._cw.vreg['views'].select('tree', self._cw).render(w=self.w) |
|
71 |
|
72 def create_links(self): |
|
73 self.w(u'<ul class="createLink">') |
|
74 for etype in self.add_etype_links: |
|
75 eschema = self.schema.eschema(etype) |
|
76 if eschema.has_perm(self.req, 'add'): |
|
77 self.w(u'<li><a href="%s">%s</a></li>' % ( |
|
78 self.req.build_url('add/%s' % eschema), |
|
79 self.req.__('add a %s' % eschema).capitalize())) |
|
80 self.w(u'</ul>') |
70 |
81 |
71 def startup_views(self): |
82 def startup_views(self): |
72 self.w(u'<h4>%s</h4>\n' % self._cw._('Startup views')) |
83 self.w(u'<h4>%s</h4>\n' % self._cw._('Startup views')) |
73 self.startupviews_table() |
84 self.startupviews_table() |
74 |
85 |