forked from midou/invidious
Separate with comma views, likes, dislikes
This commit is contained in:
parent
24cea8f3e7
commit
84c8fb9b99
@ -320,3 +320,7 @@ def template_comments(root)
|
|||||||
|
|
||||||
return html
|
return html
|
||||||
end
|
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-g">
|
||||||
<div class="pure-u-1 pure-u-md-1-5">
|
<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-eye" aria-hidden="true"></i> <%= number_with_separator(video.views) %></p>
|
||||||
<p><i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= video.likes %></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> <%= video.dislikes %></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="Wilson">Wilson Score : <%= video.wilson_score.round(4) %></p>
|
||||||
<p id="Rating">Rating : <%= rating.round(4) %> / 5</p>
|
<p id="Rating">Rating : <%= rating.round(4) %> / 5</p>
|
||||||
<p id="Engagement">Engagement : <%= engagement.round(2) %>%</p>
|
<p id="Engagement">Engagement : <%= engagement.round(2) %>%</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user