From 84787ef596fca79e34630ad885b1a58ccb1f05d2 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 7 Aug 2013 14:52:05 -0700 Subject: Bug 902623: show the count of pending reviews next to suggested reviewers --- extensions/Review/web/js/review.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'extensions/Review/web/js') diff --git a/extensions/Review/web/js/review.js b/extensions/Review/web/js/review.js index 0dedd2410..6d0e24342 100644 --- a/extensions/Review/web/js/review.js +++ b/extensions/Review/web/js/review.js @@ -129,8 +129,14 @@ var REVIEW = { add_menu_item: function(field_idx, user, is_mentor) { var menu = REVIEW.fields[field_idx].menu; + var queue = ''; + if (user.review_count == 0) { + queue = 'empty queue'; + } else { + queue = user.review_count + ' review' + (user.review_count == 1 ? '' : 's') + ' in queue'; + } var item = menu.addItem( - { text: user.identity, url: '#' + user.login } + { text: user.identity + ' (' + queue + ')', url: '#' + user.login } ); if (is_mentor) item.cfg.setProperty('classname', 'mentor'); -- cgit v1.2.3-24-g4f1b