From 46e579b6e6c607ffa36e7c14ae3a3a183bd30d30 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 6 Mar 2013 09:16:19 +0000 Subject: [PATCH] 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 --- TODO | 1 - base.html | 7 ++++++- layerindex/context_processors.py | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 1d26136..e1026fe 100644 --- a/TODO +++ b/TODO @@ -16,7 +16,6 @@ Later: * Style/extend about page? * Style recipe info page? * 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) * Query backend service? i.e. special URL to query information for external apps/scripts * Tool for finding/comparing duplicate recipes? diff --git a/base.html b/base.html index 75871fe..1989dd4 100644 --- a/base.html +++ b/base.html @@ -53,7 +53,12 @@ {% block submitlink %}
  • Submit layer
  • {% endblock %} {% if user.is_authenticated %} {% if perms.layeritem.publish_layer %} -
  • Review
  • +
  • + Review + {% if unpublished_count > 0 %} + {{ unpublished_count }} + {% endif %} +
  • {% endif %}