예제 #1
0
 def pagelink(self, on, pagename='', page=None, **kw):
     FormatterBase.pagelink(self, on, pagename, page, **kw)
     if page is None:
         page = Page(self.request, pagename, formatter=self)
     link_text = page.link_to(self.request, on=on, **kw)
     self._curr.xml_append(tree.text(U(link_text)))
     return ''
예제 #2
0
 def pagelink(self, on, pagename="", page=None, **kw):
     FormatterBase.pagelink(self, on, pagename, page, **kw)
     if page is None:
         page = Page(self.request, pagename, formatter=self)
     link_text = page.link_to(self.request, on=on, **kw)
     self._curr.xml_append(tree.text(U(link_text)))
     return ""
예제 #3
0
    def pagelink(self, on, pagename='', page=None, **kw):
        """ Link to a page.

            formatter.text_python will use an optimized call with a page!=None
            parameter. DO NOT USE THIS YOURSELF OR IT WILL BREAK.

            See wikiutil.link_tag() for possible keyword parameters.
        """
        FormatterBase.pagelink(self, on, pagename, page, **kw)
        if page is None:
            page = Page(self.request, pagename, formatter=self)
        return page.link_to(self.request, on=on, **kw)
예제 #4
0
    def pagelink(self, on, pagename='', page=None, **kw):
        """ Link to a page.

            formatter.text_python will use an optimized call with a page!=None
            parameter. DO NOT USE THIS YOURSELF OR IT WILL BREAK.

            See wikiutil.link_tag() for possible keyword parameters.
        """
        FormatterBase.pagelink(self, on, pagename, page, **kw)
        if page is None:
            page = Page(self.request, pagename, formatter=self)
        return page.link_to(self.request, on=on, **kw)
예제 #5
0
 def pagelink(self, on, pagename='', page=None, **kw):
     FormatterBase.pagelink(self, on, pagename, page, **kw)
     if on:
         if not self._textbuf or self._textbuf[-1] in ('\n', ' '):
             result = self.wrap(u'<')
         else:
             result = self.wrap(u' <')
         self.text_on(True)
         self.add_missing_space()
         return result
     else:
         linktext = self._text
         self.text_off()
         orig_pagename = pagename
         if pagename.find('/'):
             pagename = pagename.replace('/', '.')
         pagename += '.txt'
         if linktext == orig_pagename:
             return self.wrap(u'%s>' % pagename)
         else:
             return self.wrap(u'%s> [%s]' % (linktext, pagename))
예제 #6
0
 def pagelink(self, on, pagename='', page=None, **kw):
     FormatterBase.pagelink(self, on, pagename, page, **kw)
     if on:
         if not self._textbuf or self._textbuf[-1] in ('\n', ' '):
             result = self.wrap(u'<')
         else:
             result = self.wrap(u' <')
         self.text_on(True)
         self.add_missing_space()
         return result
     else:
         linktext = self._text
         self.text_off()
         orig_pagename = pagename
         if pagename.find('/'):
             pagename = pagename.replace('/', '.')
         pagename += '.txt'
         if linktext == orig_pagename:
             return self.wrap(u'%s>' % pagename)
         else:
             return self.wrap(u'%s> [%s]' % (linktext, pagename))
예제 #7
0
 def pagelink(self, on, pagename='', page=None, **kw):
     FormatterBase.pagelink(self, pagename, page, **kw)
     if not pagename and page is not None:
         pagename = page.page_name
     kw['pagename'] = pagename
     return self._set_tag('pagelink', on, **kw)
예제 #8
0
 def pagelink(self, on, pagename='', page=None, **kw):
     FormatterBase.pagelink(self, on, pagename, page, **kw)
     return self.interwikilink(on, 'Self', pagename, **kw)
 def pagelink(self, on, pagename='', page=None, **kw):
     FormatterBase.pagelink(self, on, pagename, page, **kw)
     return self.interwikilink(on, 'Self', pagename, **kw)
예제 #10
0
 def pagelink(self, on, pagename='', page=None, **kw):
     FormatterBase.pagelink(self, on, pagename, page, **kw)
     return self.null()
예제 #11
0
파일: dom_xml.py 프로젝트: steveyen/moingo
 def pagelink(self, on, pagename='', page=None, **kw):
     FormatterBase.pagelink(self, pagename, page, **kw)
     if not pagename and page is not None:
         pagename = page.page_name
     kw['pagename'] = pagename
     return self._set_tag('pagelink', on, **kw)
예제 #12
0
파일: text_xml.py 프로젝트: aahlad/soar
 def pagelink(self, on, pagename='', page=None, **kw):
     FormatterBase.pagelink(self, on, pagename, page, **kw)
     if page is None:
         page = Page(self.request, pagename, formatter=self)
     return page.link_to(self.request, on=on, **kw)
예제 #13
0
 def pagelink(self, on, pagename='', page=None, **kw):
     FormatterBase.pagelink(self, on, pagename, page, **kw)
     return self.null()
예제 #14
0
 def pagelink(self, on, pagename='', page=None, **kw):
     FormatterBase.pagelink(self, on, pagename, page, **kw)
     return (u">>", u"<<") [not on]