Edgewall Software

Ticket #8857: t8857-wiki-path-r8861.diff

File t8857-wiki-path-r8861.diff, 2.0 KB (added by Christian Boos, 16 years ago)

Show wiki: <page> [ / <subpage> …]

  • trac/htdocs/css/wiki.css

    Always show the wiki path, even for toplevel pages and show a clickable ''wiki:'' prefix.
    
    Closes #8857.
    
    diff --git a/trac/htdocs/css/wiki.css b/trac/htdocs/css/wiki.css
    a b  
    33/* Styles for the path of hierarchical pages */
    44p.path { margin: 0; padding: 0 0 .5em; font-size: .75em }
    55p.path :link, p.path :visited { margin: 0 .2em }
     6
    67p.path .sep { color: #666; padding: 0 .1em }
    78p.path .pathentry { float: left }
    89
  • trac/wiki/templates/wiki_view.html

    diff --git a/trac/wiki/templates/wiki_view.html b/trac/wiki/templates/wiki_view.html
    a b  
    1414      jQuery(document).ready(function($) {
    1515        $("#content").find("h1,h2,h3,h4,h5,h6").addAnchor("Link to this section");
    1616        $("#content").find(".wikianchor").each(function() {
    17           $(this).addAnchor("Link to #"+$(this).attr('id')) 
     17          $(this).addAnchor("Link to #"+$(this).attr('id'))
    1818        });
    1919        $(".foldable").enableFolding(true);
    2020      });
     
    2424  <body>
    2525    <div id="content" class="wiki">
    2626
    27       <p class="path noprint" py:if="'/' in page.name" py:with="parts = page.name.split('/')">
     27      <p class="path noprint" py:with="parts = page.name.split('/')">
     28        <a class="pathentry first" title="View WikiStart" href="href.wiki()">wiki:</a>
    2829        <py:for each="idx, part in enumerate(parts)"><a
    29           class="pathentry" title="View ${'/'.join(parts[:idx + 1])}" href="${href.wiki(*parts[:idx + 1])}">${part}</a><span
     30          class="pathentry" title="View ${'/'.join(parts[:idx + 1])}"
     31          href="${href.wiki(*parts[:idx + 1])}">${part}</a><span
    3032          class="pathentry sep" py:if="idx != len(parts) - 1">/</span></py:for>
    3133        <br style="clear: both" />
    3234      </p>
     
    118120          <li py:for="markup in related">${markup}</li>
    119121        </ul>
    120122      </div>
    121      
     123
    122124    </div>
    123125  </body>
    124126</html>