@register.function
@jinja2.contextfunction
def queue_tabnav(context):
 request = context['request']
 counts = context['queue_counts']
 apps_reviewing = AppsReviewing(request).get_apps()
 if acl.action_allowed(request, 'Apps', 'Review'):
  rv = [(reverse('reviewers.apps.queue_pending'), 'pending', pgettext(counts['pending'], 'Apps ({0})').format(counts['pending'])), (reverse('reviewers.apps.queue_rereview'), 'rereview', pgettext(counts['rereview'], 'Re-reviews ({0})').format(counts['rereview'])), (reverse('reviewers.apps.queue_updates'), 'updates', pgettext(counts['updates'], 'Updates ({0})').format(counts['updates']))]
  if acl.action_allowed(request, 'Apps', 'ReviewEscalated'):
   rv.append((reverse('reviewers.apps.queue_escalated'), 'escalated', pgettext(counts['escalated'], 'Escalations ({0})').format(counts['escalated'])))
  rv.append((reverse('reviewers.apps.apps_reviewing'), 'reviewing', _('Reviewing ({0})').format(len(apps_reviewing))))
  rv.append((reverse('reviewers.apps.queue_homescreen'), 'homescreen', pgettext(counts['homescreen'], 'Homescreens ({0})').format(counts['homescreen'])))
 else:
  rv = []
 if acl.action_allowed(request, 'Apps', 'ModerateReview'):
  rv.append((reverse('reviewers.apps.queue_moderated'), 'moderated', pgettext(counts['moderated'], 'Moderated Reviews ({0})').format(counts['moderated'])))
 if acl.action_allowed(request, 'Apps', 'ReadAbuse'):
  rv.append((reverse('reviewers.apps.queue_abuse'), 'abuse', pgettext(counts['abuse'], 'Abuse Reports ({0})').format(counts['abuse'])))
 if acl.action_allowed(request, 'Websites', 'ReadAbuse'):
  rv.append((reverse('reviewers.websites.queue_abuse'), 'abusewebsites', pgettext(counts['abusewebsites'], 'Website Abuse Reports ({0})').format(counts['abusewebsites'])))
 return rv

@ register . function @ jinja2 . contextfunction def queue_tabnav ( context ) : request = context [ 'request' ] counts = context [ 'queue_counts' ] apps_reviewing = AppsReviewing ( request ) . get_apps ( ) if acl . action_allowed ( request , 'Apps' , 'Review' ) : rv = [ ( reverse ( 'reviewers.apps.queue_pending' ) , 'pending' , pgettext ( counts [ 'pending' ] , 'Apps ({0})' ) . format ( counts [ 'pending' ] ) ) , ( reverse ( 'reviewers.apps.queue_rereview' ) , 'rereview' , pgettext ( counts [ 'rereview' ] , 'Re-reviews ({0})' ) . format ( counts [ 'rereview' ] ) ) , ( reverse ( 'reviewers.apps.queue_updates' ) , 'updates' , pgettext ( counts [ 'updates' ] , 'Updates ({0})' ) . format ( counts [ 'updates' ] ) ) ] if acl . action_allowed ( request , 'Apps' , 'ReviewEscalated' ) : rv . append ( ( reverse ( 'reviewers.apps.queue_escalated' ) , 'escalated' , pgettext ( counts [ 'escalated' ] , 'Escalations ({0})' ) . format ( counts [ 'escalated' ] ) ) ) rv . append ( ( reverse ( 'reviewers.apps.apps_reviewing' ) , 'reviewing' , _ ( 'Reviewing ({0})' ) . format ( len ( apps_reviewing ) ) ) ) rv . append ( ( reverse ( 'reviewers.apps.queue_homescreen' ) , 'homescreen' , pgettext ( counts [ 'homescreen' ] , 'Homescreens ({0})' ) . format ( counts [ 'homescreen' ] ) ) ) else : rv = [ ] if acl . action_allowed ( request , 'Apps' , 'ModerateReview' ) : rv . append ( ( reverse ( 'reviewers.apps.queue_moderated' ) , 'moderated' , pgettext ( counts [ 'moderated' ] , 'Moderated Reviews ({0})' ) . format ( counts [ 'moderated' ] ) ) ) if acl . action_allowed ( request , 'Apps' , 'ReadAbuse' ) : rv . append ( ( reverse ( 'reviewers.apps.queue_abuse' ) , 'abuse' , pgettext ( counts [ 'abuse' ] , 'Abuse Reports ({0})' ) . format ( counts [ 'abuse' ] ) ) ) if acl . action_allowed ( request , 'Websites' , 'ReadAbuse' ) : rv . append ( ( reverse ( 'reviewers.websites.queue_abuse' ) , 'abusewebsites' , pgettext ( counts [ 'abusewebsites' ] , 'Website Abuse Reports ({0})' ) . format ( counts [ 'abusewebsites' ] ) ) ) return rv
returns tuple of tab navigation for the queue pages .