38 etypes = rschema.objects(entity.e_schema) |
38 etypes = rschema.objects(entity.e_schema) |
39 else: |
39 else: |
40 etypes = rschema.subjects(entity.e_schema) |
40 etypes = rschema.subjects(entity.e_schema) |
41 if len(etypes) == 1: |
41 if len(etypes) == 1: |
42 self.etype = etypes[0] |
42 self.etype = etypes[0] |
43 fakebox = [] |
|
44 self.w(u'<div id="%s">' % self.id) |
43 self.w(u'<div id="%s">' % self.id) |
45 self.w(u'<h1>%s</h1>' % self.req._('relation %(relname)s of %(ent)s') |
44 self.w(u'<h1>%s</h1>' % self.req._('relation %(relname)s of %(ent)s') |
46 % {'relname': rschema.display_name(self.req, role(self)), |
45 % {'relname': rschema.display_name(self.req, role(self)), |
47 'ent': entity.view('incontext')}) |
46 'ent': entity.view('incontext')}) |
48 self.w(u'<ul>') |
47 self.w(u'<ul>') |
49 self.w_unrelated(fakebox, entity) |
48 for boxitem in self.unrelated_boxitems(entity): |
50 for boxitem in fakebox: |
|
51 boxitem.render(self.w) |
49 boxitem.render(self.w) |
52 self.w(u'</ul></div>') |
50 self.w(u'</ul></div>') |
53 |
51 |
54 def unrelated_entities(self, entity): |
52 def unrelated_entities(self, entity): |
55 """returns the list of unrelated entities |
53 """returns the list of unrelated entities |