* Add i18n support

* Clean up templates
 * Make admingroup config entry
This commit is contained in:
Ricky Zhou (周家杰) 2007-08-10 12:22:07 -04:00
parent 680a42e57e
commit 60e9d50f38
17 changed files with 1037 additions and 271 deletions

View file

@ -6,6 +6,8 @@
# The commented out values below are the defaults # The commented out values below are the defaults
admingroup = 'accounts'
# VIEW # VIEW
# which view (template engine) to use if one is not specified in the # which view (template engine) to use if one is not specified in the
@ -33,6 +35,10 @@
# Set to True if the scheduler should be started # Set to True if the scheduler should be started
# tg.scheduler = False # tg.scheduler = False
# i18n
session_filter.on = True
i18n.run_template_filter = True
# VISIT TRACKING # VISIT TRACKING
# Each visit to your application will be assigned a unique visit ID tracked via # Each visit to your application will be assigned a unique visit ID tracked via
# a cookie sent to the visitor's browser. # a cookie sent to the visitor's browser.

View file

@ -1,4 +1,4 @@
from turbogears import controllers, expose from turbogears import controllers, expose, config
# from model import * # from model import *
from turbogears import identity, redirect, widgets, validate, validators, error_handler from turbogears import identity, redirect, widgets, validate, validators, error_handler
from cherrypy import request, response from cherrypy import request, response
@ -14,6 +14,7 @@ import time
# import logging # import logging
# log = logging.getLogger("fas.controllers") # log = logging.getLogger("fas.controllers")
ADMINGROUP = config.get('admingroup')
class knownUser(validators.FancyValidator): class knownUser(validators.FancyValidator):
def _to_python(self, value, state): def _to_python(self, value, state):
@ -21,7 +22,7 @@ class knownUser(validators.FancyValidator):
def validate_python(self, value, state): def validate_python(self, value, state):
p = Person.byUserName(value) p = Person.byUserName(value)
if p.cn: if p.cn:
raise validators.Invalid("'%s' already exists" % value, value, state) raise validators.Invalid(_("'%s' already exists") % value, value, state)
class unknownUser(validators.FancyValidator): class unknownUser(validators.FancyValidator):
def _to_python(self, value, state): def _to_python(self, value, state):
@ -29,7 +30,7 @@ class unknownUser(validators.FancyValidator):
def validate_python(self, value, state): def validate_python(self, value, state):
p = Person.byUserName(value) p = Person.byUserName(value)
if not p.cn: if not p.cn:
raise validators.Invalid("'%s' does not exist" % value, value, state) raise validators.Invalid(_("'%s' does not exist") % value, value, state)
class unknownGroup(validators.FancyValidator): class unknownGroup(validators.FancyValidator):
def _to_python(self, value, state): def _to_python(self, value, state):
@ -37,49 +38,49 @@ class unknownGroup(validators.FancyValidator):
def validate_python(self, value, state): def validate_python(self, value, state):
g = Groups.groups(groupName) g = Groups.groups(groupName)
if not g: if not g:
raise validators.Invalid("'%s' does not exist" % value, value, state) raise validators.Invalid(_("'%s' does not exist") % value, value, state)
class newPerson(widgets.WidgetsList): class newPerson(widgets.WidgetsList):
# cn = widgets.TextField(label='Username', validator=validators.PlainText(not_empty=True, max=10)) # cn = widgets.TextField(label='Username', validator=validators.PlainText(not_empty=True, max=10))
cn = widgets.TextField(label='Username', validator=validators.All(knownUser(not_empty=True, max=10), validators.String(max=32, min=3))) cn = widgets.TextField(label=_('Username'), validator=validators.All(knownUser(not_empty=True, max=10), validators.String(max=32, min=3)))
givenName = widgets.TextField(label='Full Name', validator=validators.String(not_empty=True, max=42)) givenName = widgets.TextField(label=_('Full Name'), validator=validators.String(not_empty=True, max=42))
mail = widgets.TextField(label='email', validator=validators.Email(not_empty=True, strip=True)) mail = widgets.TextField(label=_('email'), validator=validators.Email(not_empty=True, strip=True))
telephoneNumber = widgets.TextField(label='Telephone Number', validator=validators.PhoneNumber(not_empty=True)) telephoneNumber = widgets.TextField(label=_('Telephone Number'), validator=validators.PhoneNumber(not_empty=True))
postalAddress = widgets.TextArea(label='Postal Address', validator=validators.NotEmpty) postalAddress = widgets.TextArea(label=_('Postal Address'), validator=validators.NotEmpty)
newPersonForm = widgets.ListForm(fields=newPerson(), submit_text='Sign Up') newPersonForm = widgets.ListForm(fields=newPerson(), submit_text=_('Sign Up'))
class editPerson(widgets.WidgetsList): class editPerson(widgets.WidgetsList):
# cn = widgets.TextField(label='Username', validator=validators.PlainText(not_empty=True, max=10)) # cn = widgets.TextField(label='Username', validator=validators.PlainText(not_empty=True, max=10))
userName = widgets.HiddenField(validator=validators.All(unknownUser(not_empty=True, max=10), validators.String(max=32, min=3))) userName = widgets.HiddenField(validator=validators.All(unknownUser(not_empty=True, max=10), validators.String(max=32, min=3)))
givenName = widgets.TextField(label='Full Name', validator=validators.String(not_empty=True, max=42)) givenName = widgets.TextField(label=_('Full Name'), validator=validators.String(not_empty=True, max=42))
mail = widgets.TextField(label='Email', validator=validators.Email(not_empty=True, strip=True)) mail = widgets.TextField(label=_('Email'), validator=validators.Email(not_empty=True, strip=True))
fedoraPersonBugzillaMail = widgets.TextField(label='Bugzilla Email', validator=validators.Email(not_empty=True, strip=True)) fedoraPersonBugzillaMail = widgets.TextField(label=_('Bugzilla Email'), validator=validators.Email(not_empty=True, strip=True))
fedoraPersonIrcNick = widgets.TextField(label='IRC Nick') fedoraPersonIrcNick = widgets.TextField(label=_('IRC Nick'))
fedoraPersonKeyId = widgets.TextField(label='PGP Key') fedoraPersonKeyId = widgets.TextField(label=_('PGP Key'))
telephoneNumber = widgets.TextField(label='Telephone Number', validator=validators.PhoneNumber(not_empty=True)) telephoneNumber = widgets.TextField(label=_('Telephone Number'), validator=validators.PhoneNumber(not_empty=True))
postalAddress = widgets.TextArea(label='Postal Address', validator=validators.NotEmpty) postalAddress = widgets.TextArea(label=_('Postal Address'), validator=validators.NotEmpty)
description = widgets.TextArea(label='Description') description = widgets.TextArea(label=_('Description'))
editPersonForm = widgets.ListForm(fields=editPerson(), submit_text='Update') editPersonForm = widgets.ListForm(fields=editPerson(), submit_text=_('Update'))
class editGroup(widgets.WidgetsList): class editGroup(widgets.WidgetsList):
groupName = widgets.HiddenField(validator=validators.All(unknownGroup(not_empty=True, max=10), validators.String(max=32, min=3))) groupName = widgets.HiddenField(validator=validators.All(unknownGroup(not_empty=True, max=10), validators.String(max=32, min=3)))
fedoraGroupDesc = widgets.TextField(label='Description', validator=validators.NotEmpty) fedoraGroupDesc = widgets.TextField(label=_('Description'), validator=validators.NotEmpty)
fedoraGroupOwner = widgets.TextField(label='Group Owner', validator=validators.All(knownUser(not_empty=True, max=10), validators.String(max=32, min=3))) fedoraGroupOwner = widgets.TextField(label=_('Group Owner'), validator=validators.All(knownUser(not_empty=True, max=10), validators.String(max=32, min=3)))
fedoraGroupNeedsSponsor = widgets.CheckBox(label='Needs Sponsor') fedoraGroupNeedsSponsor = widgets.CheckBox(label=_('Needs Sponsor'))
fedoraGroupUserCanRemove = widgets.CheckBox(label='Self Removal') fedoraGroupUserCanRemove = widgets.CheckBox(label=_('Self Removal'))
fedoraGroupJoinMsg = widgets.TextField(label='Group Join Message') fedoraGroupJoinMsg = widgets.TextField(label=_('Group Join Message'))
editGroupForm = widgets.ListForm(fields=editGroup(), submit_text='Update') editGroupForm = widgets.ListForm(fields=editGroup(), submit_text=_('Update'))
class findUser(widgets.WidgetsList): class findUser(widgets.WidgetsList):
userName = widgets.AutoCompleteField(label='Username', search_controller='search', search_param='userName', result_name='people') userName = widgets.AutoCompleteField(label=_('Username'), search_controller='search', search_param='userName', result_name='people')
action = widgets.HiddenField(label='action', default='apply', validator=validators.String(not_empty=True)) action = widgets.HiddenField(default='apply', validator=validators.String(not_empty=True))
groupName = widgets.HiddenField(label='groupName', validator=validators.String(not_empty=True)) groupName = widgets.HiddenField(validator=validators.String(not_empty=True))
searchUserForm = widgets.ListForm(fields=findUser(), submit_text='Invite') searchUserForm = widgets.ListForm(fields=findUser(), submit_text=_('Invite'))
class Root(controllers.RootController): class Root(controllers.RootController):
@ -115,7 +116,7 @@ class Root(controllers.RootController):
if not identity.current.anonymous \ if not identity.current.anonymous \
and identity.was_login_attempted() \ and identity.was_login_attempted() \
and not identity.get_identity_errors(): and not identity.get_identity_errors():
turbogears.flash('Welcome, %s' % Person.byUserName(turbogears.identity.current.user_name).givenName) turbogears.flash(_('Welcome, %s') % Person.byUserName(turbogears.identity.current.user_name).givenName)
raise redirect(forward_url) raise redirect(forward_url)
forward_url=None forward_url=None
@ -139,7 +140,7 @@ class Root(controllers.RootController):
@expose() @expose()
def logout(self): def logout(self):
identity.current.logout() identity.current.logout()
turbogears.flash('You have successfully logged out.') turbogears.flash(_('You have successfully logged out.'))
raise redirect("/") raise redirect("/")
@expose(template="fas.templates.viewAccount") @expose(template="fas.templates.viewAccount")
@ -152,7 +153,7 @@ class Root(controllers.RootController):
else: else:
personal = False personal = False
try: try:
Groups.byUserName(turbogears.identity.current.user_name)['accounts'].cn Groups.byUserName(turbogears.identity.current.user_name)[ADMINGROUP].cn
admin = True admin = True
except KeyError: except KeyError:
admin = False admin = False
@ -176,11 +177,11 @@ class Root(controllers.RootController):
def editAccount(self, userName=None, action=None): def editAccount(self, userName=None, action=None):
if userName: if userName:
try: try:
Groups.byUserName(turbogears.identity.current.user_name)['accounts'].cn Groups.byUserName(turbogears.identity.current.user_name)[ADMINGROUP].cn
if not userName: if not userName:
userName = turbogears.identity.current.user_name userName = turbogears.identity.current.user_name
except KeyError: except KeyError:
turbogears.flash('You cannot edit %s' % userName ) turbogears.flash(_('You cannot edit %s') % userName )
userName = turbogears.identity.current.user_name userName = turbogears.identity.current.user_name
else: else:
userName = turbogears.identity.current.user_name userName = turbogears.identity.current.user_name
@ -202,18 +203,18 @@ class Root(controllers.RootController):
def viewGroup(self, groupName): def viewGroup(self, groupName):
try: try:
groups = Groups.byGroupName(groupName, includeUnapproved=True) groups = Groups.byGroupName(groupName, includeUnapproved=True)
except KeyError, e: except KeyError:
raise ValueError, 'Group: %s - Does not exist!' % e raise ValueError, _('Group: %s - Does not exist!') % groupName
try: try:
group = Groups.groups(groupName)[groupName] group = Groups.groups(groupName)[groupName]
except TypeError: except TypeError:
raise ValueError, 'Group: %s - does not exist' % groupName raise ValueError, _('Group: %s - Does not exist!') % groupName
userName = turbogears.identity.current.user_name userName = turbogears.identity.current.user_name
try: try:
myStatus = groups[userName].fedoraRoleStatus myStatus = groups[userName].fedoraRoleStatus
except KeyError: except KeyError:
# Not in group # Not in group
myStatus = 'Not a Member' myStatus = 'Not a Member' # This has say 'Not a Member'
except TypeError: except TypeError:
groups = {} groups = {}
try: try:
@ -230,14 +231,14 @@ class Root(controllers.RootController):
def editGroup(self, groupName, action=None): def editGroup(self, groupName, action=None):
userName = turbogears.identity.current.user_name userName = turbogears.identity.current.user_name
try: try:
Groups.byUserName(userName)['accounts'].cn Groups.byUserName(userName)[ADMINGROUP].cn
except KeyError: except KeyError:
try: try:
Groups.byUserName(userName)[groupName] Groups.byUserName(userName)[groupName]
if Groups.byUserName(userName)[groupName].fedoraRoleType.lower() != 'administrator': if Groups.byUserName(userName)[groupName].fedoraRoleType.lower() != 'administrator':
raise KeyError raise KeyError
except KeyError: except KeyError:
turbogears.flash('You cannot edit %s' % groupName) turbogears.flash(_('You cannot edit %s') % groupName)
turbogears.redirect('viewGroup?groupName=%s' % groupName) turbogears.redirect('viewGroup?groupName=%s' % groupName)
group = Groups.groups(groupName)[groupName] group = Groups.groups(groupName)[groupName]
value = {'groupName' : groupName, value = {'groupName' : groupName,
@ -260,7 +261,7 @@ class Root(controllers.RootController):
try: try:
groups.keys() groups.keys()
except: except:
turbogears.flash("No Groups found matching '%s'" % search) turbogears.flash(_("No Groups found matching '%s'") % search)
groups = {} groups = {}
return dict(groups=groups, search=search, myGroups=myGroups) return dict(groups=groups, search=search, myGroups=myGroups)
@ -284,20 +285,20 @@ class Root(controllers.RootController):
if password and passwordCheck: if password and passwordCheck:
if not password == passwordCheck: if not password == passwordCheck:
turbogears.flash('Passwords do not match!') turbogears.flash(_('Passwords do not match!'))
return dict() return dict()
if len(password) < 8: if len(password) < 8:
turbogears.flash('Password is too short. Must be at least 8 characters long') turbogears.flash(_('Password is too short. Must be at least 8 characters long'))
return dict() return dict()
newpass = p.generatePassword(password) newpass = p.generatePassword(password)
if userName and mail and not turbogears.identity.current.user_name: if userName and mail and not turbogears.identity.current.user_name:
if not mail == p.mail: if not mail == p.mail:
turbogears.flash("username + email combo unknown.") turbogears.flash(_("username + email combo unknown."))
return dict() return dict()
newpass = p.generatePassword() newpass = p.generatePassword()
message = turbomail.Message('accounts@fedoraproject.org', p.mail, 'Fedora Project Password Reset') message = turbomail.Message('accounts@fedoraproject.org', p.mail, _('Fedora Project Password Reset'))
message.plain = "You have requested a password reset! Your new password is - %s \nPlease go to https://admin.fedoraproject.org/fas/ to change it" % newpass['pass'] message.plain = _("You have requested a password reset! Your new password is - %s \nPlease go to https://admin.fedoraproject.org/fas/ to change it") % newpass['pass']
turbomail.enqueue(message) turbomail.enqueue(message)
p.__setattr__('userPassword', newpass['hash']) p.__setattr__('userPassword', newpass['hash'])
@ -305,10 +306,10 @@ class Root(controllers.RootController):
print "PASS: %s" % newpass['pass'] print "PASS: %s" % newpass['pass']
if turbogears.identity.current.user_name: if turbogears.identity.current.user_name:
turbogears.flash("Password Changed") turbogears.flash(_("Password Changed"))
turbogears.redirect("viewAccount") turbogears.redirect("viewAccount")
else: else:
turbogears.flash('Your password has been emailed to you') turbogears.flash(_('Your password has been emailed to you'))
return dict() return dict()
@expose(template="fas.templates.userList") @expose(template="fas.templates.userList")
@ -319,7 +320,7 @@ class Root(controllers.RootController):
try: try:
users[0] users[0]
except: except:
turbogears.flash("No users found matching '%s'" % search) turbogears.flash(_("No users found matching '%s'") % search)
users = [] users = []
cla_done = Groups.byGroupName('cla_done') cla_done = Groups.byGroupName('cla_done')
claDone = {} claDone = {}
@ -357,14 +358,14 @@ class Root(controllers.RootController):
try: try:
group = Groups.groups(groupName)[groupName] group = Groups.groups(groupName)[groupName]
except KeyError: except KeyError:
turbogears.flash('Group Error: %s does not exist.' % groupName) turbogears.flash(_('Group Error: %s does not exist.') % groupName)
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
try: try:
p = Person.byUserName(userName) p = Person.byUserName(userName)
if not p.cn: if not p.cn:
raise KeyError, userName raise KeyError, userName
except KeyError: except KeyError:
turbogears.flash('User Error: User %s does not exist.' % userName) turbogears.flash(_('User Error: User %s does not exist.') % userName)
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
g = Groups.byGroupName(groupName, includeUnapproved=True) g = Groups.byGroupName(groupName, includeUnapproved=True)
@ -374,15 +375,15 @@ class Root(controllers.RootController):
try: try:
Groups.apply(groupName, userName) Groups.apply(groupName, userName)
except ldap.ALREADY_EXISTS: except ldap.ALREADY_EXISTS:
turbogears.flash('%s Already in group!' % p.cn) turbogears.flash(_('%s Already in group!') % p.cn)
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
else: else:
turbogears.flash('%s Applied!' % p.cn) turbogears.flash(_('%s Applied!') % p.cn)
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
# Some error checking for the sponsors # Some error checking for the sponsors
if g[userName].fedoraRoleType.lower() == 'administrator' and g[sponsor].fedoraRoleType.lower() == 'sponsor': if g[userName].fedoraRoleType.lower() == 'administrator' and g[sponsor].fedoraRoleType.lower() == 'sponsor':
raise ValueError, 'Sponsors cannot alter administrators. End of story.' raise ValueError, _('Sponsors cannot alter administrators. End of story.')
try: try:
userGroup = Groups.byGroupName(groupName)[userName] userGroup = Groups.byGroupName(groupName)[userName]
@ -396,45 +397,45 @@ class Root(controllers.RootController):
try: try:
Groups.remove(group.cn, p.cn) Groups.remove(group.cn, p.cn)
except TypeError: except TypeError:
turbogears.flash('%s could not be removed from %s!' % (p.cn, group.cn)) turbogears.flash(_('%(name)s could not be removed from %(group)s!') % {'name' : p.cn, 'group' : group.cn})
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
else: else:
turbogears.flash('%s removed from %s!' % (p.cn, group.cn)) turbogears.flash(_('%(name)s removed from %(group)s!') % {'name' : p.cn, 'group' : group.cn})
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
return dict() return dict()
# Upgrade user in a group # Upgrade user in a group
elif action == 'upgrade': elif action == 'upgrade':
if g[userName].fedoraRoleType.lower() == 'sponsor' and g[sponsor].fedoraRoleType.lower() == 'sponsor': if g[userName].fedoraRoleType.lower() == 'sponsor' and g[sponsor].fedoraRoleType.lower() == 'sponsor':
raise ValueError, 'Sponsors cannot admin other sponsors' raise ValueError, _('Sponsors cannot admin other sponsors')
try: try:
p.upgrade(groupName) p.upgrade(groupName)
except TypeError, e: except TypeError, e:
turbogears.flash('Cannot upgrade %s - %s!' % (p.cn, e)) turbogears.flash(_('Cannot upgrade %(name)s - %(error)s!') % {'name' : p.cn, 'error' : e})
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
turbogears.flash('%s Upgraded!' % p.cn) turbogears.flash(_('%s Upgraded!') % p.cn)
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
# Downgrade user in a group # Downgrade user in a group
elif action == 'downgrade': elif action == 'downgrade':
if g[userName].fedoraRoleType.lower() == 'administrator' and g[sponsor].fedoraRoleType.lower() == 'sponsor': if g[userName].fedoraRoleType.lower() == 'administrator' and g[sponsor].fedoraRoleType.lower() == 'sponsor':
raise ValueError, 'Sponsors cannot downgrade admins' raise ValueError, _('Sponsors cannot downgrade admins')
try: try:
p.downgrade(groupName) p.downgrade(groupName)
except TypeError, e: except TypeError, e:
turbogears.flash('Cannot downgrade %s - %s!' % (p.cn, e)) turbogears.flash(_('Cannot downgrade %(name)s - %(error)s!') % {'name' : p.cn, 'error' : e})
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
turbogears.flash('%s Downgraded!' % p.cn) turbogears.flash(_('%s Downgraded!') % p.cn)
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
# Sponsor / Approve User # Sponsor / Approve User
elif action == 'sponsor' or action == 'apply': elif action == 'sponsor' or action == 'apply':
p.sponsor(groupName, sponsor) p.sponsor(groupName, sponsor)
turbogears.flash('%s has been sponsored!' % p.cn) turbogears.flash(_('%s has been sponsored!') % p.cn)
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
turbogears.flash('Invalid action: %s' % action) turbogears.flash(_('Invalid action: %s') % action)
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
return dict() return dict()
@ -443,9 +444,9 @@ class Root(controllers.RootController):
@identity.require(identity.not_anonymous()) @identity.require(identity.not_anonymous())
def inviteMember(self, name=None, email=None, skills=None): def inviteMember(self, name=None, email=None, skills=None):
if name and email: if name and email:
turbogears.flash('Invitation Sent to: "%s" <%s>' % (name, email)) turbogears.flash(_('Invitation Sent to: "%(name)s" <%(email)s>') % {'name' : name, 'email' : email})
if name or email: if name or email:#FIXME
turbogears.flash('Please provide both an email address and the persons name.') turbogears.flash(_('Please provide both an email address and the persons name.'))
return dict() return dict()
@expose(template='fas.templates.apply') @expose(template='fas.templates.apply')
@ -459,29 +460,29 @@ class Root(controllers.RootController):
if action != 'Remove': if action != 'Remove':
try: try:
Groups.apply(groupName, userName) Groups.apply(groupName, userName)
turbogears.flash('Application sent for %s' % user.cn) turbogears.flash(_('Application sent for %s') % user.cn)
except ldap.ALREADY_EXISTS, e: except ldap.ALREADY_EXISTS, e:
turbogears.flash('Application Denied: %s' % e[0]['desc']) turbogears.flash(_('Application Denied: %s') % e[0]['desc'])
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
if action == 'Remove' and group.fedoraGroupUserCanRemove == 'TRUE': if action == 'Remove' and group.fedoraGroupUserCanRemove == 'TRUE':
try: try:
Groups.remove(group.cn, user.cn) Groups.remove(group.cn, user.cn)
except TypeError: except TypeError:
turbogears.flash('%s could not be removed from %s!' % (user.cn, group.cn)) turbogears.flash(_('%(user)s could not be removed from %(group)s!') % {'user' : user.cn, 'group' : group.cn})
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
else: else:
turbogears.flash('%s removed from %s!' % (user.cn, group.cn)) turbogears.flash(_('%(user)s removed from %(group)s!') % {'user' : user.cn, 'group' : group.cn})
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
else: else:
turbogears.flash('%s does not allow self removal' % group.cn) turbogears.flash(_('%s does not allow self removal') % group.cn)
turbogears.redirect('viewGroup?groupName=%s' % group.cn) turbogears.redirect('viewGroup?groupName=%s' % group.cn)
return dict() return dict()
@expose(template='fas.templates.signUp') @expose(template='fas.templates.signUp')
def signUp(self): def signUp(self):
if turbogears.identity.not_anonymous(): if turbogears.identity.not_anonymous():
turbogears.flash('No need to sign up, You have an account!') turbogears.flash(_('No need to sign up, You have an account!'))
turbogears.redirect('viewAccount') turbogears.redirect('viewAccount')
return dict(form=newPersonForm) return dict(form=newPersonForm)
@ -494,15 +495,15 @@ class Root(controllers.RootController):
Person.newPerson(cn.encode('utf8'), givenName.encode('utf8'), mail.encode('utf8'), telephoneNumber.encode('utf8'), postalAddress.encode('utf8')) Person.newPerson(cn.encode('utf8'), givenName.encode('utf8'), mail.encode('utf8'), telephoneNumber.encode('utf8'), postalAddress.encode('utf8'))
p = Person.byUserName(cn.encode('utf8')) p = Person.byUserName(cn.encode('utf8'))
newpass = p.generatePassword() newpass = p.generatePassword()
message = turbomail.Message('accounts@fedoraproject.org', p.mail, 'Fedora Project Password Reset') message = turbomail.Message('accounts@fedoraproject.org', p.mail, _('Fedora Project Password Reset'))
message.plain = "You have requested a password reset! Your new password is - %s \nPlease go to https://admin.fedoraproject.org/fas/ to change it" % newpass['pass'] message.plain = _("You have requested a password reset! Your new password is - %s \nPlease go to https://admin.fedoraproject.org/fas/ to change it") % newpass['pass']
turbomail.enqueue(message) turbomail.enqueue(message)
p.__setattr__('userPassword', newpass['hash']) p.__setattr__('userPassword', newpass['hash'])
turbogears.flash('Your password has been emailed to you. Please log in with it and change your password') turbogears.flash(_('Your password has been emailed to you. Please log in with it and change your password'))
turbogears.redirect('/') turbogears.redirect('/')
except ldap.ALREADY_EXISTS: except ldap.ALREADY_EXISTS:
turbogears.flash('%s Already Exists, Please pick a different name' % cn) turbogears.flash(_('%s Already Exists, Please pick a different name') % cn)
turbogears.redirect('signUp') turbogears.redirect('signUp')
return dict() return dict()
@ -512,11 +513,11 @@ class Root(controllers.RootController):
def editAccountSubmit(self, givenName, mail, fedoraPersonBugzillaMail, telephoneNumber, postalAddress, userName=None, fedoraPersonIrcNick='', fedoraPersonKeyId='', description=''): def editAccountSubmit(self, givenName, mail, fedoraPersonBugzillaMail, telephoneNumber, postalAddress, userName=None, fedoraPersonIrcNick='', fedoraPersonKeyId='', description=''):
if userName: if userName:
try: try:
Groups.byUserName(turbogears.identity.current.user_name)['accounts'].cn Groups.byUserName(turbogears.identity.current.user_name)[ADMINGROUP].cn
if not userName: if not userName:
userName = turbogears.identity.current.user_name userName = turbogears.identity.current.user_name
except KeyError: except KeyError:
turbogears.flash('You cannot view %s' % userName) turbogears.flash(_('You cannot view %s') % userName)
userName = turbogears.identity.current.user_name userName = turbogears.identity.current.user_name
turbogears.redirect("editAccount") turbogears.redirect("editAccount")
return dict() return dict()
@ -531,7 +532,7 @@ class Root(controllers.RootController):
user.__setattr__('telephoneNumber', telephoneNumber.encode('utf8')) user.__setattr__('telephoneNumber', telephoneNumber.encode('utf8'))
user.__setattr__('postalAddress', postalAddress.encode('utf8')) user.__setattr__('postalAddress', postalAddress.encode('utf8'))
user.__setattr__('description', description.encode('utf8')) user.__setattr__('description', description.encode('utf8'))
turbogears.flash('Your account has been updated.') turbogears.flash(_('Your account has been updated.'))
turbogears.redirect("viewAccount?userName=%s" % userName) turbogears.redirect("viewAccount?userName=%s" % userName)
return dict() return dict()
@ -549,12 +550,12 @@ class Root(controllers.RootController):
import turbomail import turbomail
user = Person.byUserName(turbogears.identity.current.user_name) user = Person.byUserName(turbogears.identity.current.user_name)
if target: if target:
message = turbomail.Message(user.mail, target, 'Come join The Fedora Project!') message = turbomail.Message(user.mail, target, _('Come join The Fedora Project!'))
# message.plain = "Please come join the fedora project! Someone thinks your skills and abilities may be able to help our project. If your interested please go to http://fedoraproject.org/wiki/HelpWanted" # message.plain = "Please come join the fedora project! Someone thinks your skills and abilities may be able to help our project. If your interested please go to http://fedoraproject.org/wiki/HelpWanted"
message.plain = "%s <%s> has invited you to join the Fedora \ message.plain = _("%(name)s <%(email)s> has invited you to join the Fedora \
Project! We are a community of users and developers who produce a \ Project! We are a community of users and developers who produce a \
complete operating system from entirely free and open source software \ complete operating system from entirely free and open source software \
(FOSS). %s thinks that you have knowledge and skills \ (FOSS). %(name)s thinks that you have knowledge and skills \
that make you a great fit for the Fedora community, and that you might \ that make you a great fit for the Fedora community, and that you might \
be interested in contributing. \n\ be interested in contributing. \n\
\n\ \n\
@ -565,13 +566,12 @@ place for you whether you're an artist, a web site builder, a writer, or \
a people person. You'll grow and learn as you work on a team with other \ a people person. You'll grow and learn as you work on a team with other \
very smart and talented people. \n\ very smart and talented people. \n\
\n\ \n\
Fedora and FOSS are changing the world -- come be a part of it!" % (user.givenName, user.mail, user.givenName) Fedora and FOSS are changing the world -- come be a part of it!") % {'name' : user.givenName, 'email' : user.mail}
turbomail.enqueue(message) turbomail.enqueue(message)
turbogears.flash('Message sent to: %s' % target) turbogears.flash(_('Message sent to: %s') % target)
return dict(target=target, user=user) return dict(target=target, user=user)
def relativeUser(realUser, sudoUser): def relativeUser(realUser, sudoUser):
''' Takes user and sees if they are allow to sudo for remote group''' ''' Takes user and sees if they are allow to sudo for remote group'''
p = Person.byUserName('realUser') p = Person.byUserName('realUser')

View file

@ -200,6 +200,13 @@ a
/* header icon */ /* header icon */
} }
#content h3
{
font-size: 2.2ex;
border-bottom: 1px solid #C0C0C0;
margin-bottom: 0.25ex;
}
#content a #content a
{ {
color: #0C6ED0; color: #0C6ED0;
@ -211,14 +218,15 @@ a
.userbox dt .userbox dt
{ {
width: 23ex; width: 20ex;
float: left; float: left;
text-align: right; text-align: right;
font-weight: bold;
} }
.userbox dd .userbox dd
{ {
margin-left: 25ex; margin-left: 22ex;
} }
.account .account
@ -248,6 +256,7 @@ a
.roleslist .roleslist
{ {
list-style: none; list-style: none;
margin: 0 2ex;
} }
.roleslist li .roleslist li
@ -426,3 +435,9 @@ form li input, form li textarea
margin: 0; margin: 0;
} }
.message p
{
margin: 1ex 0;
font-size: 3ex;
font-family: monospace;
}

