~ubuntu-branches/ubuntu/oneiric/moin/oneiric-security

« back to all changes in this revision

Viewing changes to MoinMoin/theme/modernized.py

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-03-30 12:55:34 UTC
  • mfrom: (0.1.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100330125534-4c2ufc1rok24447l
Tags: 1.9.2-2ubuntu1
* Merge from Debian testing (LP: #521834). Based on work by Stefan Ebner.
  Remaining changes:
 - Remove python-xml from Suggests field, the package isn't anymore in
   sys.path.
 - Demote fckeditor from Recommends to Suggests; the code was previously
   embedded in moin, but it was also disabled, so there's no reason for us
   to pull this in by default currently. Note: This isn't necessary anymore
   but needs a MIR for fckeditor, so postpone dropping this change until
   lucid+1
* debian/rules:
  - Replace hardcoded python2.5 with python* and hardcore python2.6 for ln
* debian/control.in: drop versioned depends on cdbs

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
            self.username(d),
97
97
            u'<h1 id="locationline">',
98
98
            self.interwiki(d),
99
 
            self.title(d),
 
99
            self.title_with_separators(d),
100
100
            u'</h1>',
101
101
            self.trail(d),
102
102
            self.navibar(d),
128
128
            # Header
129
129
            u'<div id="header">',
130
130
            u'<h1 id="locationline">',
131
 
            self.title(d),
 
131
            self.title_with_separators(d),
132
132
            u'</h1>',
133
133
            self.msg(d),
134
134
            u'</div>',
170
170
            ]
171
171
        return u'\n'.join(html)
172
172
 
173
 
    def title(self, d):
174
 
        """ Assemble the title (now using breadcrumbs)
175
 
 
176
 
        @param d: parameter dictionary
177
 
        @rtype: string
178
 
        @return: title html
179
 
        """
180
 
        _ = self.request.getText
181
 
        content = []
182
 
        if d['title_text'] == d['page'].split_title(): # just showing a page, no action
183
 
            curpage = ''
184
 
            segments = d['page_name'].split('/') # was: title_text
185
 
            for s in segments[:-1]:
186
 
                curpage += s
187
 
                content.append(Page(self.request, curpage).link_to(self.request, s))
188
 
                curpage += '/'
189
 
            link_text = segments[-1]
190
 
            link_title = _('Click to do a full-text search for this title')
191
 
            link_query = {
192
 
                'action': 'fullsearch',
193
 
                'value': 'linkto:"%s"' % d['page_name'],
194
 
                'context': '180',
195
 
            }
196
 
            # we dont use d['title_link'] any more, but make it ourselves:
197
 
            link = d['page'].link_to(self.request, link_text, querystr=link_query, title=link_title, css_class='backlink', rel='nofollow')
198
 
            content.append(link)
199
 
        else:
200
 
            content.append(wikiutil.escape(d['title_text']))
201
 
 
202
 
        location_html = u'<span class="sep">/</span>'.join(content)
203
 
        html = u'<span id="pagelocation">%s</span>' % location_html
204
 
        return html
205
 
 
206
173
    def username(self, d):
207
174
        """ Assemble the username / userprefs link
208
175