Edgewall Software

Ticket #2780: 2780-wiki-show-path-r7470.patch

File 2780-wiki-show-path-r7470.patch, 1.2 KB (added by rblank, 3 years ago)

Patch against 0.11-stable showing the path of hierarchical wiki pages

  • trac/htdocs/css/wiki.css

    diff --git a/trac/htdocs/css/wiki.css b/trac/htdocs/css/wiki.css
    a b  
    11@import url(code.css); 
     2 
     3/* Styles for the path of hierarchical pages */ 
     4h1.path { margin: 0; padding: 0 0 .5em } 
     5h1.path :link, h1.path :visited { border: none; padding: 0 .2em; color: #b00 } 
     6h1.path .sep { color: #666; padding: 0 .1em } 
     7h1.path .pathentry { float: left } 
    28 
    39/* Styles for the page editing form */ 
    410#edit #rows { float: right; font-size: 80% } 
  • trac/wiki/templates/wiki_view.html

    diff --git a/trac/wiki/templates/wiki_view.html b/trac/wiki/templates/wiki_view.html
    a b  
    1818 
    1919  <body> 
    2020    <div id="content" class="wiki"> 
     21 
     22      <h1 class="path" py:if="'/' in page.name" py:with="parts = page.name.split('/')"> 
     23        <py:for each="idx, part in enumerate(parts)"><a 
     24          class="pathentry" title="View ${'/'.join(parts[:idx + 1])}" href="${href.wiki(*parts[:idx + 1])}">${part}</a><span 
     25          class="pathentry sep" py:if="idx != len(parts) - 1">/</span></py:for> 
     26        <br style="clear: both" /> 
     27      </h1> 
    2128 
    2229      <py:if test="version"> 
    2330        <table id="info" summary="Revision info">