修改参数作品打分。把百分比变成人数

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2014-10-27 09:39:04 +08:00
parent 66aa72d210
commit ed292c8216
3 changed files with 5 additions and 5 deletions

View File

@ -56,12 +56,12 @@ class SoftapplicationsController < ApplicationController
stars_status = stars_reates.select("stars, count(*) as scount").
group("stars")
@stars_status_map = Hash.new(0.0)
@stars_status_map = Hash.new(0)
stars_status.each do |star_status|
percent = percent_of(star_status.scount, stars_reates_count).to_f
percent_m = format("%.2f", percent)
people = star_status.scount.to_i
@stars_status_map["star#{star_status.stars.to_i}".to_sym] =
percent_m.to_s + "%"
people.to_s
end
@jours = @softapplication.journals_for_messages.order('created_on DESC')
@image_results = []

View File

@ -71,7 +71,7 @@
<!-- <div>打分总人数:<%= @softapplication.raters(:quality).count %></div> -->
<div style="overflow: hidden">
<div style="margin-left: 15%; float: left">
<div style="padding-left: 45px; padding-bottom: 5px"><%=l(:label_work_scores_proportion)%></div>
<div style="padding-left: 45px; padding-bottom: 5px"><%=l(:label_work_scores_people)%></div>
<div>
<% 100.step(20, -20) do |star| %>
<div data-kls="Softapplication" data-id="2" data-dimension="quality" data-average="3.25" class="rateable div_inline jDisabled" style="height: 20px; width: 115px; overflow: hidden; z-index: 1; position: relative;">

View File

@ -2006,7 +2006,7 @@ zh:
label_work_scores: 作品得分
label_work_rating: 评分
label_work_tishi: 您可以重新打分,打分结果以最后一次打分为主!
label_work_scores_proportion: 得分比例
label_work_scores_people: 得分人数
label_softapplication_type: 应用分类
label_work_type: 作品分类
label_work_photo: 作品截图