View file

@ -1,14 +1,3 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'">
py:extends="'master.kid'">
<head>
<style type="text/css">
@import "/static/css/fas.css";
</style>
</head>
<body>
</body>
</html> </html>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#">
<body> <body>
<div py:for="user in groups">${user},${Person.byUserName(user).mail},${Person.byUserName(user).givenName},${groups[user].fedoraRoleType},0 <div py:for="user in groups">${user},${Person.byUserName(user).mail},${Person.byUserName(user).givenName},${groups[user].fedoraRoleType},0
</div> </div>
</body> </body>
</html> </html>

View file

@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'">
<head> <head>
<title>Edit Account</title> <title>Edit Account</title>
</head> </head>
<body> <body>
<h2>Edit Account</h2> <h2>Edit Account</h2>
${form(action='editAccountSubmit', method='post', value=value)} ${form(action='editAccountSubmit', method='post', value=value)}
</body> </body>
</html> </html>

View file

@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'">
<head> <head>
<title>Edit Group</title> <title>Edit Group</title>
</head> </head>
<body> <body>
<h2>Edit Group</h2> <h2>Edit Group</h2>
${form(action='editGroupSubmit', method='post', value=value)} ${form(action='editGroupSubmit', method='post', value=value)}
</body> </body>
</html> </html>

