Misc fixes/cleanup.

This commit is contained in:
Ricky Zhou (周家杰) 2007-09-10 15:00:51 -07:00
parent ba5989d72e
commit c19f6546e9
2 changed files with 18 additions and 20 deletions

View file

@ -33,10 +33,9 @@ class Root(controllers.RootController):
group = Group() group = Group()
@expose(template="fas.templates.welcome") @expose(template="fas.templates.welcome")
# @identity.require(identity.in_group("admin"))
def index(self): def index(self):
if turbogears.identity.not_anonymous(): if turbogears.identity.not_anonymous():
turbogears.redirect('home') turbogears.redirect('/home')
return dict(now=time.ctime()) return dict(now=time.ctime())
@expose(template="fas.templates.home") @expose(template="fas.templates.home")
@ -102,22 +101,21 @@ class Root(controllers.RootController):
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 = _('''%(name)s <%(email)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). %(name)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.
be interested in contributing. \n\
\n\ How could you team up with the Fedora community to use and develop your
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.
skills? Check out http://fedoraproject.org/wiki/Join for some ideas. \ Our community is more than just software developers -- we also have a
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
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.
very smart and talented people. \n\
\n\ Fedora and FOSS are changing the world -- come be a part of it!''') % {'name': user.givenName, 'email': user.mail}
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)

View file

@ -31,8 +31,8 @@
<tr py:for="user in sorted(users)"> <tr py:for="user in sorted(users)">
<td><a href="${tg.url('/user/view/%s' % user)}">${user}</a></td> <td><a href="${tg.url('/user/view/%s' % user)}">${user}</a></td>
<td> <td>
<span py:if="claDone[user]" class="approved"> Done</span> <span py:if="claDone[user]" class="approved"> CLA Done</span>
<span py:if="not claDone[user]" class="unapproved"> Done</span> <span py:if="not claDone[user]" class="unapproved"> CLA Not Done</span>
</td> </td>
</tr> </tr>
</tbody> </tbody>