diff -r 8430f6c693a1 -r 2fa09be849e7 web/views/formrenderers.py --- a/web/views/formrenderers.py Fri Sep 18 19:50:37 2009 +0200 +++ b/web/views/formrenderers.py Fri Sep 18 19:51:13 2009 +0200 @@ -491,11 +491,16 @@ __ = self.req.pgettext i18nctx = 'inlined:%s.%s.%s' % (entity.e_schema, rschema, role) w(u'
' % rschema) - existant = entity.has_eid() and entity.related(rschema) - if existant: + existant = False + related = entity.has_eid() and entity.related(rschema, role) + if related: # display inline-edition view for all existing related entities - w(form.view('inline-edition', existant, rtype=rschema, role=role, - ptype=entity.e_schema, peid=entity.eid)) + for i, relentity in enumerate(related.entities()): + if relentity.has_perm('update'): + w(form.view('inline-edition', related, row=i, col=0, + rtype=rschema, role=role, ptype=entity.e_schema, + peid=entity.eid, i18nctx=i18nctx)) + existant = True if role == 'subject': card = rschema.rproperty(entity.e_schema, targettype, 'cardinality')[0] else: @@ -524,6 +529,7 @@ w(u'
') + class EntityInlinedFormRenderer(EntityFormRenderer): """specific renderer for entity inlined edition form (inline-[creation|edition])