diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/templatetags/window_header.py | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/ishtar_common/templatetags/window_header.py b/ishtar_common/templatetags/window_header.py index 18dc793bf..f6fc27082 100644 --- a/ishtar_common/templatetags/window_header.py +++ b/ishtar_common/templatetags/window_header.py @@ -10,8 +10,14 @@ def window_nav(context, item, window_id, show_url, modify_url='', histo_url='',      extra_actions = []      if hasattr(item, 'get_extra_actions'):          extra_actions = item.get_extra_actions(context['request']) -    if modify_url and hasattr(item, 'can_do') and hasattr(item, 'SLUG') and \ -            not item.can_do(context['request'], 'change_' + item.SLUG): + +    slug = None +    if hasattr(item, "LONG_SLUG"): +        slug = item.LONG_SLUG +    elif hasattr(item, "SLUG"): +        slug = item.SLUG +    if modify_url and hasattr(item, 'can_do') and slug and \ +            not item.can_do(context['request'], 'change_' + slug):          modify_url = ""      return {          'show_url': show_url,  | 
