Skip to content

Commit

Permalink
Actually display 50+
Browse files Browse the repository at this point in the history
  • Loading branch information
user12986714 committed Jul 13, 2020
1 parent 0b2d47e commit 0f56d38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Expand Up @@ -58,7 +58,7 @@
<% if user_signed_in? && current_user.has_role?("reviewer") %>
<% q_counts = redis.smembers("review_queues").map { |i| [i.to_i, redis.scard("review_queue/#{i}/unreviewed")] }.to_h %>
<% total_count = q_counts.sum { |_k, v| v } %>
<% label = raw("review <span class='reviews-count badge'>#{total_count != 0 && current_user&.has_role?(:reviewer) ? total_count : nil}</span>") %>
<% label = raw("review <span class='reviews-count badge'>#{total_count != 0 && current_user&.has_role?(:reviewer) ? (total_count > 50 ? '50+' : total_count) : nil}</span>") %>
<% Rack::MiniProfiler.step('Rendering: layouts/application/nav/review/dropdown') do %>
<%= nav_dropdown ReviewQueuesController, label: label do %>
<% ReviewQueue.where(privileges: current_user.roles.map(&:name)).each do |rq| %>
Expand Down

0 comments on commit 0f56d38

Please sign in to comment.