Navigation for "apps" tab on preferences.

Adding some controller code and template for the apps tab.  Currently
just a skeleton.
This commit is contained in:
Dave Pifke
2012-03-13 07:00:14 +00:00
committed by Logan Hanks
parent 576557244d
commit fe907eb1c4
4 changed files with 15 additions and 2 deletions

View File

@@ -1116,6 +1116,8 @@ class FormsController(RedditController):
content.append(EnemyList())
elif location == 'update':
content = PrefUpdate()
elif location == 'apps':
content = PrefApps()
elif location == 'feeds' and c.user.pref_private_feeds:
content = PrefFeeds()
elif location == 'delete':

View File

@@ -105,6 +105,7 @@ menu = MenuHandler(hot = _('hot'),
#preferences
options = _('options'),
apps = _("apps"),
feeds = _("RSS feeds"),
friends = _("friends"),
update = _("password/email"),

View File

@@ -620,7 +620,8 @@ class PrefsPage(Reddit):
*a, **kw)
def build_toolbars(self):
buttons = [NavButton(menu.options, '')]
buttons = [NavButton(menu.options, ''),
NamedButton('apps')]
if c.user.pref_private_feeds:
buttons.append(NamedButton('feeds'))
@@ -656,8 +657,12 @@ class PrefUpdate(Templated):
self.verify = verify
Templated.__init__(self)
class PrefApps(Templated):
"""Preference form for managing authorized third-party applications."""
pass
class PrefDelete(Templated):
"""preference form for deleting a user's own account."""
"""Preference form for deleting a user's own account."""
pass

View File

@@ -0,0 +1,5 @@
<div class="instructions apps">
<h1>${_("Applications")}</h1>
<p>Hello world.</p>
</div>