View file

@ -1,10 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'">
<head> <head>
<meta content="text/plain; charset=utf-8" http-equiv="Content-Type" py:replace="''"/> <title>Crap!</title>
<title>Crap!</title> </head>
</head> <body>
<body> ${exception}
${exception} </body>
</body>
</html> </html>

View file

@ -4,19 +4,16 @@
<head> <head>
<title>Groups List</title> <title>Groups List</title>
</head> </head>
<body> <body>
<h2>List (${search})</h2> <h2>List (${search})</h2>
<h3>Search Groups</h3> <h3>Search Groups</h3>
<form method="GET"> <form method="GET">
<p>"*" is a wildcard (Ex: "cvs*")</p> <p>"*" is a wildcard (Ex: "cvs*")</p>
<div> <div>
<input type="text" value="${search}" name="search" size="15 "/> <input type="text" value="${search}" name="search" size="15 "/>
<input type="submit" value="Search" /> <input type="submit" value="Search" />
</div> </div>
</form> </form>
<h3>Results</h3> <h3>Results</h3>
<ul class="letters"> <ul class="letters">
<li py:for="letter in 'abcdefghijklmnopqrstuvwxyz'.upper()"><a href="?search=${letter}*">${letter}</a></li> <li py:for="letter in 'abcdefghijklmnopqrstuvwxyz'.upper()"><a href="?search=${letter}*">${letter}</a></li>
@ -28,10 +25,10 @@
<tr><th>Group</th><th>Description</th><th>Status</th></tr> <tr><th>Group</th><th>Description</th><th>Status</th></tr>
</thead> </thead>
<tbody> <tbody>
<?python <?python
keys = groups.keys() keys = groups.keys()
keys.sort() keys.sort()
?> ?>
<tr py:for="group in map(groups.get, keys)"> <tr py:for="group in map(groups.get, keys)">
<td><a href="${tg.url('viewGroup', groupName=group.cn)}">${group.cn}</a></td> <td><a href="${tg.url('viewGroup', groupName=group.cn)}">${group.cn}</a></td>
<td>${group.fedoraGroupDesc}</td> <td>${group.fedoraGroupDesc}</td>

