web/views/autoform.py
branchstable
changeset 6017 5f6a60ea8544
parent 5940 0e3ae19b181a
child 6101 1aff7367a20c
equal deleted inserted replaced
6016:0eabedcfb0a9 6017:5f6a60ea8544
   441         eid = form.edited_entity.eid
   441         eid = form.edited_entity.eid
   442         w(u'<table id="relatedEntities">')
   442         w(u'<table id="relatedEntities">')
   443         for rschema, role, related in field.relations_table(form):
   443         for rschema, role, related in field.relations_table(form):
   444             # already linked entities
   444             # already linked entities
   445             if related:
   445             if related:
   446                 w(u'<tr><th class="labelCol">%s</th>' % rschema.display_name(req, role))
   446                 label = rschema.display_name(req, role, context=form.edited_entity.__regid__)
       
   447                 w(u'<tr><th class="labelCol">%s</th>' % label)
   447                 w(u'<td>')
   448                 w(u'<td>')
   448                 w(u'<ul>')
   449                 w(u'<ul>')
   449                 for viewparams in related:
   450                 for viewparams in related:
   450                     w(u'<li class="invisible">%s<div id="span%s" class="%s">%s</div></li>'
   451                     w(u'<li class="invisible">%s<div id="span%s" class="%s">%s</div></li>'
   451                       % (viewparams[1], viewparams[0], viewparams[2], viewparams[3]))
   452                       % (viewparams[1], viewparams[0], viewparams[2], viewparams[3]))