cubicweb/web/views/ibreadcrumbs.py
changeset 12567 26744ad37953
parent 11767 432f87a63057
child 12880 59d4ad7e7df3
equal deleted inserted replaced
12566:6b3523f81f42 12567:26744ad37953
    19 
    19 
    20 
    20 
    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
       
    26 
    24 
    27 from logilab.mtconverter import xml_escape
    25 from logilab.mtconverter import xml_escape
    28 
    26 
    29 from cubicweb import tags, uilib
    27 from cubicweb import tags, uilib
    30 from cubicweb.entity import Entity
    28 from cubicweb.entity import Entity
   144             textsize = self._cw.property_value('navigation.short-line-size')
   142             textsize = self._cw.property_value('navigation.short-line-size')
   145             w(self.link_template % (
   143             w(self.link_template % (
   146                 xml_escape(url), xml_escape(uilib.cut(title, textsize))))
   144                 xml_escape(url), xml_escape(uilib.cut(title, textsize))))
   147         else:
   145         else:
   148             textsize = self._cw.property_value('navigation.short-line-size')
   146             textsize = self._cw.property_value('navigation.short-line-size')
   149             w(xml_escape(uilib.cut(text_type(part), textsize)))
   147             w(xml_escape(uilib.cut(str(part), textsize)))
   150 
   148 
   151 
   149 
   152 class BreadCrumbETypeVComponent(BreadCrumbEntityVComponent):
   150 class BreadCrumbETypeVComponent(BreadCrumbEntityVComponent):
   153     __select__ = (basecomponents.HeaderComponent.__select__
   151     __select__ = (basecomponents.HeaderComponent.__select__
   154                   & multi_lines_rset() & one_etype_rset()
   152                   & multi_lines_rset() & one_etype_rset()