View file

@ -1,24 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'">
<head> <head>
<title>Fedora Accounts System</title> <title>Fedora Accounts System</title>
</head> </head>
<body> <body>
<h2 py:if="'userID' in builds.userLink" class="accounts">Recent Builds <a href="${builds.userLink}">(Koji)</a></h2>
<h2 py:if="'userID' in builds.userLink" class="accounts">Recent Builds <a href='${builds.userLink}'>(Koji)</a></h2> <table py:if="'userID' in builds.userLink">
<table py:if="'userID' in builds.userLink"> <thead>
<thead>
<tr><th>Build</th><th>Build Date</th></tr> <tr><th>Build</th><th>Build Date</th></tr>
</thead> </thead>
<!--<tr><td>Koji</td><td><a href='${builds.userLink}'>Build Info</a></td></tr>--> <!--<tr><td>Koji</td><td><a href="${builds.userLink}">Build Info</a></td></tr>-->
<tr py:for="build in builds.builds"> <tr py:for="build in builds.builds">
<td> <td>
<span py:if="'complete' in builds.builds[build]['title']" class="approved"><a href="${build}">${builds.builds[build]['title']}</a></span> <span py:if="'complete' in builds.builds[build]['title']" class="approved"><a href="${build}">${builds.builds[build]['title']}</a></span>
<span py:if="'failed' in builds.builds[build]['title']" class="unapproved"><a href="${build}">${builds.builds[build]['title']}</a></span> <span py:if="'failed' in builds.builds[build]['title']" class="unapproved"><a href="${build}">${builds.builds[build]['title']}</a></span>
</td> </td>
<td>${builds.builds[build]['pubDate']}</td> <td>${builds.builds[build]['pubDate']}</td>
</tr> </tr>
</table> </table>
</body> </body>
</html> </html>

