Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Fix the missing Edit link from App Lookup tool (2nd attempt)
Browse files Browse the repository at this point in the history
  • Loading branch information
eviljeff committed Aug 16, 2012
1 parent 9311ade commit d091b2c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mkt/lookup/helpers.py
@@ -1,6 +1,8 @@
from jingo import env, register
import jinja2

from access import acl


@register.filter
@jinja2.contextfilter
Expand All @@ -23,6 +25,9 @@ def user_header(account, title, is_admin=False, page_type=''):

# page_type is used for setting the link 'sel' class
@register.function
def app_header(app, page_type=''):
@jinja2.contextfunction
def app_header(context, app, page_type=''):
t = env.get_template('lookup/helpers/app_header.html')
return jinja2.Markup(t.render(app=app, page_type=page_type))
is_admin = acl.action_allowed(context['request'], 'Users', 'Edit')
return jinja2.Markup(t.render(app=app, page_type=page_type,
is_admin=is_admin))

0 comments on commit d091b2c

Please sign in to comment.