From 9ebc94a1df62f3d91ba8ef1160daeee529ee0c83 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 3 Apr 2018 16:36:17 +1200 Subject: Add a link from the Tools drop-down to the RRS if enabled If the RRS is enabled, then add a link to it in the tools menu. I don't expect this to be used a lot, but otherwise the only way you'd get there would be either externally or via the link from the layer detail. Signed-off-by: Paul Eggleton --- layerindex/context_processors.py | 4 +++- templates/base.html | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/layerindex/context_processors.py b/layerindex/context_processors.py index c21c4a9161..db8e3fa34f 100644 --- a/layerindex/context_processors.py +++ b/layerindex/context_processors.py @@ -8,6 +8,7 @@ from layerindex.models import Branch, LayerItem from django.contrib.sites.models import Site def layerindex_context(request): + import settings site = Site.objects.get_current() if site and site.name and site.name != 'example.com': site_name = site.name @@ -17,5 +18,6 @@ def layerindex_context(request): 'all_branches': Branch.objects.exclude(name='oe-classic').order_by('sort_priority'), 'unpublished_count': LayerItem.objects.filter(status='N').count(), 'oe_classic': Branch.objects.filter(name='oe-classic'), - 'site_name': site_name + 'site_name': site_name, + 'rrs_enabled': 'rrs' in settings.INSTALLED_APPS, } diff --git a/templates/base.html b/templates/base.html index a9d7c83d96..2bd000037d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -74,6 +74,9 @@
  • Duplicates
  • Updates
  • Statistics
  • + {% if rrs_enabled %} +
  • Recipe Maintenance
  • + {% endif %} {% endif %} -- cgit 1.2.3-korg