View file

@ -1,41 +1,39 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'">
py:extends="'master.kid'"> <head>
<title>Invite a new community member!</title>
<head> </head>
<style type="text/css"> <body>
@import "/static/css/fas.css"; <h2>Invite a new community member!</h2>
</style> <form method="POST">
</head> <div>
<body> To email: <input type="text" value="" name="target" /><br />
From: ${user.mail}<br />
<h2>Invite a new community member!</h2> Subject: Invitation to join the Fedora Team!<br />
Message:
<form method="POST"> <div class="message">
<div> <p>
To email: <input type='text' value='' name='target'/><br/> ${user.givenName} &lt;<a href='mailto: ${user.mail}'>${user.mail}</a>&gt; has invited you to join the Fedora
From: ${user.mail}<br/> Project! We are a community of users and developers who produce a
Subject: Invitation to join the Fedora Team!<br/> complete operating system from entirely free and open source software
Message: (FOSS). ${user.givenName} thinks that you have knowledge and skills
<pre> that make you a great fit for the Fedora community, and that you might
${user.givenName} &lt;<a href='mailto: ${user.mail}'>${user.mail}</a>&gt; has invited you to join the Fedora be interested in contributing.
Project! We are a community of users and developers who produce a </p>
complete operating system from entirely free and open source software <p>
(FOSS). ${user.givenName} thinks that you have knowledge and skills How could you team up with the Fedora community to use and develop your
that make you a great fit for the Fedora community, and that you might skills? Check out http://fedoraproject.org/wiki/Join for some ideas.
be interested in contributing. Our community is more than just software developers -- we also have a
place for you whether you're an artist, a web site builder, a writer, or
How could you team up with the Fedora community to use and develop your a people person. You'll grow and learn as you work on a team with other
skills? Check out http://fedoraproject.org/wiki/Join for some ideas. very smart and talented people.
Our community is more than just software developers -- we also have a </p>
place for you whether you're an artist, a web site builder, a writer, or <p>
a people person. You'll grow and learn as you work on a team with other Fedora and FOSS are changing the world -- come be a part of it!
very smart and talented people. </p>
</div>
Fedora and FOSS are changing the world -- come be a part of it! <input type="submit" value="Send" />
</pre> </div>
<input type="submit" value="Send" /> </form>
</div> </body>
</form>
</body>
</html> </html>

View file

@ -1,11 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'">
<head> <head>
<title>Login to the Fedora Accounts System</title> <title>Login to the Fedora Accounts System</title>
</head> </head>
<style type="text/css"> <style type="text/css">
#content ul #content ul
{ {
@ -13,7 +11,6 @@
margin: 1ex 3ex; margin: 1ex 3ex;
} }
</style> </style>
<body> <body>
<h2>Login</h2> <h2>Login</h2>
<p>${message}</p> <p>${message}</p>

View file

