Mercurial > moin-modernized
changeset 4:86eee4ada4d3
Make the "pagelocation" use a <div> with explicit /, not a <ul>
| author | Radomir Dopieralski <devel@sheep.art.pl> |
|---|---|
| date | Fri, 16 May 2008 16:37:45 +0200 |
| parents | f7c7846f4e27 |
| children | b8a04ecb615f |
| files | modernized.py |
| diffstat | 1 files changed, 34 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/modernized.py Fri May 16 16:27:05 2008 +0200 +++ b/modernized.py Fri May 16 16:37:45 2008 +0200 @@ -8,6 +8,7 @@ from MoinMoin.theme import ThemeBase from MoinMoin import wikiutil +from MoinMoin.Page import Page class Theme(ThemeBase): @@ -103,6 +104,39 @@ ] return u'\n'.join(html) + def title(self, d): + """ Assemble the title (now using breadcrumbs) + + @param d: parameter dictionary + @rtype: string + @return: title html + """ + _ = self.request.getText + content = [] + if d['title_text'] == d['page'].split_title(): # just showing a page, no action + curpage = '' + segments = d['page_name'].split('/') # was: title_text + for s in segments[:-1]: + curpage += s + content.append(Page(self.request, curpage).link_to(self.request, s)) + curpage += '/' + link_text = segments[-1] + link_title = _('Click to do a full-text search for this title') + link_query = { + 'action': 'fullsearch', + 'value': 'linkto:"%s"' % d['page_name'], + 'context': '180', + } + # we dont use d['title_link'] any more, but make it ourselves: + link = d['page'].link_to(self.request, link_text, querystr=link_query, title=link_title, css_class='backlink', rel='nofollow') + content.append(link) + else: + content.append(wikiutil.escape(d['title_text'])) + + location_html = u'<span class="sep">/</span>'.join(content) + html = u'<div id="pagelocation">%s</div>' % location_html + return html + def username(self, d): """ Assemble the username / userprefs link
