Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mollyproject/mollyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
cnorthwood committed Dec 16, 2010
2 parents b93a571 + 842a031 commit 683f125
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions molly/apps/home/templates/home/index.html
Expand Up @@ -34,11 +34,11 @@
<div class="bubble">
<div class="center">
<ol class="icon-menu">
{% for application in applications %}
{% for application in applications %}{% if application.display_to_user %}
<li id="menu-{{ application.local_name }}">
<a {% if forloop.counter < 10 %} accesskey="{{ forloop.counter }}"{% endif %} href="{{ application.url }}">{{ application.title }}</a>
<a {% if application.accesskey %} accesskey="{{ application.accesskey }}"{% endif %} href="{{ application.url }}">{{ application.title }}</a>
</li>
{% endfor %}
{% endif %}{% endfor %}
</ol>
{# Only necessary if using floating icons #}
{# <div class="clearhidden"> </div> #}
Expand Down
7 changes: 6 additions & 1 deletion molly/apps/home/views.py
Expand Up @@ -52,7 +52,12 @@ def handle_GET(self, request, context):
'local_name': app.local_name,
'title': app.title,
'url': reverse('%s:index' % app.local_name) if app.has_urlconf else None,
} for app in conf.all_apps() if app.display_to_user]
'display_to_user': app.display_to_user,
} for app in conf.all_apps()]

# Add accesskeys to the first 9 apps to be displayed to the user
for i, app in enumerate([app for app in applications if app['display_to_user']][:9]):
app['accesskey'] = i + 1

context = {
'applications': applications,
Expand Down

0 comments on commit 683f125

Please sign in to comment.