mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Separate with comma views, likes, dislikes
This commit is contained in:
parent
24cea8f3e7
commit
84c8fb9b99
2 changed files with 7 additions and 3 deletions
|
@ -320,3 +320,7 @@ def template_comments(root)
|
|||
|
||||
return html
|
||||
end
|
||||
|
||||
def number_with_separator(number)
|
||||
number.to_s.reverse.gsub(/(\d{3})(?=\d)/, "\\1,").reverse
|
||||
end
|
||||
|
|
|
@ -81,9 +81,9 @@ function dismiss(target) {
|
|||
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-1-5">
|
||||
<p><i class="fa fa-eye" aria-hidden="true"></i> <%= video.views %></p>
|
||||
<p><i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= video.likes %></p>
|
||||
<p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= video.dislikes %></p>
|
||||
<p><i class="fa fa-eye" aria-hidden="true"></i> <%= number_with_separator(video.views) %></p>
|
||||
<p><i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= number_with_separator(video.likes) %></p>
|
||||
<p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= number_with_separator(video.dislikes) %></p>
|
||||
<p id="Wilson">Wilson Score : <%= video.wilson_score.round(4) %></p>
|
||||
<p id="Rating">Rating : <%= rating.round(4) %> / 5</p>
|
||||
<p id="Engagement">Engagement : <%= engagement.round(2) %>%</p>
|
||||
|
|
Loading…
Reference in a new issue