diff --git a/test/data/bootstrap_cubes b/test/data/bootstrap_cubes new file mode 100644 index 0000000000000000000000000000000000000000..f9a32b9029d4731d3b0e2bb92d7fa75fe34bca0e_dGVzdC9kYXRhL2Jvb3RzdHJhcF9jdWJlcw== --- /dev/null +++ b/test/data/bootstrap_cubes @@ -0,0 +1,1 @@ +card diff --git a/test/unittest_card.py b/test/unittest_card.py index 59eba68b016cd8aa12cf64b5d021439e4cc275eb_dGVzdC91bml0dGVzdF9jYXJkLnB5..f9a32b9029d4731d3b0e2bb92d7fa75fe34bca0e_dGVzdC91bml0dGVzdF9jYXJkLnB5 100644 --- a/test/unittest_card.py +++ b/test/unittest_card.py @@ -25,7 +25,7 @@ def test_card_role_create(self): self.assertEqual(rest_publish(self.context(), ':card:`index`'), - '<p><a class="reference" href="http://testing.fr/cubicweb/view?etype=Card&wikiid=index&vid=creation">index</a></p>\n') + '<p><a class="reference" href="http://testing.fr/cubicweb/view?etype=Card&vid=creation&wikiid=index">index</a></p>\n') def test_card_role_link(self): self.request().create_entity('Card', wikiid=u'index', title=u'Site index page', synopsis=u'yo') diff --git a/views.py b/views.py index 59eba68b016cd8aa12cf64b5d021439e4cc275eb_dmlld3MucHk=..f9a32b9029d4731d3b0e2bb92d7fa75fe34bca0e_dmlld3MucHk= 100644 --- a/views.py +++ b/views.py @@ -22,8 +22,11 @@ __select__ = is_instance('Card') show_attr_label = False - def summary(self, entity): - return entity.dc_description('text/html') + def render_entity_title(self, entity): + super(CardPrimaryView, self).render_entity_title(entity) + if entity.synopsis: + self.w(u'<div class="summary">%s</div>' + % entity.printable_value('synopsis')) class CardInlinedView(CardPrimaryView): @@ -33,10 +36,8 @@ main_related_section = False def render_entity_title(self, entity): - pass - - def render_entity_metadata(self, entity): - pass + self.w(u'<div class="summary">%s</div>' + % entity.printable_value('synopsis')) def content_navigation_components(self, context): pass