diff --git a/tabellio/pfbviews/document.pt b/tabellio/pfbviews/document.pt index d359316..b962f6a 100644 --- a/tabellio/pfbviews/document.pt +++ b/tabellio/pfbviews/document.pt @@ -68,6 +68,25 @@ +
+ +
+ +
+ +
+ +
+
+
diff --git a/tabellio/pfbviews/document.py b/tabellio/pfbviews/document.py index d94f000..7d93488 100644 --- a/tabellio/pfbviews/document.py +++ b/tabellio/pfbviews/document.py @@ -1,8 +1,11 @@ from Products.Five import BrowserView class View(BrowserView): - pass - + def related_docs(self): + if not self.context.related_docs: + return [] + objects = [x.to_object for x in self.context.related_docs] + return sorted(objects, lambda x,y: cmp(x.reftitle, y.reftitle)) class DocumentDownload(BrowserView): def __call__(self): diff --git a/tabellio/pfbviews/question.pt b/tabellio/pfbviews/question.pt index 808028a..f264d9c 100644 --- a/tabellio/pfbviews/question.pt +++ b/tabellio/pfbviews/question.pt @@ -57,7 +57,21 @@
- +
+ +
+ +
+ +
diff --git a/tabellio/pfbviews/question.py b/tabellio/pfbviews/question.py index 6a398fd..1e72521 100644 --- a/tabellio/pfbviews/question.py +++ b/tabellio/pfbviews/question.py @@ -1,5 +1,8 @@ from Products.Five import BrowserView class View(BrowserView): - pass - + def related_docs(self): + if not self.context.related_docs: + return [] + objects = [x.to_object for x in self.context.related_docs] + return sorted(objects, lambda x,y: cmp(x.reftitle, y.reftitle))