mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
Show count of layers to be reviewed next to Review link
Add a badge next to the Review link (when shown for users with the publish permission) on all pages showing how many layers need to be reviewed, if any. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
fea42407fb
commit
46e579b6e6
1
TODO
1
TODO
|
@ -16,7 +16,6 @@ Later:
|
||||||
* Style/extend about page?
|
* Style/extend about page?
|
||||||
* Style recipe info page?
|
* Style recipe info page?
|
||||||
* Style machine list on detail
|
* Style machine list on detail
|
||||||
* Show count of layers to be reviewed next to review button
|
|
||||||
* Something to help with compatibility (although maybe this should just be handled using the existing versioned layer dependencies in layer.conf)
|
* Something to help with compatibility (although maybe this should just be handled using the existing versioned layer dependencies in layer.conf)
|
||||||
* Query backend service? i.e. special URL to query information for external apps/scripts
|
* Query backend service? i.e. special URL to query information for external apps/scripts
|
||||||
* Tool for finding/comparing duplicate recipes?
|
* Tool for finding/comparing duplicate recipes?
|
||||||
|
|
|
@ -53,7 +53,12 @@
|
||||||
{% block submitlink %}<li><a href="{% url submit_layer %}">Submit layer</a></li>{% endblock %}
|
{% block submitlink %}<li><a href="{% url submit_layer %}">Submit layer</a></li>{% endblock %}
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
{% if perms.layeritem.publish_layer %}
|
{% if perms.layeritem.publish_layer %}
|
||||||
<li><a href="{% url layer_list_review %}">Review</a></li>
|
<li><a href="{% url layer_list_review %}">
|
||||||
|
Review
|
||||||
|
{% if unpublished_count > 0 %}
|
||||||
|
<span class="badge badge-warning">{{ unpublished_count }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li class="divider-vertical"></li>
|
<li class="divider-vertical"></li>
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
# Licensed under the MIT license, see COPYING.MIT for details
|
# Licensed under the MIT license, see COPYING.MIT for details
|
||||||
|
|
||||||
from layerindex.models import Branch
|
from layerindex.models import Branch, LayerItem
|
||||||
|
|
||||||
def layerindex_context(request):
|
def layerindex_context(request):
|
||||||
current_branch = request.session.get('branch', None)
|
current_branch = request.session.get('branch', None)
|
||||||
|
@ -13,4 +13,5 @@ def layerindex_context(request):
|
||||||
return {
|
return {
|
||||||
'all_branches': Branch.objects.all(),
|
'all_branches': Branch.objects.all(),
|
||||||
'current_branch': current_branch,
|
'current_branch': current_branch,
|
||||||
|
'unpublished_count': LayerItem.objects.filter(status='N').count(),
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user