# HG changeset patch # User Aurelien Campeas # Date 1315407387 -7200 # Node ID a832677c0aa69a6d139f80b8651336deb20c4003 # Parent 6f6253e44bdd2a24fe1be656412bd544266b3d17 [views/navigation] use the proper icons instead of ascii art (closes #1624943) diff -r 6f6253e44bdd -r a832677c0aa6 web/views/navigation.py --- a/web/views/navigation.py Tue Sep 06 15:29:05 2011 +0200 +++ b/web/views/navigation.py Wed Sep 07 16:56:27 2011 +0200 @@ -211,6 +211,14 @@ context = 'navbottom' order = 10 + @property + def prev_icon(self): + return '' % xml_escape(self._cw.data_url('go_prev.png')) + + @property + def next_icon(self): + return '' % xml_escape(self._cw.data_url('go_next.png')) + def init_rendering(self): adapter = self.entity.cw_adapt_to('IPrevNext') self.previous = adapter.previous_entity() @@ -232,16 +240,19 @@ def prevnext_entity(self, w, entity, type): textsize = self._cw.property_value('navigation.short-line-size') + content = xml_escape(cut(entity.dc_title(), textsize)) if type == 'prev': title = self._cw._('i18nprevnext_previous') - icon = u'<< ' + icon = self.prev_icon cssclass = u'previousEntity left' + content = icon + content else: title = self._cw._('i18nprevnext_next') - icon = u'>> ' + icon = self.next_icon cssclass = u'nextEntity right' + content = content + '  ' + icon self.prevnext_div(w, type, cssclass, entity.absolute_url(), - title, icon + xml_escape(cut(entity.dc_title(), textsize))) + title, content) def prevnext_div(self, w, type, cssclass, url, title, content): w(u'
' % cssclass)