summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-04-03 16:36:17 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:53 +1200
commit9ebc94a1df62f3d91ba8ef1160daeee529ee0c83 (patch)
tree27bc571c191f025fb16754c67667fb026626202d
parent8e6975b1db7a206bbffae44c7b326aa7636dfd3c (diff)
downloadopenembedded-core-contrib-9ebc94a1df62f3d91ba8ef1160daeee529ee0c83.tar.gz
openembedded-core-contrib-9ebc94a1df62f3d91ba8ef1160daeee529ee0c83.tar.bz2
openembedded-core-contrib-9ebc94a1df62f3d91ba8ef1160daeee529ee0c83.zip
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 <paul.eggleton@linux.intel.com>
-rw-r--r--layerindex/context_processors.py4
-rw-r--r--templates/base.html3
2 files changed, 6 insertions, 1 deletions
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 @@
<li><a href="{% url 'duplicates' 'master' %}">Duplicates</a></li>
<li><a href="{% url 'update_list' %}">Updates</a></li>
<li><a href="{% url 'stats' %}">Statistics</a></li>
+ {% if rrs_enabled %}
+ <li><a href="{% url 'rrs_frontpage' %}">Recipe Maintenance</a></li>
+ {% endif %}
</ul>
</li>
{% endif %}