# HG changeset patch # User Sandrine Ribeau # Date 1240251726 25200 # Node ID dc22b5461850d587d0ad1e848a23a397641347d9 # Parent 4233089f7fb2f19445739b84830dab1fdd06eb4e Remove all related to entity Card as it now has its own cube. diff -r 4233089f7fb2 -r dc22b5461850 entities/lib.py --- a/entities/lib.py Mon Apr 20 10:50:36 2009 +0200 +++ b/entities/lib.py Mon Apr 20 11:22:06 2009 -0700 @@ -139,20 +139,6 @@ def action_url(self): return self.absolute_url() + '/follow' - -class Card(AnyEntity): - """customized class for Card entities""" - id = 'Card' - rest_attr = 'wikiid' - - fetch_attrs, fetch_order = fetch_config(['title']) - - def dc_title(self): - return self.title - - def dc_description(self, format='text/plain'): - return self.synopsis or u'' - class ECache(AnyEntity): """Cache""" id = 'ECache' diff -r 4233089f7fb2 -r dc22b5461850 schema.py --- a/schema.py Mon Apr 20 10:50:36 2009 +0200 +++ b/schema.py Mon Apr 20 11:22:06 2009 -0700 @@ -877,8 +877,8 @@ def _load_definition_files(self, cubes): for filepath in (self.include_schema_files('bootstrap') + self.include_schema_files('base') - + self.include_schema_files('Bookmark') - + self.include_schema_files('Card')): + + self.include_schema_files('Bookmark')): +# + self.include_schema_files('Card')): self.info('loading %s', filepath) self.handle_file(filepath) for cube in cubes: diff -r 4233089f7fb2 -r dc22b5461850 schemas/Card.py --- a/schemas/Card.py Mon Apr 20 10:50:36 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -from cubicweb.schema import format_constraint - -class Card(EntityType): - """a card is a textual content used as documentation, reference, procedure reminder""" - permissions = { - 'read': ('managers', 'users', 'guests'), - 'add': ('managers', 'users'), - 'delete': ('managers', 'owners'), - 'update': ('managers', 'owners',), - } - - title = String(required=True, fulltextindexed=True, maxsize=256) - synopsis = String(fulltextindexed=True, maxsize=512, - description=_("an abstract for this card")) - content_format = String(meta=True, internationalizable=True, maxsize=50, - default='text/rest', constraints=[format_constraint]) - content = String(fulltextindexed=True) - wikiid = String(maxsize=64, indexed=True) diff -r 4233089f7fb2 -r dc22b5461850 sobjects/notification.py --- a/sobjects/notification.py Mon Apr 20 10:50:36 2009 +0200 +++ b/sobjects/notification.py Mon Apr 20 11:22:06 2009 -0700 @@ -296,10 +296,3 @@ return u'%s #%s (%s)' % (self.req.__('New %s' % entity.e_schema), entity.eid, self.user_login()) - -class CardAddedView(NormalizedTextView): - """get notified from new cards""" - accepts = ('Card',) - content_attr = 'synopsis' - - diff -r 4233089f7fb2 -r dc22b5461850 web/views/card.py --- a/web/views/card.py Mon Apr 20 10:50:36 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -"""Specific views for cards - -:organization: Logilab -:copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved. -:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr -""" -__docformat__ = "restructuredtext en" - -from cubicweb.web.views import baseviews -from logilab.mtconverter import html_escape - -_ = unicode - -class CardPrimaryView(baseviews.PrimaryView): - accepts = ('Card',) - skip_attrs = baseviews.PrimaryView.skip_attrs + ('title', 'synopsis', 'wikiid') - show_attr_label = False - - def content_title(self, entity): - return html_escape(entity.dc_title()) - - def summary(self, entity): - return html_escape(entity.dc_description()) - - -class CardInlinedView(CardPrimaryView): - """hide card title and summary""" - id = 'inlined' - title = _('inlined view') - main_related_section = False - - def render_entity_title(self, entity): - pass - - def render_entity_metadata(self, entity): - pass