Skip to content

Commit

Permalink
Merge pull request #1397 from openjournals/visible-papers-only
Browse files Browse the repository at this point in the history
Update badges_controller.rb
  • Loading branch information
arfon authored Nov 18, 2024
2 parents a2636f7 + 4287704 commit 0b77db8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/badges_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BadgesController < ApplicationController
}

def reviewed_by
n_reviews = Paper.where(":reviewer = ANY (reviewers)", reviewer: params[:reviewer]).count
n_reviews = Paper.visible.where(":reviewer = ANY (reviewers)", reviewer: params[:reviewer]).count
@key = string_item("JOSS Reviews", COLORS[:gray])
@value = string_item(n_reviews.to_s, COLORS[:blue], @key[:outer_width])
@badge_width = @key[:outer_width] + @value[:outer_width]
Expand Down Expand Up @@ -52,4 +52,4 @@ def text_x_position(width, offset=0)
def em_width
VERDANA_WIDTHS["m".codepoints[0]]
end
end
end

0 comments on commit 0b77db8

Please sign in to comment.