Attachment 'simplemente.diff'
Download 1 --- alt_simplemente.txt 2008-01-27 16:46:26.000000000 +0100
2 +++ neu_simplemente.txt 2008-06-16 20:21:46.000000000 +0200
3 @@ -823,7 +823,7 @@
4
5
6 from MoinMoin import config
7 - for scheme in self.linkSchemas:
8 + for scheme in config.url_schemas:
9 if pagename.startswith(scheme):
10 title = wikiutil.escape(title)
11 link = self.request.formatter.url(1, pagename, name=title) + \
12 @@ -930,27 +930,33 @@
13 def msg(self, d):
14 """ Assemble the msg display
15
16 - Changed: Added hidden h1 heading for better navigation with screenreaders
17 -
18 + Display a message with a widget or simple strings with a clear message link.
19 +
20 @param d: parameter dictionary
21 @rtype: unicode
22 @return: msg display html
23 """
24 _ = self.request.getText
25 - msg = d['msg']
26 - if not msg:
27 - return u''
28 + msgs = d['msg']
29
30 - if isinstance(msg, (str, unicode)):
31 - # Render simple strings with a close link
32 - close = d['page'].link_to(self.request, text=_('Clear message'))
33 - html = u'<p>%s</p>\n<div class="buttons">%s</div>\n' % (msg, close)
34 + result = u""
35 + close = d['page'].link_to(self.request, text=_('Clear message'), css_class="clear-link")
36 + for msg, msg_class in msgs:
37 + try:
38 + result += u'<p>%s</p>' % msg.render()
39 + close = ''
40 + except AttributeError:
41 + if msg and msg_class:
42 + result += u'<p><div class="%s">%s</div></p>' % (msg_class, msg)
43 + elif msg:
44 + result += u'<p>%s</p>\n' % msg
45 + if result:
46 + html = result + close
47 + return u'<div id="message">\n%s\n</div>\n' % html
48 else:
49 - # msg is a widget
50 - html = msg.render()
51 -
52 - return u'<div id="message">\n<h1 class="screenreader_info">%s</h1>\n%s\n</div>\n' % (_('Message'), html)
53 -
54 + return u''
55 + return u'<div id="message">\n<h1 class="screenreader_info">%s</h1>\n</div>\n' % html
56 +
57 def navibar(self, d):
58 """ Assemble the navibar
59
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.