mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
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>
This commit is contained in:
parent
8e6975b1db
commit
9ebc94a1df
|
@ -8,6 +8,7 @@ from layerindex.models import Branch, LayerItem
|
||||||
from django.contrib.sites.models import Site
|
from django.contrib.sites.models import Site
|
||||||
|
|
||||||
def layerindex_context(request):
|
def layerindex_context(request):
|
||||||
|
import settings
|
||||||
site = Site.objects.get_current()
|
site = Site.objects.get_current()
|
||||||
if site and site.name and site.name != 'example.com':
|
if site and site.name and site.name != 'example.com':
|
||||||
site_name = site.name
|
site_name = site.name
|
||||||
|
@ -17,5 +18,6 @@ def layerindex_context(request):
|
||||||
'all_branches': Branch.objects.exclude(name='oe-classic').order_by('sort_priority'),
|
'all_branches': Branch.objects.exclude(name='oe-classic').order_by('sort_priority'),
|
||||||
'unpublished_count': LayerItem.objects.filter(status='N').count(),
|
'unpublished_count': LayerItem.objects.filter(status='N').count(),
|
||||||
'oe_classic': Branch.objects.filter(name='oe-classic'),
|
'oe_classic': Branch.objects.filter(name='oe-classic'),
|
||||||
'site_name': site_name
|
'site_name': site_name,
|
||||||
|
'rrs_enabled': 'rrs' in settings.INSTALLED_APPS,
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,9 @@
|
||||||
<li><a href="{% url 'duplicates' 'master' %}">Duplicates</a></li>
|
<li><a href="{% url 'duplicates' 'master' %}">Duplicates</a></li>
|
||||||
<li><a href="{% url 'update_list' %}">Updates</a></li>
|
<li><a href="{% url 'update_list' %}">Updates</a></li>
|
||||||
<li><a href="{% url 'stats' %}">Statistics</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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user