From 5a5f8cc58ceb93d6017af02189ea9f2707561741 Mon Sep 17 00:00:00 2001
From: Yoshinori Okuji <yo@nexedi.com>
Date: Tue, 17 Aug 2004 14:05:48 +0000
Subject: [PATCH] Override om_icons to display PDF.png.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1377 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Form/PDFTemplate.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/product/ERP5Form/PDFTemplate.py b/product/ERP5Form/PDFTemplate.py
index 9deaf9d16a..200b50b04b 100755
--- a/product/ERP5Form/PDFTemplate.py
+++ b/product/ERP5Form/PDFTemplate.py
@@ -164,6 +164,19 @@ class PDFTemplate(ZopePageTemplate):
     #    pt = getattr(self,self.pt)
     #    return pt._exec(self, bound_names, args, kw)
 
+    def om_icons(self):
+        """Return a list of icon URLs to be displayed by an ObjectManager"""
+        icons = ({'path': 'misc_/ERP5Form/PDF.png',
+                  'alt': self.meta_type, 'title': self.meta_type},)
+        if not self._v_cooked:
+            self._cook()
+        if self._v_errors:
+            icons = icons + ({'path': 'misc_/PageTemplates/exclamation.gif',
+                              'alt': 'Error',
+                              'title': 'This template has an error'},)
+        return icons
+
+
 InitializeClass(PDFTemplate)
 
 class FSPDFTemplate(FSPageTemplate, PDFTemplate):
-- 
2.30.9