1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/macros/LoginHint.py Sat Mar 01 21:45:56 2008 +0100
1.3 @@ -0,0 +1,22 @@
1.4 +"""
1.5 + MoinMoin - LoginHint
1.6 +
1.7 + Usage:
1.8 + [[LoginHint(Please login using the link at the top border!)]]
1.9 +
1.10 + @copyright: 2006 Thomas Waldmann
1.11 + @license: GNU GPL, see COPYING for details
1.12 +"""
1.13 +hint_style = "background-color: orange; text-align: center;"
1.14 +
1.15 +def execute(macro, args):
1.16 + request = macro.request
1.17 + if request.user.valid:
1.18 + hint = ''
1.19 + else:
1.20 + f = request.formatter
1.21 + hint = (f.div(1, id="LoginHint", style=hint_style) +
1.22 + f.text(args) +
1.23 + f.div(0))
1.24 + return hint
1.25 +