@ -1,13 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?python import sitetemplate ?> <?python import sitetemplate ?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="sitetemplate"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="sitetemplate">
<head py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'" py:attrs="item.items()"> <head py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'" py:attrs="item.items()">
<title py:replace="''">Title</title> <title py:replace="''">Title</title>
<link href="${tg.url('/static/css/style.css')}" rel="stylesheet" type="text/css" /> <link href="${tg.url('/static/css/style.css')}" rel="stylesheet" type="text/css" />
<meta py:replace="item[:]"/> <meta py:replace="item[:]"/>
</head> </head>
<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()"> <body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()">
<div id="wrapper"> <div id="wrapper">
<div id="head"> <div id="head">
@ -62,14 +60,13 @@
<div id="footer"> <div id="footer">
<ul id="footlinks"> <ul id="footlinks">
<li class="first"><a href="/">About</a></li> <li class="first"><a href="/">About</a></li>
<li><a href="/">Contact Us</a></li> <li><a href="http://fedoraproject.org/wiki/Communicate">Contact Us</a></li>
<li><a href="/">Legal &amp; Privacy</a></li> <li><a href="http://fedoraproject.org/wiki/Legal">Legal &amp; Privacy</a></li>
<!--<li><a href="/">Site Map</a></li>-->
<li><a href="/">Site Map</a></li> <li><a href="${tg.url('logout')}">Log Out</a></li>
<li><a href="/">Log Out</a></li>
</ul> </ul>
<p class="copy"> <p class="copy">
Copyright &copy; 2007 Red Hat, Inc. and others. All Rights Reserved. Copyright © 2007 Red Hat, Inc. and others. All Rights Reserved.
Please send any comments or corrections to the <a href="mailto:webmaster@fedoraproject.org">websites team</a>. Please send any comments or corrections to the <a href="mailto:webmaster@fedoraproject.org">websites team</a>.
</p> </p>
<p class="disclaimer"> <p class="disclaimer">

View file

@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'">
<head> <head>
<title>Sign up for a Fedora account</title> <title>Sign up for a Fedora account</title>
</head> </head>
<body> <body>
<h2>Sign up for a Fedora account</h2> <h2>Sign up for a Fedora account</h2>
${form(action='newAccountSubmit', method='post')} ${form(action='newAccountSubmit', method='post')}
</body> </body>
</html> </html>

View file

@ -1,48 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'">
py:extends="'master.kid'" <head>
xmlns:mochi="MyUniqueMochiUri"> <title>Users List</title>
</head>
<head> <body>
<title>Users List</title> <h2>List (${search})</h2>
</head> <form method="GET">
<body> <p>"*" is a wildcard (Ex: "cvs*")</p>
<h2>List (${search})</h2> <div>
<input type="text" value="${search}" name="search" size="15 "/>
<form method="GET"> <input type="submit" value="Search" />
<p>"*" is a wildcard (Ex: "cvs*")</p> </div>
<div> </form>
<input type="text" value="${search}" name="search" size="15 "/> <h3>Results</h3>
<input type="submit" value="Search" /> <ul class="letters">
</div> <li py:for="letter in 'abcdefghijklmnopqrstuvwxyz'.upper()"><a href="?search=${letter}*">${letter}</a></li>
</form> <li><a href="?search=*">All</a></li>
</ul>
<h3>Results</h3> <table>
<ul class="letters"> <thead>
<li py:for="letter in 'abcdefghijklmnopqrstuvwxyz'.upper()"><a href="?search=${letter}*">${letter}</a></li> <tr>
<li><a href="?search=*">All</a></li> <th>Username</th>
</ul> <th>Account Status</th>
</tr>
<table> </thead>
<thead> <tbody>
<tr> <?python
<th>Username</th> users.sort()
<th>Account Status</th> ?>
</tr> <tr py:for="user in users">
</thead> <td><a href="editAccount?userName=${user}">${user}</a></td>
<tbody> <td>
<?python <span py:if="claDone[user]" class="approved"> Done</span>
users.sort() <span py:if="not claDone[user]" class="unapproved"> Done</span>
?> </td>
<tr py:for="user in users"> </tr>
<td><a href="editAccount?userName=${user}">${user}</a></td> </tbody>
<td> </table>
<span py:if='claDone[user]' class="approved"> Done</span> </body>
<span py:if='not claDone[user]' class="unapproved"> Done</span>
</td>
</tr>
</tbody>
</table>
</body>
</html> </html>

View file

@ -1,21 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'">
py:extends="'master.kid'"> <head>
<head> <title>Welcome to FAS2</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/> <style type="text/css">
<title>Welcome to FAS2</title> #content ul
</head> {
<body> list-style: square;
margin: 1ex 3ex;
}
Welcome to the Fedora Account System 2. This system is not yet live so feel free to play around. Just don't expect it to work. <br/> </style>
</head>
<br/><br/> <body>
<p>
<a href='login'>Log In</a><br/> Welcome to the Fedora Accounts System 2. This system is not yet live so feel free to play around. Just don't expect it to work.
<!--<a href='#'>New Account</a><br/>--> </p>
<a href='http://fedoraproject.org/wiki/Join'>Why Join?</a> <ul>
<li><a href="${tg.url('login')}">Log In</a></li>
<li><a href="${tg.url('signUp')}">New Account</a></li>
</body> <li><a href="http://fedoraproject.org/wiki/Join">Why Join?</a></li>
</ul>
</body>
</html> </html>

774
fas/locales/messages.pot Normal file
View file

