# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1234538937 -3600 # Node ID 79123c5978353a45fe1cefffb276844d016c55d5 # Parent 68702d0c02f135924bc681b8891e64bc7d4a5e1d# Parent be2dcc36110560784bbb949e2f0769038436d4f5 merge diff -r 68702d0c02f1 -r 79123c597835 doc/book/en/B0031-define-entities.en.txt --- a/doc/book/en/B0031-define-entities.en.txt Fri Feb 13 15:12:36 2009 +0100 +++ b/doc/book/en/B0031-define-entities.en.txt Fri Feb 13 16:28:57 2009 +0100 @@ -55,13 +55,20 @@ It is possible to manage attributes/relations in the simple or multiple editing form thanks to the following *rtags*: -* `primary`, indicates that an attribute or a relation has to be inserted - in the simple or multiple editing forms. In the case of a relation, - the related entity editing form will be included in the editing form. +* `primary`, indicates that an attribute or a relation has to be + inserted **in the simple or multiple editing forms**. In the case of + a relation, the related entity editing form will be included in the + editing form and represented as a combobox. Each item of the + combobox is a link to an existing entity. -* `secondary`, indicates that an attribute or a relation has to be inserted - in the simple editing form only. In the case of a relation, the related - entity editing form sill be included in the editing form. +* `secondary`, indicates that an attribute or a relation has to be + inserted **in the simple editing form only**. In the case of a + relation, the related entity editing form will be included in the + editing form and represented as a combobox. Each item of the combobox + is a link to an existing entity. + +* `inlineview`, includes the target entity's form in the editing form + of the current entity. * `generic`, indicates that a relation has to be inserted in the simple editing form, in the generic box of relation creation. diff -r 68702d0c02f1 -r 79123c597835 web/views/euser.py --- a/web/views/euser.py Fri Feb 13 15:12:36 2009 +0100 +++ b/web/views/euser.py Fri Feb 13 16:28:57 2009 +0100 @@ -14,7 +14,6 @@ from cubicweb.web.form import EntityForm from cubicweb.web.views.baseviews import PrimaryView, EntityView - class EUserPrimaryView(PrimaryView): accepts = ('EUser',) skip_attrs = ('firstname', 'surname') @@ -33,7 +32,6 @@ return rschema.type in ['interested_in', 'tags', 'todo_by', 'bookmarked_by', ] - class FoafView(EntityView): id = 'foaf' accepts = ('EUser',) @@ -42,10 +40,10 @@ content_type = 'text/xml' def call(self): - self.w(u'\n' % self.req.encoding) - self.w(u'\n') + self.w(''' + '''% self.req.encoding) for i in xrange(self.rset.rowcount): self.cell_call(i, 0) self.w(u'\n') @@ -70,7 +68,12 @@ self.w(u'%s\n' % html_escape(emailaddr)) self.w(u'\n') - +class FoafUsableView(FoafView): + id = 'foaf_usable' + + def call(self): + self.cell_call(0, 0) + class EditGroups(EntityForm): """displays a simple euser / egroups editable table"""