4 :copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
4 :copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
6 """ |
6 """ |
7 __docformat__ = "restructuredtext en" |
7 __docformat__ = "restructuredtext en" |
8 |
8 |
|
9 from cubicweb.selectors import implements |
9 from cubicweb.web.views import baseviews |
10 from cubicweb.web.views import baseviews |
10 from logilab.mtconverter import html_escape |
11 from logilab.mtconverter import html_escape |
11 |
12 |
12 _ = unicode |
13 _ = unicode |
13 |
14 |
14 class CardPrimaryView(baseviews.PrimaryView): |
15 class CardPrimaryView(baseviews.PrimaryView): |
15 accepts = ('Card',) |
16 __selectors__ = implements('Card') |
16 skip_attrs = baseviews.PrimaryView.skip_attrs + ('title', 'synopsis', 'wikiid') |
17 skip_attrs = baseviews.PrimaryView.skip_attrs + ('title', 'synopsis', 'wikiid') |
17 show_attr_label = False |
18 show_attr_label = False |
18 |
19 |
19 def content_title(self, entity): |
20 def content_title(self, entity): |
20 return html_escape(entity.dc_title()) |
21 return html_escape(entity.dc_title()) |