aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/context_processors.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-03-06 09:16:19 +0000
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-03-06 09:16:19 +0000
commit46e579b6e6c607ffa36e7c14ae3a3a183bd30d30 (patch)
tree3b81d9af3df4c726330372faa000bfb3efa772f2 /layerindex/context_processors.py
parentfea42407fb7ff1aa3db59120b16ee558de03f244 (diff)
downloadopenembedded-core-contrib-46e579b6e6c607ffa36e7c14ae3a3a183bd30d30.tar.gz
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>
Diffstat (limited to 'layerindex/context_processors.py')
-rw-r--r--layerindex/context_processors.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/layerindex/context_processors.py b/layerindex/context_processors.py
index 8e2c4e7ad6..90fc0f8bbc 100644
--- a/layerindex/context_processors.py
+++ b/layerindex/context_processors.py
@@ -4,7 +4,7 @@
#
# 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):
current_branch = request.session.get('branch', None)
@@ -13,4 +13,5 @@ def layerindex_context(request):
return {
'all_branches': Branch.objects.all(),
'current_branch': current_branch,
+ 'unpublished_count': LayerItem.objects.filter(status='N').count(),
} \ No newline at end of file