Drop breadcrumbs at once
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 24 Feb 2017 13:57:09 +0100
changeset 179 35d98fb943a8
parent 178 6390ca1b51cc
child 180 0802510445f1
Drop breadcrumbs at once This is an attempt to make UI lighter and clearer. This makes sense once top-level links works properly (high-lighting, at least). While the parent entity information misses sometimes, it's not the case for the most proeminent cases of this application: archive transfer / units have a tree indicating the context of the viewed element, and authority record don't propose navigation to sub-objects. The only remaning thing is for a concept, but those are still 2nd class citizen in sherpa, so I think we can move that way.
cubicweb_sherpa/data/cubes.sherpa.css
cubicweb_sherpa/views/templates.py
cubicweb_sherpa/views/templates/maintemplate.jinja2.html
--- a/cubicweb_sherpa/data/cubes.sherpa.css	Fri Feb 24 10:18:10 2017 +0100
+++ b/cubicweb_sherpa/data/cubes.sherpa.css	Fri Feb 24 13:57:09 2017 +0100
@@ -91,26 +91,6 @@
   border-radius: 0;
 }
 
-/*breadcrumbs */
-
-.breadcrumb {
-  background-color: #0b6ba8;
-  color: #fff;
-  border-radius: 0;
-  list-style: none;
-  font-size: 1.3em;
-  padding-top: 0.8em;
-  padding-bottom: 0.8em;
-  margin-bottom: 0;
-}
-
-.breadcrumb a {
-  color: #fff;
-}
-
-.breadcrumbs_wrapper {
-  background-color: #0b6ba8;
-}
 
 /* aside */
 #aside-main-left {
@@ -559,10 +539,6 @@
   .page-content {
     padding : 0 5em 0 5em;
   }
-
-  .breadcrumb {
-    padding-left: 4.1em;
-  }
 }
 
 @media(min-width: 760px){
--- a/cubicweb_sherpa/views/templates.py	Fri Feb 24 10:18:10 2017 +0100
+++ b/cubicweb_sherpa/views/templates.py	Fri Feb 24 13:57:09 2017 +0100
@@ -72,14 +72,6 @@
         msgcomp = self._cw.vreg['components'].select_or_none(
             'applmessages', self._cw, rset=self.cw_rset)
         application_message = msgcomp.render() if msgcomp else u''
-        # breadcrumbs
-        stream = UStringIO()
-        w = stream.write
-        components = self.get_components(view, context='header-center')
-        if components:
-            for component in components:
-                component.render(w=w)
-        breadcrumbs = stream.getvalue()
         # contextual components
         contextual_components = self._cw.view('contentheader', rset=self.cw_rset, view=view)
 
@@ -88,7 +80,6 @@
         ctx.update({
             'title': view.page_title(),
             'page_content': view.render(),
-            'breadcrumbs': breadcrumbs,
             'application_message': application_message,
             'contextual_components': contextual_components,
             'right_header_component': right_header_component,
--- a/cubicweb_sherpa/views/templates/maintemplate.jinja2.html	Fri Feb 24 10:18:10 2017 +0100
+++ b/cubicweb_sherpa/views/templates/maintemplate.jinja2.html	Fri Feb 24 13:57:09 2017 +0100
@@ -19,13 +19,6 @@
       </div>
     </div>
   </nav>
-  {% if breadcrumbs %}
-  <nav role="navigation" class="breadcrumbs_wrapper">
-    <div class="col-md-offset-2">
-      {{ breadcrumbs|safe }}
-    </div>
-  </nav>
-  {% endif %}
   <div id="{{page_id}}" class="container-fluid" role="main">
     <aside id="aside-main-left" class="col-md-2 cwjs-aside">
       {{ left_boxes|safe }}