(implement #761403) The breadcrumb final element is now a link too.
This allow getting a proper url for item fetched throught search.
--- a/web/test/unittest_breadcrumbs.py Thu Apr 15 17:28:27 2010 +0200
+++ b/web/test/unittest_breadcrumbs.py Thu Apr 15 17:35:17 2010 +0200
@@ -15,7 +15,7 @@
ibc = self.vreg['components'].select('breadcrumbs', self.request(), rset=childrset)
self.assertEquals(ibc.render(),
"""<span id="breadcrumbs" class="pathbar"> > <a href="http://testing.fr/cubicweb/Folder">folder_plural</a> > <a href="http://testing.fr/cubicweb/folder/%s" title="">par&ent</a> > 
-chi&ld</span>""" % f1.eid)
+<a href="http://testing.fr/cubicweb/folder/%s" title="">chi&ld</a></span>""" % (f1.eid, f2.eid))
if __name__ == '__main__':
from logilab.common.testlib import unittest_main
--- a/web/views/ibreadcrumbs.py Thu Apr 15 17:28:27 2010 +0200
+++ b/web/views/ibreadcrumbs.py Thu Apr 15 17:35:17 2010 +0200
@@ -62,10 +62,7 @@
def wpath_part(self, part, contextentity, last=False):
if isinstance(part, Entity):
- if last and part.eid == contextentity.eid:
- self.w(xml_escape(part.view('breadcrumbtext')))
- else:
- self.w(part.view('breadcrumbs'))
+ self.w(part.view('breadcrumbs'))
elif isinstance(part, tuple):
url, title = part
textsize = self._cw.property_value('navigation.short-line-size')