comparison MoinMoin/theme/__init__.py @ 3234:a739558ca3dc

Page.url() default changed to relative=False
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 10 Mar 2008 00:21:21 +0100
parents c25bc6e9ad61
children ecbde828b812
comparison
equal deleted inserted replaced
3233:5e120e903ad5 3234:a739558ca3dc
827 @rtype: unicode 827 @rtype: unicode
828 @return: rss href 828 @return: rss href
829 """ 829 """
830 request = self.request 830 request = self.request
831 url = page.url(request, querystr={ 831 url = page.url(request, querystr={
832 'action': 'rss_rc', 'ddiffs': '1', 'unique': '1', }, escape=0, relative=False) 832 'action': 'rss_rc', 'ddiffs': '1', 'unique': '1', }, escape=0)
833 return url 833 return url
834 834
835 def rsslink(self, d): 835 def rsslink(self, d):
836 """ Create rss link in head, used by FireFox 836 """ Create rss link in head, used by FireFox
837 837
1200 <!-- // GUI edit link and i18n 1200 <!-- // GUI edit link and i18n
1201 var gui_editor_link_href = "%(url)s"; 1201 var gui_editor_link_href = "%(url)s";
1202 var gui_editor_link_text = "%(text)s"; 1202 var gui_editor_link_text = "%(text)s";
1203 //--> 1203 //-->
1204 </script> 1204 </script>
1205 """ % {'url': page.url(self.request, querystr={'action': 'edit', 'editor': 'gui', }, relative=False), 1205 """ % {'url': page.url(self.request, querystr={'action': 'edit', 'editor': 'gui', }),
1206 'text': _('Edit (GUI)'), 1206 'text': _('Edit (GUI)'),
1207 } 1207 }
1208 1208
1209 def disabledEdit(self): 1209 def disabledEdit(self):
1210 """ Return a disabled edit link """ 1210 """ Return a disabled edit link """
1631 if (pagename and keywords.get('allow_doubleclick', 0) and 1631 if (pagename and keywords.get('allow_doubleclick', 0) and
1632 not keywords.get('print_mode', 0) and 1632 not keywords.get('print_mode', 0) and
1633 request.user.edit_on_doubleclick): 1633 request.user.edit_on_doubleclick):
1634 if request.user.may.write(pagename): # separating this gains speed 1634 if request.user.may.write(pagename): # separating this gains speed
1635 querystr = wikiutil.escape(wikiutil.makeQueryString({'action': 'edit'})) 1635 querystr = wikiutil.escape(wikiutil.makeQueryString({'action': 'edit'}))
1636 url = page.url(request, querystr, relative=False) 1636 url = page.url(request, querystr)
1637 bodyattr.append(''' ondblclick="location.href='%s'" ''' % url) 1637 bodyattr.append(''' ondblclick="location.href='%s'" ''' % url)
1638 1638
1639 # Set body to the user interface language and direction 1639 # Set body to the user interface language and direction
1640 bodyattr.append(' %s' % self.ui_lang_attr()) 1640 bodyattr.append(' %s' % self.ui_lang_attr())
1641 1641