merge
authorSandrine Ribeau <sandrine.ribeau@logilab.fr>
Fri, 10 Apr 2009 09:29:33 -0700
changeset 1349 2452e660aea6
parent 1348 28bb9efe0cc8 (current diff)
parent 1334 0d63ee3096f6 (diff)
child 1350 31e4c8d30e5d
merge
--- a/doc/book/en/B1022-views-stdlib.en.txt	Fri Apr 10 09:27:31 2009 -0700
+++ b/doc/book/en/B1022-views-stdlib.en.txt	Fri Apr 10 09:29:33 2009 -0700
@@ -3,8 +3,8 @@
 Predefined views in the library
 ```````````````````````````````
 
-`CubicWeb` provides a lot of standard views for the default class
-`EntityType`. You can find them in ``cubicweb/web/views/``.
+`CubicWeb` provides a lot of standard views. You can find them in
+``cubicweb/web/views/``.
 
 A certain number of views are used to build the web interface, which apply
 to one or more entities. Their identifier is what distinguish them from
@@ -60,7 +60,8 @@
   This view displays usually a side box of some related entities 
   in a primary view.
 
-Start view:
+  
+Start view (e.g. views that don't apply to a result set):
 
 *index*
     This view defines the home page of your application. It does not require
--- a/web/views/management.py	Fri Apr 10 09:27:31 2009 -0700
+++ b/web/views/management.py	Fri Apr 10 09:29:33 2009 -0700
@@ -159,9 +159,11 @@
         w(u'<tr><th>%s</th><th>%s</th><th>%s</th><th>&nbsp;</th></tr>\n'
                % (_("name"), _("label"), _('granted to groups')))
         if getattr(entity, '__permissions__', None):
+            # vocabfunc must be compliant with StaticVocabularyConstraint.vocabulary
+            # which takes only keyword parameters
             wdg = StaticComboBoxWidget(self.vreg, self.schema['EPermission'],
                                        self.schema['name'], self.schema['String'],
-                                       vocabfunc=lambda x: entity.__permissions__)
+                                       vocabfunc=lambda entity, x=entity: x.__permissions__)
         else:
             wdg = newperm.get_widget('name')
         w(u'<tr><td>%s</td>\n' % wdg.edit_render(newperm))