* Get links to work in help.

* Clean up the creation of the help texts a little bit.
This commit is contained in:
Toshio Kuratomi 2008-03-01 10:20:02 -08:00
parent 688f12dca7
commit 9887f53654
2 changed files with 12 additions and 13 deletions

View file

@ -5,20 +5,21 @@ from turbogears.database import session
from fas.auth import *
class Help(controllers.Controller):
help = { 'none' : ['Error', '<p>We could not find that help item</p>'],
'user_ircnick' : ['IRC Nick (Optional)', '<p>IRC Nick is used to identify yourself on irc.freenode.net. Please register your nick on irc.freenode.net first, then fill this in so people can find you online when they need to</p>'],
'user_primary_email' : ['Primary Email (Required)', '<p>This email address should be your prefered email contact and will be used to send various official emails to. This is also where your @fedoraproject.org email will get forwarded</p>'],
'user_human_name' : ['Full Name (Required)', '<p>Your Human Name or "real life" name</p>'],
'user_gpg_keyid' : ['GPG Key', '<p>Only required for users signing the CLA. It is generally used to prove that a message or email came from you or to encrypt information so that only the recipients can read it. See http://fedoraproject.org/wiki/Infrastructure/AccountSystem/CLAHowTo for more information</p>'],
'user_telephone' : ['Telephone', '<p>Only required for users signing the <a href="">CLA</a>. Sometimes during a time of emergency someone from the Fedora Project may need to contact you. For more information see our <a href="">Privacy Policy</a></p>'],
}
def __init__(self):
'''Create a JsonRequest Controller.'''
@expose(template="fas.templates.help")
def get_help(self, id='none'):
try:
help = { 'none' : ['Error', 'We could not find that help item'],
'user_ircnick' : ['IRC Nick (Optional)', 'IRC Nick is used to identify yourself on irc.freenode.net. Please register your nick on irc.freenode.net first, then fill this in so people can find you online when they need to'],
'user_primary_email' : ['Primary Email (Required)', 'This email address should be your prefered email contact and will be used to send various official emails to. This is also where your @fedoraproject.org email will get forwarded'],
'user_human_name' : ['Full Name (Required)', 'Your Human Name or "real life" name'],
'user_gpg_keyid' : ['GPG Key', 'Only required for users signing the CLA. It is generally used to prove that a message or email came from you or to encrypt information so that only the recipients can read it. See http://fedoraproject.org/wiki/Infrastructure/AccountSystem/CLAHowTo for more information'],
'user_telephone' : ['Telephone', 'Only required for users signing the <a href="">CLA</a>. Sometimes during a time of emergency someone from the Fedora Project may need to contact you. For more information see our <a href="">Privacy Policy</a>'],
}
helpItem = self.help[id]
except KeyError:
return dict(title='Error', help='We could not find that help item')
return dict(help=help[id])
return dict(title='Error', helpItem=['Error', '<p>We could not find that help item</p>'])
return dict(help=helpItem)

View file

@ -7,8 +7,6 @@
<title>${help[0]}</title>
</head>
<body>
<p>
${help[1]}
</p>
${XML(help[1])}
</body>
</html>