0001-misc-present-self-with-a-portal-agent-slug-in-menu.j.patch
combo/manager/views.py | ||
---|---|---|
485 | 485 |
label = _('Editing "%(site_title)s"') % settings.TEMPLATE_VARS |
486 | 486 |
else: |
487 | 487 |
label = _('Content Management') |
488 | ||
489 |
slug = 'portal' |
|
490 |
if getattr(settings, 'KNOWN_SERVICES') and 'combo' in settings.KNOWN_SERVICES: |
|
491 |
# switch to custom slug if the site is the portal agent. |
|
492 |
for service_slug, service in settings.KNOWN_SERVICES['combo'].items(): |
|
493 |
if service.get('is-portal-agent') and not service.get('secret'): |
|
494 |
slug = 'portal-agent' |
|
495 | ||
488 | 496 |
json_str = json.dumps([{'label': force_text(label), |
489 |
'slug': 'portal',
|
|
497 |
'slug': slug,
|
|
490 | 498 |
'url': request.build_absolute_uri(reverse('combo-manager-homepage')) |
491 | 499 |
}]) |
492 | 500 |
content_type = 'application/json' |
493 |
- |