merge
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 10 Aug 2009 11:11:19 +0200
changeset 2753 15a2d84e2802
parent 2747 4f9ffcd8d5a2 (current diff)
parent 2752 28783f51df10 (diff)
child 2754 1db51bb55b45
merge
--- a/.hgtags	Mon Aug 10 11:10:12 2009 +0200
+++ b/.hgtags	Mon Aug 10 11:11:19 2009 +0200
@@ -52,3 +52,5 @@
 7dc22caa7640bf70fcae55afb6d2326829dacced cubicweb-debian-version-3.3.4-1
 d85937184430b2e7a8d9318100272757026c01a4 cubicweb-version-3.3.5
 82fe8a6d077b34e972664c8e2bace3ae30c94b9d cubicweb-debian-version-3.3.5-1
+cfcc7f6121d6c6b53a1ef9bc96c3b7c82f33d169 cubicweb-version-3.4.2
+e6a8cd8cc910507e5f928ddba6de3cf5e5bdf3d4 cubicweb-debian-version-3.4.2-1
--- a/common/mixins.py	Mon Aug 10 11:10:12 2009 +0200
+++ b/common/mixins.py	Mon Aug 10 11:11:19 2009 +0200
@@ -365,6 +365,7 @@
 
 class ProgressMixIn(object):
     """provide default implementations for IProgress interface methods"""
+    # This is an adapter isn't it ?
 
     @property
     def cost(self):
--- a/web/views/startup.py	Mon Aug 10 11:10:12 2009 +0200
+++ b/web/views/startup.py	Mon Aug 10 11:11:19 2009 +0200
@@ -156,3 +156,20 @@
     def display_folders(self):
         return 'Folder' in self.schema and self.req.execute('Any COUNT(X) WHERE X is Folder')[0][0]
 
+
+class RegistryView(StartupView):
+    id = 'registry'
+    title = _('registry')
+    __select__ match_user_groups('managers')
+
+    def call(self, **kwargs):
+        """The default view representing the instance's management"""
+        self.w(u'<h1>%s</h1>' % _("Registry's content"))
+        keys = sorted(self.vreg)
+        self.w(u'<p>%s</p>' % ' - '.join('<a href="/_registry#%s">%s</a>' % (key, key) for key in keys))
+        for key in keys:
+            self.w(u'<a name="%s"><h2>%s</h2></a><table>' % (key,key))
+            for key, value in sorted(self.vreg[key].items()):
+                self.w(u'<tr><td>%s</td><td>%s</td></tr>' % (key, xml_escape(repr(value))))
+            self.w(u'</table>')
+
--- a/web/views/urlrewrite.py	Mon Aug 10 11:10:12 2009 +0200
+++ b/web/views/urlrewrite.py	Mon Aug 10 11:11:19 2009 +0200
@@ -70,6 +70,9 @@
     id = 'simple'
 
     rules = [
+        ('/_', dict(vid='manage')),
+        ('/_registry', dict(vid='registry')),
+#        (rgx('/_([^/]+?)/?'), dict(vid=r'\1')),
         ('/schema',  dict(vid='schema')),
         ('/index', dict(vid='index')),
         ('/myprefs', dict(vid='propertiesform')),