@ -0,0 +1,774 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2007-08-10 09:40\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: utf-8\n"
"Generated-By: pygettext.py 1.5\n"
#: fas/controllers.py:24
msgid "'%s' already exists"
msgstr ""
#: fas/controllers.py:32 fas/controllers.py:40
msgid "'%s' does not exist"
msgstr ""
#: fas/controllers.py:45 fas/controllers.py:78 fas/templates/userList.kid:th
#: fas/templates/viewGroup.kid:th
msgid "Username"
msgstr ""
#: fas/controllers.py:46 fas/controllers.py:56
msgid "Full Name"
msgstr ""
#: fas/controllers.py:47
msgid "email"
msgstr ""
#: fas/controllers.py:48 fas/controllers.py:61
#: fas/templates/viewAccount.kid:dt
msgid "Telephone Number"
msgstr ""
#: fas/controllers.py:49 fas/controllers.py:62
#: fas/templates/viewAccount.kid:dt
msgid "Postal Address"
msgstr ""
#: fas/controllers.py:51 fas/templates/login.kid:a
msgid "Sign Up"
msgstr ""
#: fas/controllers.py:57 fas/templates/viewAccount.kid:dt
msgid "Email"
msgstr ""
#: fas/controllers.py:58 fas/templates/viewAccount.kid:dt
msgid "Bugzilla Email"
msgstr ""
#: fas/controllers.py:59 fas/templates/viewAccount.kid:dt
msgid "IRC Nick"
msgstr ""
#: fas/controllers.py:60 fas/templates/viewAccount.kid:dt
msgid "PGP Key"
msgstr ""
#: fas/controllers.py:63 fas/controllers.py:69 fas/templates/groupList.kid:th
#: fas/templates/viewAccount.kid:dt
msgid "Description"
msgstr ""
#: fas/controllers.py:65 fas/controllers.py:75
msgid "Update"
msgstr ""
#: fas/controllers.py:70
msgid "Group Owner"
msgstr ""
#: fas/controllers.py:71
msgid "Needs Sponsor"
msgstr ""
#: fas/controllers.py:72 fas/templates/viewGroup.kid:dt
msgid "Self Removal"
msgstr ""
#: fas/controllers.py:73
msgid "Group Join Message"
msgstr ""
#: fas/controllers.py:82 fas/templates/viewGroup.kid:h3
msgid "Invite"
msgstr ""
#: fas/controllers.py:118
msgid "Welcome, %s"
msgstr ""
#: fas/controllers.py:125
msgid "The credentials you supplied were not correct or did not grant access to this resource."
msgstr ""
#: fas/controllers.py:128
msgid "You must provide your credentials before accessing this resource."
msgstr ""
#: fas/controllers.py:131
msgid "Please log in."
msgstr ""
#: fas/controllers.py:142
msgid "You have successfully logged out."
msgstr ""
#: fas/controllers.py:183 fas/controllers.py:240
msgid "You cannot edit %s"
msgstr ""
#: fas/controllers.py:206 fas/controllers.py:210
msgid "Group: %s - Does not exist!"
msgstr ""
#: fas/controllers.py:263
msgid "No Groups found matching '%s'"
msgstr ""
#: fas/controllers.py:287
msgid "Passwords do not match!"
msgstr ""
#: fas/controllers.py:290
msgid "Password is too short. Must be at least 8 characters long"
msgstr ""
#: fas/controllers.py:296
msgid "username + email combo unknown."
msgstr ""
#: fas/controllers.py:299 fas/controllers.py:497
msgid "Fedora Project Password Reset"
msgstr ""
#: fas/controllers.py:300 fas/controllers.py:498
msgid ""
"You have requested a password reset! Your new password is - %s \n"
"Please go to https://admin.fedoraproject.org/fas/ to change it"
msgstr ""
#: fas/controllers.py:308
msgid "Password Changed"
msgstr ""
#: fas/controllers.py:311
msgid "Your password has been emailed to you"
msgstr ""
#: fas/controllers.py:322
msgid "No users found matching '%s'"
msgstr ""
#: fas/controllers.py:360
msgid "Group Error: %s does not exist."
msgstr ""
#: fas/controllers.py:367
msgid "User Error: User %s does not exist."
msgstr ""
#: fas/controllers.py:377
msgid "%s Already in group!"
msgstr ""
#: fas/controllers.py:380
msgid "%s Applied!"
msgstr ""
#: fas/controllers.py:385
msgid "Sponsors cannot alter administrators. End of story."
msgstr ""
#: fas/controllers.py:399
msgid "%(name)s could not be removed from %(group)s!"
msgstr ""
#: fas/controllers.py:402
msgid "%(name)s removed from %(group)s!"
msgstr ""
#: fas/controllers.py:409
msgid "Sponsors cannot admin other sponsors"
msgstr ""
#: fas/controllers.py:413
msgid "Cannot upgrade %(name)s - %(error)s!"
msgstr ""
#: fas/controllers.py:415
msgid "%s Upgraded!"
msgstr ""
#: fas/controllers.py:422
msgid "Sponsors cannot downgrade admins"
msgstr ""
#: fas/controllers.py:426
msgid "Cannot downgrade %(name)s - %(error)s!"
msgstr ""
#: fas/controllers.py:428
msgid "%s Downgraded!"
msgstr ""
#: fas/controllers.py:434
msgid "%s has been sponsored!"
msgstr ""
#: fas/controllers.py:437
msgid "Invalid action: %s"
msgstr ""
#: fas/controllers.py:446
msgid "Invitation Sent to: \"%(name)s\" <%(email)s>"
msgstr ""
#: fas/controllers.py:448
msgid "Please provide both an email address and the persons name."
msgstr ""
#: fas/controllers.py:462
msgid "Application sent for %s"
msgstr ""
#: fas/controllers.py:464
msgid "Application Denied: %s"
msgstr ""
#: fas/controllers.py:471
msgid "%(user)s could not be removed from %(group)s!"
msgstr ""
#: fas/controllers.py:474
msgid "%(user)s removed from %(group)s!"
msgstr ""
#: fas/controllers.py:477
msgid "%s does not allow self removal"
msgstr ""
#: fas/controllers.py:484
msgid "No need to sign up, You have an account!"
msgstr ""
#: fas/controllers.py:501
msgid "Your password has been emailed to you. Please log in with it and change your password"
msgstr ""
#: fas/controllers.py:505
msgid "%s Already Exists, Please pick a different name"
msgstr ""
#: fas/controllers.py:519
msgid "You cannot view %s"
msgstr ""
#: fas/controllers.py:534
msgid "Your account has been updated."
msgstr ""
#: fas/controllers.py:552
msgid "Come join The Fedora Project!"
msgstr ""
#: fas/controllers.py:554
msgid ""
"%(name)s <%(email)s> has invited you to join the Fedora Project! We are a community of users and developers who produce a complete operating system from entirely free and open source software (FOSS). %(name)s thinks that you have knowledge and skills that make you a great fit for the Fedora community, and that you might be interested in contributing. \n"
"\n"
"How could you team up with the Fedora community to use and develop your skills? Check out http://fedoraproject.org/wiki/Join for some ideas. Our community is more than just software developers -- we also have a place for you whether you're an artist, a web site builder, a writer, or a people person. You'll grow and learn as you work on a team with other very smart and talented people. \n"
"\n"
"Fedora and FOSS are changing the world -- come be a part of it!"
msgstr ""
#: fas/controllers.py:570
msgid "Message sent to: %s"
msgstr ""
#: fas/templates/editAccount.kid:h2 fas/templates/editAccount.kid:title
msgid "Edit Account"
msgstr ""
#: fas/templates/editGroup.kid:h2 fas/templates/editGroup.kid:title
#: fas/templates/viewGroup.kid:title
msgid "Edit Group"
msgstr ""
#: fas/templates/error.kid:title
msgid "Crap!"
msgstr ""
#: fas/templates/groupList.kid:a fas/templates/userList.kid:a
msgid "All"
msgstr ""
#: fas/templates/groupList.kid:h3
msgid "Search Groups"
msgstr ""
#: fas/templates/groupList.kid:h3 fas/templates/userList.kid:h3
msgid "Results"
msgstr ""
#: fas/templates/groupList.kid:p fas/templates/userList.kid:p
msgid "\"*\" is a wildcard (Ex: \"cvs*\")"
msgstr ""
#: fas/templates/groupList.kid:span fas/templates/viewAccount.kid:span
#: fas/templates/viewGroup.kid:span
msgid "Approved"
msgstr ""
#: fas/templates/groupList.kid:span fas/templates/viewGroup.kid:span
msgid "Not a Member"
msgstr ""
#: fas/templates/groupList.kid:span fas/templates/viewGroup.kid:span
msgid "Unapproved"
msgstr ""
#: fas/templates/groupList.kid:th
msgid "Group"
msgstr ""
#: fas/templates/groupList.kid:th
msgid "Status"
msgstr ""
#: fas/templates/groupList.kid:title
msgid "Groups List"
msgstr ""
#: fas/templates/home.kid:a
msgid "(Koji)"
msgstr ""
#: fas/templates/home.kid:h2
msgid "Recent Builds"
msgstr ""
#: fas/templates/home.kid:th
msgid "Build"
msgstr ""
#: fas/templates/home.kid:th
msgid "Build Date"
msgstr ""
#: fas/templates/home.kid:title
msgid "Fedora Accounts System"
msgstr ""
#: fas/templates/invite.kid:br
msgid "Message:"
msgstr ""
#: fas/templates/invite.kid:br
msgid "Subject: Invitation to join the Fedora Team!"
msgstr ""
#: fas/templates/invite.kid:div
msgid "To email:"
msgstr ""
#: fas/templates/invite.kid:h2 fas/templates/invite.kid:title
msgid "Invite a new community member!"
msgstr ""
#: fas/templates/invite.kid:p
msgid "Fedora and FOSS are changing the world -- come be a part of it!"
msgstr ""
#: fas/templates/invite.kid:p
msgid ""
"How could you team up with the Fedora community to use and develop your\n"
" skills? Check out http://fedoraproject.org/wiki/Join for some ideas.\n"
" Our community is more than just software developers -- we also have a\n"
" place for you whether you're an artist, a web site builder, a writer, or\n"
" a people person. You'll grow and learn as you work on a team with other\n"
" very smart and talented people."
msgstr ""
#: fas/templates/login.kid:a
msgid "Forgot Password?"
msgstr ""
#: fas/templates/login.kid:h2
msgid "Login"
msgstr ""
#: fas/templates/login.kid:label
msgid "Password:"
msgstr ""
#: fas/templates/login.kid:label
msgid "User Name:"
msgstr ""
#: fas/templates/login.kid:title
msgid "Login to the Fedora Accounts System"
msgstr ""
#: fas/templates/master.kid:a
msgid "."
msgstr ""
#: fas/templates/master.kid:a
msgid "About"
msgstr ""
#: fas/templates/master.kid:a
msgid "Apply For a new Group"
msgstr ""
#: fas/templates/master.kid:a
msgid "Communicate"
msgstr ""
#: fas/templates/master.kid:a
msgid "Contact Us"
msgstr ""
#: fas/templates/master.kid:a
msgid "Download Fedora"
msgstr ""
#: fas/templates/master.kid:a
msgid "Fedora"
msgstr ""
#: fas/templates/master.kid:a
msgid "Group List"
msgstr ""
#: fas/templates/master.kid:a
msgid "Help/Documentation"
msgstr ""
#: fas/templates/master.kid:a
msgid "Join Fedora"
msgstr ""
#: fas/templates/master.kid:a
msgid "Learn about Fedora"
msgstr ""
#: fas/templates/master.kid:a
msgid "Legal & Privacy"
msgstr ""
#: fas/templates/master.kid:a
msgid "Log Out"
msgstr ""
#: fas/templates/master.kid:a
msgid "My Account"
msgstr ""
#: fas/templates/master.kid:a
msgid "News"
msgstr ""
#: fas/templates/master.kid:a
msgid "Projects"
msgstr ""
#: fas/templates/master.kid:a
msgid "User List"
msgstr ""
#: fas/templates/master.kid:a
msgid "websites team"
msgstr ""
#: fas/templates/master.kid:a fas/templates/welcome.kid:a
msgid "Log In"
msgstr ""
#: fas/templates/master.kid:label
msgid "Search:"
msgstr ""
#: fas/templates/master.kid:p
msgid ""
"Copyright © 2007 Red Hat, Inc. and others. All Rights Reserved.\n"
" Please send any comments or corrections to the"
msgstr ""
#: fas/templates/master.kid:p
msgid "The Fedora Project is maintained and driven by the community and sponsored by Red Hat. This is a community maintained site. Red Hat is not responsible for content."
msgstr ""
#: fas/templates/master.kid:strong
msgid "Logged in:"
msgstr ""
#: fas/templates/master.kid:title
msgid "Title"
msgstr ""
#: fas/templates/resetPassword.kid:h2 fas/templates/resetPassword.kid:title
msgid "Reset Password"
msgstr ""
#: fas/templates/resetPassword.kid:label
msgid "New Password:"
msgstr ""
#: fas/templates/resetPassword.kid:label
msgid "Primary Email:"
msgstr ""
#: fas/templates/resetPassword.kid:label
msgid "Username:"
msgstr ""
#: fas/templates/resetPassword.kid:label
msgid "Verify Password:"
msgstr ""
#: fas/templates/signUp.kid:h2 fas/templates/signUp.kid:title
msgid "Sign up for a Fedora account"
msgstr ""
#: fas/templates/userList.kid:span fas/templates/viewAccount.kid:span
msgid "Done"
msgstr ""
#: fas/templates/userList.kid:th fas/templates/viewAccount.kid:dt
msgid "Account Status"
msgstr ""
#: fas/templates/userList.kid:title
msgid "Users List"
msgstr ""
#: fas/templates/viewAccount.kid:a
msgid "(Create a new project)"
msgstr ""
#: fas/templates/viewAccount.kid:a
msgid "(Join another project)"
msgstr ""
#: fas/templates/viewAccount.kid:a
msgid "(View all pending requests...)"
msgstr ""
#: fas/templates/viewAccount.kid:a
msgid "(change)"
msgstr ""
#: fas/templates/viewAccount.kid:a
msgid "Chewbacca D. Wookiee requests approval to join project as a"
msgstr ""
#: fas/templates/viewAccount.kid:a
msgid "Gaius Baltar requests approval to upgrade from"
msgstr ""
#: fas/templates/viewAccount.kid:a
msgid "Invite a New Member..."
msgstr ""
#: fas/templates/viewAccount.kid:a
msgid "Leia Organa requests approval to upgrade from"
msgstr ""
#: fas/templates/viewAccount.kid:a
msgid "Manage Project Details..."
msgstr ""
#: fas/templates/viewAccount.kid:a
msgid "Manage Project Membership..."
msgstr ""
#: fas/templates/viewAccount.kid:a
msgid "View All Pendind Project Membership Requests..."
msgstr ""
#: fas/templates/viewAccount.kid:a fas/templates/viewGroup.kid:a
msgid "(edit)"
msgstr ""
#: fas/templates/viewAccount.kid:dt
msgid "Account Name"
msgstr ""
#: fas/templates/viewAccount.kid:dt
msgid "CLA"
msgstr ""
#: fas/templates/viewAccount.kid:dt
msgid "Password"
msgstr ""
#: fas/templates/viewAccount.kid:dt
msgid "Queue:"
msgstr ""
#: fas/templates/viewAccount.kid:dt
msgid "Real Name"
msgstr ""
#: fas/templates/viewAccount.kid:dt
msgid "Status:"
msgstr ""
#: fas/templates/viewAccount.kid:dt
msgid "Tools:"
msgstr ""
#: fas/templates/viewAccount.kid:h2
msgid "Your Fedora Account"
msgstr ""
#: fas/templates/viewAccount.kid:h3
msgid "Account Details"
msgstr ""
#: fas/templates/viewAccount.kid:h3
msgid "Your Roles"
msgstr ""
#: fas/templates/viewAccount.kid:span
msgid ", Active"
msgstr ""
#: fas/templates/viewAccount.kid:span
msgid "Not Done"
msgstr ""
#: fas/templates/viewAccount.kid:span
msgid "Valid"
msgstr ""
#: fas/templates/viewAccount.kid:strong
msgid "administrator"
msgstr ""
#: fas/templates/viewAccount.kid:strong
msgid "sponsor"
msgstr ""
#: fas/templates/viewAccount.kid:strong
msgid "to"
msgstr ""
#: fas/templates/viewAccount.kid:strong
msgid "user"
msgstr ""
#: fas/templates/viewAccount.kid:title
msgid "View Account"
msgstr ""
#: fas/templates/viewGroup.kid:a
msgid "Approve"
msgstr ""
#: fas/templates/viewGroup.kid:a
msgid "Delete"
msgstr ""
#: fas/templates/viewGroup.kid:a
msgid "Downgrade"
msgstr ""
#: fas/templates/viewGroup.kid:a
msgid "Remove me"
msgstr ""
#: fas/templates/viewGroup.kid:a
msgid "Suspend"
msgstr ""
#: fas/templates/viewGroup.kid:a
msgid "Upgrade"
msgstr ""
#: fas/templates/viewGroup.kid:a fas/templates/viewGroup.kid:th
msgid "Sponsor"
msgstr ""
#: fas/templates/viewGroup.kid:div
msgid "-- Error!"
msgstr ""
#: fas/templates/viewGroup.kid:dt
msgid "Description:"
msgstr ""
#: fas/templates/viewGroup.kid:dt
msgid "Join Message:"
msgstr ""
#: fas/templates/viewGroup.kid:dt
msgid "Name:"
msgstr ""
#: fas/templates/viewGroup.kid:dt
msgid "Needs Sponsor:"
msgstr ""
#: fas/templates/viewGroup.kid:dt
msgid "Owner:"
msgstr ""
#: fas/templates/viewGroup.kid:dt
msgid "Type:"
msgstr ""
#: fas/templates/viewGroup.kid:h2
msgid "Members"
msgstr ""
#: fas/templates/viewGroup.kid:h3
msgid "Group Details"
msgstr ""
#: fas/templates/viewGroup.kid:h3
msgid "My Status:"
msgstr ""
#: fas/templates/viewGroup.kid:span
msgid "No"
msgstr ""
#: fas/templates/viewGroup.kid:span
msgid "Yes"
msgstr ""
#: fas/templates/viewGroup.kid:th
msgid "Action"
msgstr ""
#: fas/templates/viewGroup.kid:th
msgid "Approval"
msgstr ""
#: fas/templates/viewGroup.kid:th
msgid "Date Added"
msgstr ""
#: fas/templates/viewGroup.kid:th
msgid "Date Approved"
msgstr ""
#: fas/templates/viewGroup.kid:th
msgid "Role Type"
msgstr ""
#: fas/templates/welcome.kid:a
msgid "Why Join?"
msgstr ""
#: fas/templates/welcome.kid:p
msgid "Welcome to the Fedora Accounts System 2. This system is not yet live so feel free to play around. Just don't expect it to work."
msgstr ""
#: fas/templates/welcome.kid:title
msgid "Welcome to FAS2"
msgstr ""