增加了每个app打分的总人数
This commit is contained in:
parent
d50b2a9cfe
commit
c6576c71bf
|
@ -56,8 +56,10 @@ class SoftapplicationsController < ApplicationController
|
|||
|
||||
@stars_status_map = Hash.new(0.0)
|
||||
stars_status.each do |star_status|
|
||||
percent = percent_of(star_status.scount, stars_reates_count).to_f
|
||||
percent_m = format("%.2f", percent)
|
||||
@stars_status_map["star#{star_status.stars.to_i}".to_sym] =
|
||||
percent_of(star_status.scount, stars_reates_count).to_s + "%"
|
||||
percent_m.to_s + "%"
|
||||
end
|
||||
@jours = @softapplication.journals_for_messages.order('created_on DESC')
|
||||
@image_results = []
|
||||
|
|
|
@ -63,8 +63,9 @@
|
|||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<div style="font-size: 15px;"><strong>应用得分:</strong></div>
|
||||
<!-- <div>打分总人数:<%= @softapplication.raters(:quality).count%></div> -->
|
||||
<div style="overflow: hidden">
|
||||
<div style="margin-left: 25%; float: left">
|
||||
<div style="margin-left: 15%; float: left">
|
||||
<div style="padding-left: 45px; padding-bottom: 5px">得分比例</div>
|
||||
<div>
|
||||
<% 100.step(20,-20) do |star| %>
|
||||
|
@ -83,6 +84,10 @@
|
|||
<div style="padding-left: 25px;">最终得分</div>
|
||||
<div style="padding-top: 3px"><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></div>
|
||||
</div>
|
||||
<div style="float: left; padding-left: 100px; padding-top:35px ">
|
||||
<div>打分总人数</div>
|
||||
<div style="padding-left: 28px; padding-top: 1px; font-size: 25px; color: blue"><strong><%= @softapplication.raters(:quality).count%></strong></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="underline-contests_one"></div>
|
||||
|
|
Loading…
Reference in New Issue