equal
deleted
inserted
replaced
19 |
19 |
20 __docformat__ = "restructuredtext en" |
20 __docformat__ = "restructuredtext en" |
21 from cubicweb import _ |
21 from cubicweb import _ |
22 |
22 |
23 from warnings import warn |
23 from warnings import warn |
|
24 |
|
25 from six import text_type |
24 |
26 |
25 from logilab.mtconverter import xml_escape |
27 from logilab.mtconverter import xml_escape |
26 |
28 |
27 from cubicweb import tags, uilib |
29 from cubicweb import tags, uilib |
28 from cubicweb.entity import Entity |
30 from cubicweb.entity import Entity |
139 textsize = self._cw.property_value('navigation.short-line-size') |
141 textsize = self._cw.property_value('navigation.short-line-size') |
140 w(self.link_template % ( |
142 w(self.link_template % ( |
141 xml_escape(url), xml_escape(uilib.cut(title, textsize)))) |
143 xml_escape(url), xml_escape(uilib.cut(title, textsize)))) |
142 else: |
144 else: |
143 textsize = self._cw.property_value('navigation.short-line-size') |
145 textsize = self._cw.property_value('navigation.short-line-size') |
144 w(xml_escape(uilib.cut(unicode(part), textsize))) |
146 w(xml_escape(uilib.cut(text_type(part), textsize))) |
145 |
147 |
146 |
148 |
147 class BreadCrumbETypeVComponent(BreadCrumbEntityVComponent): |
149 class BreadCrumbETypeVComponent(BreadCrumbEntityVComponent): |
148 __select__ = (basecomponents.HeaderComponent.__select__ |
150 __select__ = (basecomponents.HeaderComponent.__select__ |
149 & multi_lines_rset() & one_etype_rset() |
151 & multi_lines_rset() & one_etype_rset() |