added some better info to the 'home' screen as well as re-arranged menu items
This commit is contained in:
parent
d27f674caf
commit
c6e24a90ba
3 changed files with 32 additions and 4 deletions
|
@ -13,6 +13,7 @@ from fas.group import Group
|
||||||
from fas.cla import CLA
|
from fas.cla import CLA
|
||||||
from fas.json_request import JsonRequest
|
from fas.json_request import JsonRequest
|
||||||
from fas.help import Help
|
from fas.help import Help
|
||||||
|
from fas.auth import *
|
||||||
#from fas.openid_fas import OpenID
|
#from fas.openid_fas import OpenID
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -74,7 +75,13 @@ class Root(controllers.RootController):
|
||||||
@expose(template="fas.templates.home", allow_json=True)
|
@expose(template="fas.templates.home", allow_json=True)
|
||||||
@identity.require(identity.not_anonymous())
|
@identity.require(identity.not_anonymous())
|
||||||
def home(self):
|
def home(self):
|
||||||
return dict()
|
user_name = turbogears.identity.current.user_name
|
||||||
|
person = People.by_username(user_name)
|
||||||
|
cla = None
|
||||||
|
if signedCLAPrivs(person):
|
||||||
|
cla = 'signed'
|
||||||
|
|
||||||
|
return dict(person=person, cla=cla)
|
||||||
|
|
||||||
@expose(template="fas.templates.about")
|
@expose(template="fas.templates.about")
|
||||||
def about(self):
|
def about(self):
|
||||||
|
|
|
@ -7,5 +7,25 @@
|
||||||
<title>${_('Fedora Accounts System')}</title>
|
<title>${_('Fedora Accounts System')}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<?python from fas import auth ?>
|
||||||
|
<h2>Todo queue:</h2>
|
||||||
|
<py:for each="group in sorted(person.memberships)">
|
||||||
|
<dl>
|
||||||
|
<py:if test="auth.canSponsorGroup(person, group) and group.unapproved_roles">
|
||||||
|
<dd>
|
||||||
|
<ul class="queue">
|
||||||
|
<li py:for="role in group.unapproved_roles[:5]">
|
||||||
|
${Markup(_('<strong>%(user)s</strong> requests approval to join <a href="group/view/%(group)s">%(group)s</a>.') % {'user': role.member.username, 'group': group.name, 'group': group.name})}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</py:if>
|
||||||
|
</dl>
|
||||||
|
</py:for>
|
||||||
|
<ul class="queue">
|
||||||
|
<li py:if="cla == None">
|
||||||
|
${_('CLA Not Signed. To become a full Fedora Contributor please ')}<a href="${tg.url('/cla/')}">${_('sign the CLA')}</a>.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -56,14 +56,15 @@
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<div id="sidebar">
|
<div id="sidebar">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="first"><a href="http://fedoraproject.org/wiki/FWN/LatestIssue">${_('News')}</a></li>
|
<li class="first"><a href="${tg.url('/home')}">${_('Home')}</a></li>
|
||||||
<div py:if="not tg.identity.anonymous and 'accounts' in tg.identity.groups" py:strip=''>
|
<div py:if="not tg.identity.anonymous and 'accounts' in tg.identity.groups" py:strip=''>
|
||||||
<!-- TODO: Make these use auth.py -->
|
<!-- TODO: Make these use auth.py -->
|
||||||
<li><a href="${tg.url('/user/list')}">${_('User List')}</a></li>
|
|
||||||
<li><a href="${tg.url('/group/new')}">${_('New Group')}</a></li>
|
<li><a href="${tg.url('/group/new')}">${_('New Group')}</a></li>
|
||||||
|
<li><a href="${tg.url('/user/list')}">${_('User List')}</a></li>
|
||||||
</div>
|
</div>
|
||||||
<li py:if="not tg.identity.anonymous"><a href="${tg.url('/group/list/A*')}">${_('Apply For a new Group')}</a></li>
|
|
||||||
<li py:if="not tg.identity.anonymous"><a href="${tg.url('/group/list')}">${_('Group List')}</a></li>
|
<li py:if="not tg.identity.anonymous"><a href="${tg.url('/group/list')}">${_('Group List')}</a></li>
|
||||||
|
<li py:if="not tg.identity.anonymous"><a href="${tg.url('/group/list/A*')}">${_('Apply For a new Group')}</a></li>
|
||||||
|
<li><a href="http://fedoraproject.org/wiki/FWN/LatestIssue">${_('News')}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div py:if="tg.identity.anonymous" id="language">
|
<div py:if="tg.identity.anonymous" id="language">
|
||||||
<form action="${tg.url('/language')}" method="get">
|
<form action="${tg.url('/language')}" method="get">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue